private void updateConnectionState()
{
if (connector.Connected)
{
if (mainControl != null)
{
startPwmButton.Enabled = true;
stopPwmButton.Enabled = false;
}
else
{
startPwmButton.Enabled = false;
stopPwmButton.Enabled = false;
}
this.connectionStateLabel.Text = connectedString;
}
else
{
startPwmButton.Enabled = false;
stopPwmButton.Enabled = false;
this.connectionStateLabel.Text = notConnectedString;
}
}