void WaitingExposureVerify(object LockWatingThread) { while (true) { double miu; double delta; double miuCC; this.Invoke((EventHandler)(delegate { exposureVerifyChart.Series["miu"].Points.Clear(); exposureVerifyChart.Series["delta"].Points.Clear(); exposureVerifyChart.Series["miuCC"].Points.Clear(); for (int step = 0; step < SystemParam.n; step++) { WFGlobal.WaitMS(1); int ex = SystemParam.NTmin + step * SystemParam.NTexp; tcpCCS.LightSet(SystemParam.lambda_Oe, SystemParam.Oe); exposureVerifyListView.Items[4].SubItems[1].Text = step.ToString(); if (!UDPProc.CollectImage(this, ex, 2)) { exposureVerifyWaitingProc.ExitWatting(); return; } UDPProc.ccdImageList[0].save(SystemParam.TempPicPath + "Ev" + step.ToString() + "_0.bin"); UDPProc.ccdImageList[1].save(SystemParam.TempPicPath + "Ev" + step.ToString() + "_1.bin"); ccdImage.Calc_miu_delta(UDPProc.ccdImageList[0], UDPProc.ccdImageList[1], out miu, out delta, out miuCC); exposureVerifyChart.Series["miu"].Points.AddXY(step, miu); exposureVerifyChart.Series["delta"].Points.AddXY(step, delta); exposureVerifyChart.Series["miuCC"].Points.AddXY(step, miuCC); if (exposureVerifyWaitingProc.HasBeenCancelled()) { return; } exposureVerifyWaitingProc.SetProcessBarPerformStep(); } })); if (exposureVerifyWaitingProc.HasBeenCancelled()) { return; } if (MessageBox.Show("测试完毕,是否修改要修改参数", "测试完成", MessageBoxButtons.YesNo) == DialogResult.Yes) { FormParam f = new FormParam(); f.ShowDialog(); } else { return; } } }
private void toolStripButton1_Click(object sender, EventArgs e) { FormParam f = new FormParam(); f.ShowDialog(); }