/// <summary> /// 差压读取 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tim_qm_Tick(object sender, EventArgs e) { if (_tcpClient.IsTCPLink) { var value = int.Parse(_tcpClient.GetCYXS(ref IsSeccess).ToString()); if (!IsSeccess) { //todo //MessageBox.Show("获取差压异常--气密!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //lbl_dqyl.Text = value.ToString(); //读取设定值 if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.ZStart) { double yl = _tcpClient.GetZYYBYLZ(ref IsSeccess, "ZYKS"); if (!IsSeccess) { // MessageBox.Show("获取正压预备异常!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } lbl_setYL.Text = yl.ToString(); } else if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.FStart) { double yl = _tcpClient.GetZYYBYLZ(ref IsSeccess, "FYKS"); if (!IsSeccess) { // MessageBox.Show("获取负压开始异常!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } lbl_setYL.Text = "-" + yl.ToString(); } else if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.Stop) { lbl_setYL.Text = "0"; } if (IsStart) { if (this.tim_Top10.Enabled == false) { SetCurrType(value); } } } }
/// <summary> /// 差压读取 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tim_qm_Tick(object sender, EventArgs e) { if (_tcpClient.IsTCPLink) { var value = int.Parse(_tcpClient.GetCYXS(ref IsSeccess).ToString()); if (!IsSeccess) { return; } // lbl_dqyl.Text = value.ToString(); //读取设定值 if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.ZStart) { double yl = _tcpClient.GetZYYBYLZ(ref IsSeccess, "ZYKS"); if (!IsSeccess) { return; } lbl_setYL.Text = yl.ToString(); } else if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.FStart) { double yl = _tcpClient.GetZYYBYLZ(ref IsSeccess, "FYKS"); if (!IsSeccess) { return; } lbl_setYL.Text = "-" + yl.ToString(); } else if (airtightPropertyTest == PublicEnum.AirtightPropertyTest.Stop) { lbl_setYL.Text = "0"; } if (IsStart) { if (this.tim_Top10.Enabled == false) { SetCurrType(value); } } } }