private void tim_Top10_Tick(object sender, EventArgs e) { index++; if (index < 6) { return; } gv_list.Enabled = true; var cyvalue = _tcpClient.GetCYXS(ref IsSeccess); if (!IsSeccess) { //todo // MessageBox.Show("获取差压异常--气密前十!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (index >= 11) { //标记计时结束 if (kpa_Level == PublicEnum.Kpa_Level.liter100) { if (cyvalue > 0) { Z_S_100Stop = false; } else { F_S_100Stop = false; } } else if (kpa_Level == PublicEnum.Kpa_Level.liter150) { if (cyvalue > 0) { Z_S_150Stop = false; } else { F_S_150Stop = false; } } else if (kpa_Level == PublicEnum.Kpa_Level.drop100) { if (cyvalue > 0) { Z_J_100Stop = false; } else { F_J_100Stop = false; } } this.tim_Top10.Enabled = false; index = 0; gv_list.Enabled = false; return; } //获取风速 var fsvalue = _tcpClient.GetFSXS(ref IsSeccess); if (!IsSeccess) { //MessageBox.Show("获取风速异常!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (rdb_fjstl.Checked) { if (kpa_Level == PublicEnum.Kpa_Level.liter100) { if (cyvalue > 0) { pressure.AddZYFJ(fsvalue, PublicEnum.Kpa_Level.liter100); } else { pressure.AddFYFJ(fsvalue, PublicEnum.Kpa_Level.liter100); } } else if (kpa_Level == PublicEnum.Kpa_Level.liter150) { if (cyvalue > 0) { pressure.AddZYFJ(fsvalue, PublicEnum.Kpa_Level.liter150); } else { pressure.AddFYFJ(fsvalue, PublicEnum.Kpa_Level.liter150); } } else if (kpa_Level == PublicEnum.Kpa_Level.drop100) { if (cyvalue > 0) { pressure.AddZYFJ(fsvalue, PublicEnum.Kpa_Level.drop100); } else { pressure.AddFYFJ(fsvalue, PublicEnum.Kpa_Level.drop100); } } } else if (rdb_zdstl.Checked) { if (kpa_Level == PublicEnum.Kpa_Level.liter100) { if (cyvalue > 0) { pressure.AddZYZD(fsvalue, PublicEnum.Kpa_Level.liter100); } else { pressure.AddFYZD(fsvalue, PublicEnum.Kpa_Level.liter100); } } else if (kpa_Level == PublicEnum.Kpa_Level.liter150) { if (cyvalue > 0) { pressure.AddZYZD(fsvalue, PublicEnum.Kpa_Level.liter150); } else { pressure.AddFYZD(fsvalue, PublicEnum.Kpa_Level.liter150); } } else if (kpa_Level == PublicEnum.Kpa_Level.drop100) { if (cyvalue > 0) { pressure.AddZYZD(fsvalue, PublicEnum.Kpa_Level.drop100); } else { pressure.AddFYZD(fsvalue, PublicEnum.Kpa_Level.drop100); } } } }