public override void OnKeyDown(Keys k) { FireKeyDown(k); if (k == CloseKey) { CloseButton.DoClick(); } else if (k == ConfirmKey) { ButtonOk.DoClick(); } }
public override void OnKeyDown(Keys k) { FireKeyDown(k); switch (k) { case Keys.Escape: if (CloseButton.Visible) { CloseButton.DoClick(); } break; case Keys.Enter: if (ButtonOk.Visible) { ButtonOk.DoClick(); } break; } }