protected override void OnClick(EventArgs e)
{
if (AutoCheck)
{
// Change state based on the current state
switch (CheckState)
{
case CheckState.Unchecked:
CheckState = CheckState.Checked;
break;
case CheckState.Checked:
CheckState = (ThreeState ? CheckState.Indeterminate : CheckState.Unchecked);
break;
case CheckState.Indeterminate:
CheckState = CheckState.Unchecked;
break;
}
}
base.OnClick(e);
// If we have an attached command then execute it
if (KryptonCommand != null)
KryptonCommand.PerformExecute();
}