private void RefreshCommDevStatus() { if (this.tableLayoutPanel7.InvokeRequired) { DelegateRefreshCommDevStatus dlgt = new DelegateRefreshCommDevStatus(RefreshCommDevStatus); this.Invoke(dlgt, null); } else { bool[] conn = null; presenter.GetCommDevStatus(ref conn); for (int i = 0; i < conn.Count(); i++) { string picboxName = "pictureBox" + (8 + i).ToString(); if (conn[i]) { this.tableLayoutPanel7.Controls[picboxName].BackColor = Color.Green; } else { this.tableLayoutPanel7.Controls[picboxName].BackColor = Color.Red; } } } }
private void RefreshStackerStatus() { if (this.groupBox1.InvokeRequired) { DelegateRefreshCommDevStatus dlgt = new DelegateRefreshCommDevStatus(RefreshStackerStatus); this.Invoke(dlgt, null); } else { string[] status = null; int errCode1 = 0; asrsCtl.StackDevice.GetRunningStatus(ref errCode1, ref status); if (errCode1 == 0) { this.label31.BackColor = Color.Transparent; } else { this.label31.BackColor = Color.Red; } this.label31.Text = status[0]; this.label32.Text = status[1]; this.label33.Text = status[2]; } }
private void RefreshCommDevStatus() { if (this.tableLayoutPanel7.InvokeRequired) { DelegateRefreshCommDevStatus dlgt = new DelegateRefreshCommDevStatus(RefreshCommDevStatus); this.Invoke(dlgt, null); } else { if (SysCfg.SysCfgModel.ZhuyeMode == 1) { this.label31.Text = "一次注液模式:一步完成"; } else if (SysCfg.SysCfgModel.ZhuyeMode == 2) { this.label31.Text = "一次注液模式:两步完成"; } else { this.label31.Text = "一次注液模式:无效模式"; } bool[] conn = null; presenter.GetCommDevStatus(ref conn); for (int i = 0; i < conn.Count(); i++) { string picboxName = "pictureBox" + (8 + i).ToString(); if (conn[i]) { this.tableLayoutPanel7.Controls[picboxName].BackColor = Color.Green; } else { this.tableLayoutPanel7.Controls[picboxName].BackColor = Color.Red; } } } }