private void toolStripButtonXljc_Click(object sender, EventArgs e) { switch (UseFqy) { case "FLA_502": fla_502.Leak_check(); break; case "FLA_501": break; } }
private void toolStripButtonXljc_Click(object sender, EventArgs e) { switch (UseFqy) { case "fla_502": if (fla_502 != null) { fla_502.Leak_check(); } break; case "fla_501": break; } }
private void waitTestFinished() { if (fla_502 != null) { bool isfqycheckresult = true; DateTime starttime, endtime; starttime = DateTime.Now; string fqyzt = fla_502.Get_Struct(); if (fqyzt.Contains("失败")) { Msg(labelMsg, panelMsg, "废气仪通讯异常"); isRunning = false; return; } else if (fqyzt.Contains("预热")) { Msg(labelMsg, panelMsg, "废气仪正在预热,自检将中止"); isRunning = false; return; } else { Msg(labelMsg, panelMsg, "废气仪通讯正常"); } Thread.Sleep(500); Msg(labelMsg, panelMsg, "堵住探头进气口后点击\"确定\"按钮进行检漏"); while (!isJLsure) { Thread.Sleep(100); } fla_502.Leak_check(); Thread.Sleep(100); if (equipconfig.Fqyxh == "fasm_5000") { int leaktest = 0; int leaktesting = 0; while (leaktesting == 0) { leaktesting = fla_502.waitSuccessAnswer(); Msg(labelMsg, panelMsg, "检漏中..." + leaktest.ToString() + "s"); leaktest++; Thread.Sleep(900); } if (leaktesting == 1) { Ref_Control_Text(LabelFQYJL, "√"); Msg(labelMsg, panelMsg, "检漏完毕"); //leaktesting = true; } else if (leaktesting == -1) { Ref_Control_Text(LabelFQYJL, "×"); Msg(labelMsg, panelMsg, "检漏完毕"); //leaktesting = true; } else { Ref_Control_Text(LabelFQYJL, "×"); Msg(labelMsg, panelMsg, "检漏失败"); isfqycheckresult = false; } } else if (equipconfig.Fqyxh == "fla_502") { int leaktest = 0; bool leaktesting = false; while (!leaktesting) { string leakstring = fla_502.Get_fla502leckStruct(); if (leakstring == "无泄漏") { Ref_Control_Text(LabelFQYJL, "√"); Msg(labelMsg, panelMsg, "检漏完毕"); leaktesting = true; } else if (leakstring == "泄漏超标") { Ref_Control_Text(LabelFQYJL, "×"); Msg(labelMsg, panelMsg, "检漏完毕"); isfqycheckresult = false; leaktesting = true; } else { Msg(labelMsg, panelMsg, "检漏中..." + leaktest.ToString() + "s"); leaktest++; Thread.Sleep(900); } } } else if (equipconfig.Fqyxh.ToLower() == "cdf5000") { int leaktest = 0; bool leaktesting = false; while (!leaktesting) { string leakstring = fla_502.Get_fla502leckStruct(); if (leakstring == "无泄漏") { Ref_Control_Text(LabelFQYJL, "√"); Msg(labelMsg, panelMsg, "检漏完毕"); leaktesting = true; } else if (leakstring == "泄漏超标") { Ref_Control_Text(LabelFQYJL, "×"); Msg(labelMsg, panelMsg, "检漏完毕"); isfqycheckresult = false; leaktesting = true; } else { Msg(labelMsg, panelMsg, "检漏中..." + leaktest.ToString() + "s"); leaktest++; Thread.Sleep(900); } } } else if (equipconfig.Fqyxh != "fla_501" && equipconfig.Fqyxh != "mqw_511") { int leaktest = 0; bool leaktesting = false; while (!leaktesting) { string leakstring = fla_502.Get_leakTestStruct(); if (leakstring == "无泄漏") { Ref_Control_Text(LabelFQYJL, "√"); Msg(labelMsg, panelMsg, "检漏完毕"); leaktesting = true; } else if (leakstring == "泄漏超标") { Ref_Control_Text(LabelFQYJL, "×"); Msg(labelMsg, panelMsg, "检漏完毕"); isfqycheckresult = false; leaktesting = true; } else { Msg(labelMsg, panelMsg, "检漏中..." + leaktest.ToString() + "s"); leaktest++; Thread.Sleep(900); } } } Ref_Control_Text(button1, "开始检漏"); } }