BrrrBayBay.PwmLogic.MainForm.updateConnectionState C# (CSharp) Метод

updateConnectionState() приватный Метод

Updates the Form with the current connected state
private updateConnectionState ( ) : void
Результат void
        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;
            }
        }