public void Clear() { if (RTB.InvokeRequired) { RTB.Invoke((MethodInvoker) delegate { Clear(); }); } else { RTB.Clear(); } }
//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; } }
//Rich Text Box Refresh private void RTBRefresh() { RTB.Invoke(new MethodInvoker(delegate { RTB.Refresh(); })); }
//Rich Text Box Clear private void RTBClear() { RTB.Invoke(new MethodInvoker(delegate { RTB.Clear(); })); }