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();
}