ComponentFactory.Krypton.Toolkit.KryptonCheckSet.CheckButtonRemoved C# (CSharp) Method

CheckButtonRemoved() private method

private CheckButtonRemoved ( KryptonCheckButton checkButton ) : void
checkButton KryptonCheckButton
return void
        private void CheckButtonRemoved(KryptonCheckButton checkButton)
        {
            // Unhook from monitoring events
            checkButton.CheckedChanging -= new CancelEventHandler(OnCheckedChanging);
            checkButton.CheckedChanged -= new EventHandler(OnCheckedChanged);

            // If the removed button is the currently checked one
            if (_checkedButton == checkButton)
            {
                // Then we no longer have a currently checked button
                _checkedButton = null;

                // Generate event to show the value has changed
                OnCheckedButtonChanged(EventArgs.Empty);
            }
        }

Usage Example

Esempio n. 1
0
            /// <summary>
            /// Occurs when the collection is about to be cleared.
            /// </summary>
            protected override void OnClear()
            {
                foreach (KryptonCheckButton checkButton in base.List)
                {
                    _owner.CheckButtonRemoved(checkButton);
                }

                base.OnClear();
            }
All Usage Examples Of ComponentFactory.Krypton.Toolkit.KryptonCheckSet::CheckButtonRemoved