private void DrawToPlotForm(double? minX = null, double? maxX = null, double? minY = null, double? maxY = null) { if (_currWd == null) { MessageBox.Show("Не загружено ни одной пластины!"); return; } string[] wafers = GetListOfChecked(checkedListBoxWafers); string[] parameters = GetListOfChecked(checkedListBoxParameters); string[] chips = GetListOfChecked(checkedListBoxChips); List<int> indexesOfGraphs = new List<int>(); int indexOfX = 0; string nameOfYAxes = "", nameOfXAxes = "", header = ""; if (Utils.IsSXPFormat(WaferMeasData.TypeOfCurves)) { indexesOfGraphs = GetListCheckedSandA(); indexOfX = 0; nameOfXAxes = "Frequency, GHz"; nameOfYAxes = NameOfYAxes; } if (Utils.IsLibertyFormat(WaferMeasData.TypeOfCurves)) { int indexOfY = cbYAxes.Items.IndexOf(cbYAxes.Text); if (cbYAxes.Text != "") indexesOfGraphs.Add(indexOfY); indexOfX = cbXAxes.Items.IndexOf(cbXAxes.Text); nameOfYAxes = cbYAxes.Text; nameOfXAxes = cbXAxes.Text; } // калибровка if (cbChooseCalibrPar.Text != "none") { WaferMeasData.SetCalibrationParameter(cbChooseCalibrPar.Text); } else { WaferMeasData.CancelCalibration(); } // только после калибровки устраняем положительные фазы if (_needToEliminatePositiveStartPhase) WaferMeasData.EliminatePositiveStartPhase(); if (!FormIsOpen("FormPlot")) { Form winPlot = new FormPlot(); winPlot.Show(); } double[][] masX, masY; List<string>[] curveInfo; int countOfCurves; WaferMeasData.ReturnDefinedCurves(indexesOfGraphs, indexOfX, parameters, wafers, chips, out masX, out masY, out curveInfo, out countOfCurves); // Формируем заголовок графика if (Utils.IsSXPFormat(WaferMeasData.TypeOfCurves)) header = GetPlotHeader(curveInfo, countOfCurves); Bitmap pictureWithGraph; int[][] masPixX, masPixY; GraficLibrary.DrawSetOfCurves(masX, masY, countOfCurves, nameOfXAxes, nameOfYAxes, header, minX, maxX, minY, maxY, out pictureWithGraph, out masPixX, out masPixY); FormPlot.Instance.LoadBitmap(pictureWithGraph); FormPlot.Instance.LoadCurveCoord(masPixX, masPixY); FormPlot.Instance.LoadCurveInfo(curveInfo, countOfCurves); }
void plot_Load(object sender, EventArgs e) { Instance = this; Text = "График [ measure ]"; CalibratePlotWindow(); }