public void AddSeries(string measType)
        {
            LineSeriesConfig lineSeriesConfig = new LineSeriesConfig();

            if (measType == LinePlotConfigEditWindow.RandomMeasOption)
            {
                lineSeriesConfig.Measurement = new RandomMeasurement();
            }
            else if (measType == LinePlotConfigEditWindow.PMUMeasOption)
            {
                lineSeriesConfig.Measurement = new PMUMeasurement();
            }
            else if (measType == LinePlotConfigEditWindow.RandomTimeSeriesMeasOption)
            {
                lineSeriesConfig.Measurement = new RandomTimeSeriesMeasurement();
            }
            else if (measType == LinePlotConfigEditWindow.ScadaMeasOption)
            {
                lineSeriesConfig.Measurement = new ScadaMeasurement();
            }
            else if (measType == LinePlotConfigEditWindow.PspMeasOption)
            {
                lineSeriesConfig.Measurement = new PspMeasurement();
            }
            mLinePlotConfig.SeriesConfigs.Add(lineSeriesConfig);
            SyncSeriesConfigListItemsWithConfig();
        }
 public LineSeriesConfigEditWindow(LineSeriesConfig config)
 {
     InitializeComponent();
     EditorVM    = new LineSeriesConfigEditorVM(config);
     DataContext = EditorVM;
     SetupMeasUC(EditorVM.mLineSeriesConfig.Measurement);
 }
        public LineSeriesConfig Clone()
        {
            LineSeriesConfig config = new LineSeriesConfig {
                Name = Name, Appearance = Appearance.Clone(), Measurement = Measurement.Clone(), DisplayTimeShift = DisplayTimeShift.Clone()
            };

            return(config);
        }
 public void DuplicateSeriesConfigAt(int seriesIndex)
 {
     //check if index is in config bounds
     if (seriesIndex >= 0 && seriesIndex < mLinePlotConfig.SeriesConfigs.Count)
     {
         // check if seriesIndex is in the display series List item bounds
         if (seriesIndex <= SeriesConfigListItems.Count)
         {
             LineSeriesConfig duplicatedConfig = mLinePlotConfig.SeriesConfigs[seriesIndex].Clone();
             mLinePlotConfig.SeriesConfigs.Insert(seriesIndex, duplicatedConfig);
         }
         SyncSeriesConfigListItemsWithConfig();
     }
 }
 public SeriesConfigListItem(LineSeriesConfig config, int index)
 {
     SeriesDisplayText = config.GetDisplayText();
     Index             = index;
 }
 public SeriesConfigListItem(LineSeriesConfig config)
 {
     SeriesDisplayText = config.GetDisplayText();
 }
 // constructor
 public LineSeriesConfigEditorVM(LineSeriesConfig config)
 {
     mLineSeriesConfig = config.Clone();
 }