/// <summary>
 /// 添加文本内容
 /// </summary>
 /// <param name="s"></param>
 private void UIConsole(string s)
 {
     try
     {
         Invoke(new Action(() =>
         {
             if (!CBNotWrite.Checked)
             {
                 ConsoleLength += s.Length;  //更新文本长度
                 UICaption(Caption);         //更新标题,带文本长度提示
                 RTBConsole.AppendText(s);   //追加内容到文本框
                 RTBConsole.ScrollToCaret(); //滚动到底部
             }
         }));
     }
     catch { }
 }
Example #2
0
 public void WriteToBox(string message)
 {
     RTBConsole.AppendText("\r" + message);
 }