public DataSeriesConfigEdittWindow(DataSeriesConfig config)
 {
     InitializeComponent();
     EditorVM    = new DataSeriesConfigEditorVM(config);
     DataContext = EditorVM;
     SetupMeasUC(EditorVM.mLineSeriesConfig.Measurement);
 }
Ejemplo n.º 2
0
        public void AddSeries(string measType)
        {
            DataSeriesConfig lineSeriesConfig = new DataSeriesConfig();

            if (measType == DataExportConfigEditWindow.RandomMeasOption)
            {
                lineSeriesConfig.Measurement = new RandomMeasurement();
            }
            else if (measType == DataExportConfigEditWindow.PMUMeasOption)
            {
                lineSeriesConfig.Measurement = new PMUMeasurement();
            }
            else if (measType == DataExportConfigEditWindow.RandomTimeSeriesMeasOption)
            {
                lineSeriesConfig.Measurement = new RandomTimeSeriesMeasurement();
            }
            else if (measType == DataExportConfigEditWindow.ScadaMeasOption)
            {
                lineSeriesConfig.Measurement = new ScadaMeasurement();
            }
            else if (measType == DataExportConfigEditWindow.PspMeasOption)
            {
                lineSeriesConfig.Measurement = new PspMeasurement();
            }
            mDataExportConfig.SeriesConfigs.Add(lineSeriesConfig);
            SyncSeriesConfigListItemsWithConfig();
        }
        public DataSeriesConfig Clone()
        {
            DataSeriesConfig config = new DataSeriesConfig {
                Name = Name, Measurement = Measurement.Clone()
            };

            return(config);
        }
Ejemplo n.º 4
0
 public void DuplicateSeriesConfigAt(int seriesIndex)
 {
     //check if index is in config bounds
     if (seriesIndex >= 0 && seriesIndex < mDataExportConfig.SeriesConfigs.Count)
     {
         // check if seriesIndex is in the display series List item bounds
         if (seriesIndex <= SeriesConfigListItems.Count)
         {
             DataSeriesConfig duplicatedConfig = mDataExportConfig.SeriesConfigs[seriesIndex].Clone();
             mDataExportConfig.SeriesConfigs.Insert(seriesIndex, duplicatedConfig);
         }
         SyncSeriesConfigListItemsWithConfig();
     }
 }
 // constructor
 public DataSeriesConfigEditorVM(DataSeriesConfig config)
 {
     mLineSeriesConfig = config.Clone();
 }
Ejemplo n.º 6
0
 public SeriesConfigListItem(DataSeriesConfig config)
 {
     SeriesDisplayText = config.GetDisplayText();
 }