private void toolStripButton5_Click(object sender, EventArgs e)
        {
            SystemParam.DeviceID = InputBox.ShowInputBox("请设定当前测试器件的芯片编号", SystemParam.DeviceID);
            iniFileOP.Write("System Run", "DeviceID", SystemParam.DeviceID);
            strCCDINIPath = SystemParam.ccdParamFilePath + SystemParam.DeviceID + ".ini";
            string Osat = iniFileOP.Read("CCD Param", "Osat", strCCDINIPath);

            if (!FileOP.IsExist(strCCDINIPath, FileOPMethod.File))
            {
                FileOP.CopyFile(System.Windows.Forms.Application.StartupPath + "\\ccdParamFileTemplate.ini", strCCDINIPath);
            }
            CCDTest();
        }
        void CCD3TTest()
        {
            CCD3TTestResult.Reset();
            UIHide();
            CCD3TTestListView.Visible = true;
            for (int i = 0; i < 4; i++)
            {
                if (!ParamTestList[i])
                {
                    CCDParamTestListView.Items[4 + i].SubItems[1].Text      = "不进行测试";
                    CCDParamTestListView.Items[4 + 5 + i].SubItems[1].Text  = "不进行测试";
                    CCDParamTestListView.Items[4 + 10 + i].SubItems[1].Text = "不进行测试";
                }
                else
                {
                    CCDParamTestListView.Items[4 + i].SubItems[1].Text      = "待测";
                    CCDParamTestListView.Items[4 + 5 + i].SubItems[1].Text  = "待测";
                    CCDParamTestListView.Items[4 + 10 + i].SubItems[1].Text = "待测";
                }
            }

            CCDParamTestListView.Items[1].SubItems[1].Text = CCDParamTestResult.K.ToString();
            CCDParamTestListView.Items[2].SubItems[1].Text = SystemParam.L.ToString();
            if (ParamTestList[0])//暗电流
            {
                CCD3TTestResult.miu_I_miu   = new double[3];
                CCD3TTestResult.miu_I_delta = new double[3];
            }
            //DSNU
            if (ParamTestList[1] || ParamTestList[2])
            {
                CCD3TTestResult.DSNU = new double[3];
            }
            //FPN
            if (ParamTestList[2])
            {
                CCD3TTestResult.FPN = new double[3];
            }
            //读出噪声
            if (ParamTestList[3])
            {
                CCD3TTestResult.delta_raed = new double[3];
            }

            for (int i = 0; i < 3; i++)
            {
                while (!double.TryParse(InputBox.ShowInputBox("请设定温度" + (i + 1).ToString(), "25"), out CCD3TTestResult.T[i]))
                {
                    MessageBox.Show("设定温度有误,请重新设定");
                }
                if (ParamTestList[0])//暗电流
                {
                    CCDParamTest_Collect_DarkI();
                    CCDParamTest_Calc_DarkI();
                    CCD3TTestListView.Items[4 + 5 * i].SubItems[1].Text = CCDParamTestResult.miu_I_miu.ToString() + "; " + CCDParamTestResult.miu_I_delta.ToString();
                    CCD3TTestResult.miu_I_miu[i]   = CCDParamTestResult.miu_I_miu;
                    CCD3TTestResult.miu_I_delta[i] = CCDParamTestResult.miu_I_delta;
                    FileOP.CopyFile(SystemParam.TempPicPath + "DarkI1.jpg", SystemParam.TempPicPath + "DarkI1_T" + (i + 1).ToString() + ".jpg");
                    FileOP.CopyFile(SystemParam.TempPicPath + "DarkI2.jpg", SystemParam.TempPicPath + "DarkI2_T" + (i + 1).ToString() + ".jpg");
                }
                //DSNU,FPN,读出噪声
                if (ParamTestList[1] || ParamTestList[2] || ParamTestList[3])
                {
                    CCDParamTest_Collect_L(false);
                    CCDParamTest_Calc_L_bLight = false;
                    ParamTestWaitingProc       = new WaitingProc();
                    WaitingProcFunc wpf = null;
                    ParamTestWaitingProc.MaxProgress = SystemParam.L;
                    wpf = new WaitingProcFunc(CCDParamTest_Calc_L);
                    if (!ParamTestWaitingProc.Execute(wpf, "处理暗场空域测试结果", WaitingType.With_ConfirmCancel, "是否取消?"))
                    {
                        textBox1.AppendText("用户终止自动测试\r\n");
                        return;
                    }
                    //DSNU
                    if (ParamTestList[1] || ParamTestList[2])
                    {
                        CCD3TTestResult.DSNU[i] = Math.Sqrt(CCDParamTestResult.L_S_y_dark) / CCDParamTestResult.K;
                        CCD3TTestListView.Items[4 + 5 * i + 1].SubItems[1].Text = CCD3TTestResult.DSNU[i].ToString();
                    }
                    //FPN
                    if (ParamTestList[2])
                    {
                        CCDParamTest_Collect_MinMax();
                        CCDParamTest_Calc_FWC();
                        CCD3TTestResult.FPN[i] = CCD3TTestResult.DSNU[i] / CCDParamTestResult.FWC;
                        CCD3TTestListView.Items[4 + 5 * i + 2].SubItems[1].Text = CCD3TTestResult.FPN[i].ToString();
                    }
                    //读出噪声
                    if (ParamTestList[3])
                    {
                        CCD3TTestResult.delta_raed[i] = Math.Sqrt(CCDParamTestResult.delta_mid) / CCDParamTestResult.K;
                        CCD3TTestListView.Items[4 + 5 * i + 3].SubItems[1].Text = CCD3TTestResult.delta_raed[i].ToString();
                    }
                }
            }
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                TestReport.MakeReport3T(saveFileDialog1.FileName);
                textBox1.AppendText("自动测试结束,测试报告保存位置为:\r\n");
                textBox1.AppendText(saveFileDialog1.FileName);
            }
            else
            {
                textBox1.AppendText("自动测试结束,用户未保存报告\r\n");
            }
            MessageBox.Show("三温测试完成");
        }