示例#1
0
 public void MsgWrite(string msg)
 {
     if (!string.IsNullOrWhiteSpace(msg))
     {
         if (TB_Msg.InvokeRequired)
         {
             TB_Msg.BeginInvoke(new Action(() =>
             {
                 try
                 {
                     TB_Msg.AppendText(msg);
                     TB_Msg.AppendText(Environment.NewLine);
                 }
                 catch
                 {
                 }
             }));
         }
         else
         {
             try
             {
                 TB_Msg.AppendText(msg);
                 TB_Msg.AppendText(Environment.NewLine);
             }
             catch
             {
             }
         }
     }
 }
示例#2
0
 public void MsgClear()
 {
     if (TB_Msg.InvokeRequired)
     {
         TB_Msg.BeginInvoke(new Action(() => {
             TB_Msg.Clear();
         }));
     }
     else
     {
         TB_Msg.Clear();
     }
 }
示例#3
0
 public void MsgWrite(string msg)
 {
     if (TB_Msg.InvokeRequired)
     {
         TB_Msg.BeginInvoke(new Action(() => {
             TB_Msg.AppendText(msg);
             TB_Msg.AppendText(Environment.NewLine);
         }));
     }
     else
     {
         TB_Msg.AppendText(msg);
         TB_Msg.AppendText(Environment.NewLine);
     }
 }