private void btn_ready_Click(object sender, EventArgs e) { double yl = _tcpClient.GetSMYBSDYL(ref IsSeccess, "SMYB"); if (!IsSeccess) { MessageBox.Show("读取设定值异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification); return; } lbl_sdyl.Text = yl.ToString(); this.btn_ready.Enabled = false; this.btn_start.Enabled = false; this.btn_next.Enabled = false; this.btn_next.Enabled = false; var res = _tcpClient.SetSMYB(); if (!res) { MessageBox.Show("水密预备异常", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification); return; } waterTightPropertyTest = PublicEnum.WaterTightPropertyTest.Ready; }