private void rbDisconnect_Click(object sender, EventArgs e)
 {
     this.service.SerialPortDisconnect(GlobalValiables.SerialPort);
     DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Warning, "Port closed", "Serial port successfully closed");
     InitializeButtons();
     Close();
 }
 private void rbConnect_Click(object sender, EventArgs e)
 {
     GlobalValiables.SerialPort = this.service.SerialPortConnect((string)this.rddlComPort.SelectedValue, (int)this.rddlBaudRate.SelectedValue);
     DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Positive, "Port opened", "Serial port successfully opened");
     InitializeButtons();
     Close();
 }
Example #3
0
 private void OnAlarmReceived(object source, string data)
 {
     if (GlobalValiables.AlarmErrorThrown == false)
     {
         SystemHelper.InvokeMethod(this,
                                   delegate { DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Error, "Alert", "GRBL has thrown alarm alert, plesa handle this error to proced with your project"); });
         GlobalValiables.AlarmErrorThrown = true;
     }
     else
     {
     }
 }
 private void radButton1_Click(object sender, System.EventArgs e)
 {
     DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Warning, "Work Sceduled", "Your work will start at " + this.radTimePicker1.Text);
     Close();
 }