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

OnButtonClick() private method

private OnButtonClick ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
return void
        private void OnButtonClick(object sender, MouseEventArgs e)
        {
            bool showingContextMenu = false;

            // Do we need to show a drop down menu?
            if (!Splitter || (Splitter && _drawButton.SplitRectangle.Contains(e.Location)))
                showingContextMenu = ShowDropDown();
            else
            {
                // Raise the standard click event
                OnClick(EventArgs.Empty);

                // Raise event to indicate it was a mouse activated click
                OnMouseClick(e);
            }

            // If not showing a context menu then perform cleanup straight away
            if (!showingContextMenu)
                ContextMenuClosed();
        }