Esempio n. 1
0
        private void WriteLog(string msg, Color col)
        {
            if (this.richTextBox_Resulst.InvokeRequired)
            {
                WriteTestLogDelegate d = new WriteTestLogDelegate(WriteLog);
                this.richTextBox_Resulst.Invoke(d, new object[] { msg, col });
            }
            else
            {
                this.richTextBox_Resulst.SelectionColor = col;

                this.richTextBox_Resulst.AppendText(string.Format("{0}\r\n", System.DateTime.Now));
                this.richTextBox_Resulst.AppendText(msg);
                this.richTextBox_Resulst.AppendText("\r\n");
                this.richTextBox_Resulst.ScrollToCaret();
            }
        }
Esempio n. 2
0
 private void WriteReportLog(string msg, Color col)
 {
     try
     {
         if (this.richTextBox_ReportResult.InvokeRequired)
         {
             WriteTestLogDelegate d = new WriteTestLogDelegate(WriteReportLog);
             this.richTextBox_Log.Invoke(d, new object[] { msg, col });
         }
         else
         {
             this.richTextBox_ReportResult.SelectionColor = col;
             this.richTextBox_ReportResult.AppendText(msg);
             this.richTextBox_ReportResult.AppendText("\r\n");
             this.richTextBox_ReportResult.ScrollToCaret();
         }
     }
     catch (Exception)
     {
     }
 }
Esempio n. 3
0
 private void WriteTestLog(string msg, Color col)
 {
     try
     {
         if (this.richTextBox_Log.InvokeRequired)
         {
             WriteTestLogDelegate d = new WriteTestLogDelegate(WriteTestLog);
             this.richTextBox_Log.Invoke(d, new object[] { msg, col });
         }
         else
         {
             this.richTextBox_Log.SelectionColor = col;
             string log = msg;
             this.richTextBox_Log.AppendText(string.Format("{0}:", System.DateTime.Now));
             this.richTextBox_Log.AppendText(log);
             this.richTextBox_Log.AppendText("\r\n");
             this.richTextBox_Log.ScrollToCaret();
             m_LogRecord = m_LogRecord + log + "\n";
         }
     }
     catch (Exception)
     {
     }
 }