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); }
private void CurveListComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (CurveListComboBox.SelectedIndex != -1) { CurveConfigPropertyGrid.SelectedObject = SweepModeCurvesList[CurveListComboBox.SelectedIndex]; SpectrumPictureBox.SetActiveCurve((CCurve)SweepModeCurvesList[CurveListComboBox.SelectedIndex]); SpectrumPictureBox.Redraw(); CCurve Curve = (CCurve)SweepModeCurvesList[CurveListComboBox.SelectedIndex]; if (Curve.SpectrumValues != null && Curve.SpectrumValues.Length > 0) { LOGDraw("***------ SELECTED CURVE ----------***"); LOGDraw(Curve.GetCurveDescription()); } } }