예제 #1
0
 private void ShowText(RichTextBox rb, string msg)
 {
     if (rb.InvokeRequired)
     {
         RichBoxCallBack rbcb = new RichBoxCallBack(ShowText);
         this.Invoke(rbcb, new object[] { rb, msg });
     }
     else
     {
         rb.AppendText(System.DateTime.Now.ToString() + ": " + msg + "\n");
     }
 }
예제 #2
0
 private void ShowText(RichTextBox rb, string msg)
 {
     if (rb.InvokeRequired)
     {
         RichBoxCallBack rbcb = new RichBoxCallBack(ShowText);
         this.Invoke(rbcb, new object[] { rb, msg });
     }
     else
     {
         if (rb.TextLength > 5000)
         {
             rb.Clear();
         }
         rb.AppendText(System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + ": " + msg + "\r\n");
     }
 }
예제 #3
0
 private void ShowText(string msg)
 {
     if (rtb_showinfo.InvokeRequired)
     {
         RichBoxCallBack rb = new RichBoxCallBack(ShowText);
         this.Invoke(rb, new object[] { msg });
     }
     else
     {
         if (rtb_showinfo.Text.Length > 1500)
         {
             rtb_showinfo.Clear();
         }
         if (!System.String.IsNullOrEmpty(msg))
         {
             rtb_showinfo.AppendText(msg + "\r\n");
         }
     }
 }