TS-50 IF and FA commands

This commit is contained in:
UzixLS
2016-05-02 15:24:29 +03:00
parent 2a72da6517
commit c995b5a3e8
10 changed files with 82 additions and 38 deletions

View File

@ -45,7 +45,11 @@ namespace SDRSharp.SerialController
}
void CbEnableClick(object sender, EventArgs e)
{
cbEnable.Checked = cbEnable.Checked ? _serialPort.openPort(comboPorts.Text) : _serialPort.closePort();
if (! _serialPort.IsOpen)
_serialPort.openPort(comboPorts.Text);
else
_serialPort.closePort();
cbEnable.Checked = _serialPort.IsOpen;
comboPorts.Enabled = !cbEnable.Checked;
btnRefreshPorts.Enabled = !cbEnable.Checked;
cbLogToFile.Enabled = !cbEnable.Checked;