| | |
| | | using System.Collections.Generic; |
| | | using System.Collections.ObjectModel; |
| | | using System.Linq; |
| | | using System.Text.RegularExpressions; |
| | | using System.Windows; |
| | | using System.Windows.Controls; |
| | | |
| | |
| | | Set(ref datasource, value); |
| | | } |
| | | } |
| | | |
| | | public List<string> groups = new List<string>(); |
| | | |
| | | public ParameterSetting() |
| | | { |
| | |
| | | { |
| | | Datasource = ParameterManager.GetCommonParameter<ObservableCollection<ParameterData>>() |
| | | ?? new ObservableCollection<ParameterData>(); |
| | | groups = Datasource.Where(d => !string.IsNullOrEmpty(d.ShowGroup)).Select(d => d.ShowGroup).Distinct().ToList(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Datasource = new ObservableCollection<ParameterData>(); |
| | | groups = new List<string>(); |
| | | log.Error("Refresh Data Failed.", ex); |
| | | ToastHelper.Error(Window.GetWindow(this), $"{this.lang("App.RefreshFailed")}: {ex.Message}"); |
| | | } |
| | |
| | | Title = title, |
| | | Owner = Window.GetWindow(this) |
| | | }; |
| | | if (modal.Open(data ?? new ParameterData(), Datasource) == true) |
| | | if (modal.Open(data ?? new ParameterData(), Datasource, groups) == true) |
| | | { |
| | | if (index == -1) |
| | | { |