private void LoginPage_Accelerator(object sender, AcceleratorEventArgs e) { if (e.KeyCode == Keys.Enter) { this.buttonLogin.PerformClick(); } }
private void SimpleChatClient_Accelerator(object sender, AcceleratorEventArgs e) { if (this.textBoxName.Focused) { this.buttonJoin.PerformClick(); } else if (this.textBoxMessage.Focused) { this.buttonSend.PerformClick(); } }
private void ColumnFilterPanel_Accelerator(object sender, AcceleratorEventArgs e) { switch (e.KeyCode) { case Keys.Return: ok_Click(this.ok, EventArgs.Empty); break; case Keys.Escape: cancel_Click(this.cancel, EventArgs.Empty); break; } }