Пример #1
0
 private void AddLog(String Message)
 {
     if (this.rtb_log.InvokeRequired)
     {
         AddlogEventHandler evt = new AddlogEventHandler(AddLog);
         this.Invoke(evt, new object[] { Message });
     }
     else
     {
         if (Message == null)
         {
             this.rtb_log.AppendText("Device not connected.");
         }
         else
         {
             this.rtb_log.AppendText(":" + Message);
         }
     }
 }
 private void AddLog(String Message)
 {
     if (this.rtb_log.InvokeRequired)
     {
         AddlogEventHandler evt = new AddlogEventHandler(AddLog);
         this.Invoke(evt, new object[] { Message });
     }
     else
     {
         if (Message == null)
         {
             this.rtb_log.AppendText("Device not connected.");
         }
         else
         {
             this.rtb_log.AppendText(":" + Message);
         }
     }
 }