ComponentFactory.Krypton.Toolkit.MenuColorBlockController.PressColorBlock C# (CSharp) Method

PressColorBlock() private method

private PressColorBlock ( ) : void
return void
        private void PressColorBlock()
        {
            if (Click != null)
                Click(this, EventArgs.Empty);

            // Should we automatically try and close the context menu stack
            if (_menuColorBlock.KryptonContextMenuColorColumns.AutoClose)
            {
                // Is the menu capable of being closed?
                if (_menuColorBlock.CanCloseMenu)
                {
                    // Ask the original context menu definition, if we can close
                    CancelEventArgs cea = new CancelEventArgs();
                    _menuColorBlock.Closing(cea);

                    if (!cea.Cancel)
                    {
                        // Close the menu from display and pass in the item clicked as the reason
                        _menuColorBlock.Close(new CloseReasonEventArgs(ToolStripDropDownCloseReason.ItemClicked));
                    }
                }
            }

            UpdateTarget();
            PerformNeedPaint();
        }