コード例 #1
0
 public void Clear()
 {
     if (RTB.InvokeRequired)
     {
         RTB.Invoke((MethodInvoker) delegate { Clear(); });
     }
     else
     {
         RTB.Clear();
     }
 }
コード例 #2
0
        //Rich Text Box AppendText
        private void RTBAppendText(string Text, TextColors Color)
        {
            switch (Color)
            {
            case TextColors.Black:
                RTB.Invoke(new MethodInvoker(delegate { RTB.SelectionColor = System.Drawing.Color.Black; RTB.AppendText(Text); }));
                break;

            case TextColors.Green:
                RTB.Invoke(new MethodInvoker(delegate { RTB.SelectionColor = System.Drawing.Color.Green; RTB.AppendText(Text); }));
                break;

            case TextColors.Red:
                RTB.Invoke(new MethodInvoker(delegate { RTB.SelectionColor = System.Drawing.Color.Red; RTB.AppendText(Text); }));
                break;

            default:
                break;
            }
        }
コード例 #3
0
 //Rich Text Box Refresh
 private void RTBRefresh()
 {
     RTB.Invoke(new MethodInvoker(delegate { RTB.Refresh(); }));
 }
コード例 #4
0
 //Rich Text Box Clear
 private void RTBClear()
 {
     RTB.Invoke(new MethodInvoker(delegate { RTB.Clear(); }));
 }