private void SetTxtBoxStatus(int errorCode) { if (this.textBoxStatus.InvokeRequired) { SetTxtBoxCallback d0 = new SetTxtBoxCallback(SetTxtBoxStatus); this.Invoke(d0, new object[] { errorCode }); } else { if (test_running) { textBoxStatus.Text = "TESTING"; textBoxStatus.BackColor = Color.Yellow; } else { if (errorCode != 0) { textBoxStatus.Text = textBoxStatus.Text = string.Format("{0:X} ", errorCode) + ": " + ErrorCode.ReportErrorCodes(errorCode); textBoxStatus.BackColor = Color.Red; } else { textBoxStatus.Text = "PASS"; textBoxStatus.BackColor = Color.Green; } } } }
private void SetTxtBoxStatus(int errorCode) { if (this.textBoxStatus.InvokeRequired) { SetTxtBoxCallback d0 = new SetTxtBoxCallback(SetTxtBoxStatus); this.Invoke(d0, new object[] { errorCode }); } else { if (errorCode != 0) { textBoxStatus.Clear(); textBoxStatus.Text = "Fail:" + errorCode.ToString() + "--" + ErrorCode.ReportErrorCodes(errorCode); textBoxStatus.BackColor = Color.Red; } else { textBoxStatus.Clear(); textBoxStatus.Text = "PASS"; textBoxStatus.BackColor = Color.Green; } } }