示例#1
0
 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;
 }
示例#3
0
        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;
            }
        }
示例#4
0
 public DataPointListMaker(ComplexChart complexChart, DataPointListType Type)
 {
     _complexChart = complexChart;
     DataPointList = new List <DataPoint>();
     MakeDataPointList(Type);
 }
示例#5
0
 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);
 }