ComponentFactory.Krypton.Ribbon.KryptonRibbonGroupComboBoxDesigner.OnEnabled C# (CSharp) Méthode

OnEnabled() private méthode

private OnEnabled ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void
        private void OnEnabled(object sender, EventArgs e)
        {
            if ((_ribbonComboBox != null) && (_ribbonComboBox.Ribbon != null))
            {
                PropertyDescriptor propertyEnabled = TypeDescriptor.GetProperties(_ribbonComboBox)["Enabled"];
                bool oldValue = (bool)propertyEnabled.GetValue(_ribbonComboBox);
                bool newValue = !oldValue;
                _changeService.OnComponentChanged(_ribbonComboBox, null, oldValue, newValue);
                propertyEnabled.SetValue(_ribbonComboBox, newValue);
            }
        }