/// <summary> /// 控制气密性能检测按钮显示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tim_getType_Tick(object sender, EventArgs e) { if (_tcpClient.IsTCPLink) { if (airtightPropertyTest == null) { return; } if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.ZReady) { int value = _tcpClient.GetZYYBJS(ref IsSeccess); if (!IsSeccess) { //MessageBox.Show("正压预备结束状态异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (value == 3) { airtightPropertyTest = PublicEnum.AirtightPropertyTest.Stop; lbl_setYL.Text = "0"; OpenBtnType(); } } if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.ZStart) { double value = _tcpClient.GetZYKSJS(ref IsSeccess); if (!IsSeccess) { // MessageBox.Show("正压开始结束状态异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (value >= 15) { airtightPropertyTest = PublicEnum.AirtightPropertyTest.Stop; IsStart = false; Thread.Sleep(1000); lbl_setYL.Text = "0"; OpenBtnType(); } } if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.FReady) { int value = _tcpClient.GetFYYBJS(ref IsSeccess); if (!IsSeccess) { // MessageBox.Show("负压预备结束状态异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (value == 3) { airtightPropertyTest = PublicEnum.AirtightPropertyTest.Stop; lbl_setYL.Text = "0"; OpenBtnType(); } } if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.FStart) { double value = _tcpClient.GetFYKSJS(ref IsSeccess); if (!IsSeccess) { MessageBox.Show("负压开始结束状态异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (value >= 15) { IsStart = false; Thread.Sleep(1000); lbl_setYL.Text = "0"; OpenBtnType(); } } } }