void LogGcode(object sender, object vars)
 {
     if (this.txtSent.InvokeRequired)
     {
         LogGcodeCallback d = new LogGcodeCallback(LogGcode);
         this.Invoke(d, new object[] { sender, vars });
     }
     else
     {
         string txt = (String)vars;
         if (checkLogAll.Checked && (txt[0] != ';'))
             txtSent.Text = txt + txtSent.Text;
     }
 }
 void LogGcode(object sender, object vars)
 {
     if (this.txtSent.InvokeRequired)
     {
         LogGcodeCallback d = new LogGcodeCallback(LogGcode);
         this.Invoke(d, new object[] { sender, vars });
     }
     else
     {
         string txt = (String)vars;
         if (checkLogAll.Checked && (txt[0] != ';'))
         {
             txtSent.Text = txt + txtSent.Text;
         }
     }
 }