}// end method DisplayMessage public void SendCommand(string Command) { if (PortLG.IsOpen) { PortLG.WriteLine(Command); } }
private void btnStop_Click(object sender, EventArgs e) { ClientStatus.Commands = false; SendCommand("ka 00 00"); PortLG.Close(); btnStart.Enabled = true; btnStop.Enabled = false; Panel2.Enabled = false; fraLGControl.Enabled = false; }
private void btnStart_Click(object sender, EventArgs e) { try { //ClientStatus.Commands = true; //ClientStatus.Blink = true; PortLG.PortName = cboPorts.Text; PortLG.Open(); btnStart.Enabled = false; btnStop.Enabled = true; Panel2.Enabled = true; fraLGControl.Enabled = true; SendCommand("ka 00 01"); } catch (Exception) { } }