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

OnClickMoreColors() private method

private OnClickMoreColors ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void OnClickMoreColors(object sender, EventArgs e)
        {
            // Give user a chance to cancel showing the standard more colors dialog
            CancelEventArgs cea = new CancelEventArgs();
            OnMoreColors(cea);

            // If not instructed to cancel then...
            if (!cea.Cancel)
            {
                // Use a standard color dialog for the selection of custom colors
                ColorDialog cd = new ColorDialog();
                cd.Color = SelectedColor;
                cd.FullOpen = true;

                // Only if user selected a value do we want to use it
                if (cd.ShowDialog() == DialogResult.OK)
                    SelectedColor = cd.Color;
            }
        }