public void ProcessSweepModeDisplayAcquisition(NWTDevice.RunSweepModeParam AcquisitionParams) { CGraph Graph = SpectrumPictureBox.GetGraphConfig(); CCurve CurveConfig = (CCurve)CurveConfigPropertyGrid.SelectedObject; SpectrumPictureBox.SetActiveCurve(CurveConfig); CurveConfig.nSpectrumLowFrequency = AcquisitionParams.nBaseFrequency; CurveConfig.nSpectrumHighFrequency = AcquisitionParams.nBaseFrequency + AcquisitionParams.nFrequencyStep * AcquisitionParams.nCount; CurveConfig.nFrequencyStep = AcquisitionParams.nFrequencyStep; if (AcquisitionParams.ResultDatas != null) { Utility.FilterArray(AcquisitionParams.ResultDatas, (int)((FilterMode)FilterComboBox.SelectedItem)); CurveConfig.SpectrumValues = AcquisitionParams.ResultDatas; CurveConfig.DetermineMinMaxLevels(); CurveConfig.ComputeCaracteristicsParams(); if (bLoop == false) { LOGDraw(""); // new line LOGDraw("*** ----- RESULTS----- ***"); LOGDraw(CurveConfig.GetCurveDescription()); } } Graph.nLastDrawingLowFrequency = nFrequencyDetectionStart; Graph.nLastDrawingHighFrequency = nFrequencyDetectionEnd; SpectrumPictureBox.DrawCurveCollection(SweepModeCurvesList, bLoop); }
void SingleCurveDisplay(Int64 nFrequencyBase, Int64 nStep, float [] data) { int Count = data.Length; CCurve Curve = (CCurve)SweepModeCurvesList[0]; Curve.Color_ = Color.DeepPink; /* * CGraph Graph = SpectrumPictureBox.GetGraphConfig(); * Graph.nLastDrawingLowFrequency = nFrequencyBase; * Graph.nLastDrawingHighFrequency = nFrequencyBase + nStep * Count; * Graph.fLastDrawingLevelLow = -90; * Graph.fLastDrawingLevelHigh = 0; * * SpectrumPictureBox.GetGraphConfig().DrawBackGround(); */ Curve.SpectrumValues = data; Curve.nSpectrumLowFrequency = nFrequencyBase; Curve.nSpectrumHighFrequency = nFrequencyBase + nStep * Count; Curve.Name = "Crystal"; Curve.DetermineMinMaxLevels(); SpectrumPictureBox.DrawCurveCollection(SweepModeCurvesList); //SpectrumPictureBox.DrawSingleCurve(Curve); }
public void DrawSingleCurve(CCurve _curve) { if (Size.Width == 0 || Size.Height == 0) { return; } if (_curve.SpectrumValues != null) { _curve.DetermineMinMaxLevels(); } CurvesList.Clear(); CurvesList.Add(_curve); ActiveCurve = _curve; DrawCurveCollection(CurvesList); }