private void paintBackgroundColor(statusType st) { if (this.InvokeRequired) { paintBackgroundColorDlgt InvokepaintBackgroundColor = new paintBackgroundColorDlgt(paintBackgroundColor); this.Invoke(InvokepaintBackgroundColor, new object[] { st }); } else { switch (st) { case statusType.START: this.BackColor = Color.White; break; case statusType.FAIL: this.BackColor = Color.Red; break; case statusType.PASS: this.BackColor = Color.LightGreen; break; default: break; } this.Refresh(); } }
private void paintBackgroundColor(statusType st) { if (this.InvokeRequired) { paintBackgroundColorDlgt InvokepaintBackgroundColor = new paintBackgroundColorDlgt(paintBackgroundColor); this.Invoke(InvokepaintBackgroundColor, new object[] { st }); } else { switch (st) { case statusType.START: this.BackColor = Color.White; //tbx_SerialWrite.Enabled = false; m_sTagUIDstring = ""; m_sSerialNumber = ""; CleanIVCurves(); // add by genhong.hu ON 2018-01-06 ShowModuleInfo(false); // add by genhong.hu ON 2018-01-06 //SetLabelStatus(statusType.START); break; case statusType.FAIL: this.BackColor = Color.Red; tbx_SerialWrite.Enabled = true; SetLabelStatus(statusType.FAIL); timer.Change(5000, System.Threading.Timeout.Infinite); break; case statusType.PASS: this.BackColor = Color.LightGreen; tbx_SerialWrite.Enabled = true; SetLabelStatus(statusType.PASS); timer.Change(5000, System.Threading.Timeout.Infinite); break; default: break; } this.Refresh(); } }