コード例 #1
0
 private void LoginPage_Accelerator(object sender, AcceleratorEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         this.buttonLogin.PerformClick();
     }
 }
コード例 #2
0
 private void SimpleChatClient_Accelerator(object sender, AcceleratorEventArgs e)
 {
     if (this.textBoxName.Focused)
     {
         this.buttonJoin.PerformClick();
     }
     else if (this.textBoxMessage.Focused)
     {
         this.buttonSend.PerformClick();
     }
 }
コード例 #3
0
        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;
            }
        }