ComponentFactory.Krypton.Toolkit.KryptonColorButton.OnClick C# (CSharp) Method

OnClick() protected method

Raises the Click event.
protected OnClick ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void
        protected override void OnClick(EventArgs e)
        {
            // Find the form this color button is on
            Form owner = FindForm();

            // If we find a valid owner
            if (owner != null)
            {
                // Update owner with our dialog result setting
                owner.DialogResult = DialogResult;
            }

            // Let base class fire standard event
            base.OnClick(e);

            // If we have an attached command then execute it
            if (KryptonCommand != null)
                KryptonCommand.PerformExecute();
        }