private void errorTimer_Tick(object sender, EventArgs e) { if (errorList.Count == 0 && alarmForm != null && alarmForm.Visible) { alarmForm.Close(); } if (errorList.Count > 0 && (alarmForm == null || !alarmForm.Visible)) { alarmForm = new Alarm(); alarmForm.Show(); } //报警显示 if (alarmForm != null && alarmForm.Visible) { alarmForm.showAlram(errorList); } /**** * if (errorList.Count > 0) * { * if (errorId >= errorList.Count) * { * errorId = 0; * } * * infoLbl.Text = errorList[errorId]; * * errorId++; * * } * else infoLbl.Text = ""; ***/ }