Example #1
0
 /// <summary>
 /// 为日志框追加数据
 /// </summary>
 /// <param name="text"></param>
 private void AppendText(CmdForm cmdoom, string text)
 {
     if (cmdoom.cmdLogTextArea.InvokeRequired)
     {
         while (!cmdoom.cmdLogTextArea.IsHandleCreated)
         {
             if (cmdoom.cmdLogTextArea.Disposing || cmdoom.cmdLogTextArea.IsDisposed)
             {
                 return;
             }
         }
         UpdateLog set = delegate()
         {
             cmdoom.cmdLogTextArea.AppendText(/*Environment.NewLine + */ text);
         };
         if (cmdoom.Disposing || cmdoom.IsDisposed)
         {
             return;
         }
         cmdoom.Invoke(set);
     }
     else
     {
         cmdoom.cmdLogTextArea.AppendText(text);
     }
 }