public void UdpateType(DataPointListType type) { _dataPointListMaker.MakeDataPointList(type); Points = _dataPointListMaker.DataPointList; _lineSeries.ItemsSource = Points; RefreshPlot(); }
public TypeRadioButton(DataPointListType type, string name, Update update, bool isChecked) { Type = type; Name = name; this.update = update; IsChecked = isChecked; }
public void MakeDataPointList(DataPointListType Type) { switch (Type) { case DataPointListType.Module: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], _complexChart.Values[i].Magnitude)); } break; case DataPointListType.Module_dB: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], 20 * Math.Log10(_complexChart.Values[i].Magnitude))); } break; case DataPointListType.Phase: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], _complexChart.Values[i].Phase)); } break; case DataPointListType.Real: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], _complexChart.Values[i].Real)); } break; case DataPointListType.Imaginary: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], _complexChart.Values[i].Imaginary)); } break; default: DataPointList = new List <DataPoint>(); for (int i = 0; i < _complexChart.Values.Count; i++) { DataPointList.Add(new DataPoint(_complexChart.Frequencies[i], 20 * Math.Log10(_complexChart.Values[i].Magnitude))); } break; } }
public DataPointListMaker(ComplexChart complexChart, DataPointListType Type) { _complexChart = complexChart; DataPointList = new List <DataPoint>(); MakeDataPointList(Type); }
public PlotCheckItem(bool isSelected, PlotModel plotModel, ComplexChart complexChart, DataPointListType type) { Name = complexChart.Name; _lineSeries.Title = Name; IsSelected = isSelected; this._plotModel = plotModel; _dataPointListMaker = new DataPointListMaker(complexChart, type); ComplexChart = complexChart; CheckBoxChanged(isSelected); }