Exemple #1
0
 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;
             }
         }
     }
 }
Exemple #2
0
 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;
         }
     }
 }
Exemple #3
0
        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;
                }

            }
        }
Exemple #4
0
 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;
             }
         }
     }
 }