public DataExportConfig Clone()
        {
            DataExportConfig dataExportConfig = new DataExportConfig {
                Name = Name
            };

            dataExportConfig.SeriesConfigs = (from config in SeriesConfigs select config.Clone()).ToList();
            return(dataExportConfig);
        }
Beispiel #2
0
 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;
 }
Beispiel #3
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...");
     }
 }
Beispiel #4
0
 // constructor
 public DataExportConfigEditorVM(DataExportConfig config)
 {
     mDataExportConfig     = config.Clone();
     SeriesConfigListItems = new ObservableCollection <SeriesConfigListItem>();
     SyncSeriesConfigListItemsWithConfig();
 }