public DataExportConfig Clone() { DataExportConfig dataExportConfig = new DataExportConfig { Name = Name }; dataExportConfig.SeriesConfigs = (from config in SeriesConfigs select config.Clone()).ToList(); return(dataExportConfig); }
public DataExportConfigEditWindow(DataExportConfig config) { InitializeComponent(); editorVM = new DataExportConfigEditorVM(config); DataContext = editorVM; ConfigItemsContainer.ItemsSource = editorVM.SeriesConfigListItems; string[] comboItemStrings = new string[] { PMUMeasOption, ScadaMeasOption, PspMeasOption, RandomTimeSeriesMeasOption, RandomMeasOption }; MeasOptionComboBox.ItemsSource = comboItemStrings; MeasOptionComboBox.SelectedIndex = 0; }
public void SetState(IWidgetState state) { if (state is DataExportWidgetState widgetState) { if (widgetState.DataExportConfig_ is DataExportConfig plotConfig) { mDataExportConfig = plotConfig; SetupDataView(); } else { Console.WriteLine("Inflation rejected since non DataExportConfig given for inflation..."); } } else { Console.WriteLine("Inflation rejected since non DataExportWidgetState given for inflation..."); } }
// constructor public DataExportConfigEditorVM(DataExportConfig config) { mDataExportConfig = config.Clone(); SeriesConfigListItems = new ObservableCollection <SeriesConfigListItem>(); SyncSeriesConfigListItemsWithConfig(); }