Exemple #1
0
        private void Caption_OnKeyUp(object sender, KeyEventArgs e)
        {
            var textBox = sender as CheckBox;

            if (e.Key == Key.Enter)
            {
                ConfirmBtn.Focus();
                Activate();
            }
        }
Exemple #2
0
 /// <summary>
 /// 键盘点击事件
 /// </summary>
 void Hook_OnKeyBoardActivity(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     HotKey.IsMouse = false;
     HotKey.KeyCode = e.KeyCode;
     HotKeyTag.Text = Application.Current.Resources["ChooseHotKeyPage_HotKeyTag"].ToString() + HotKey.KeyCode;
     hook.Stop();
     hook = null;
     ConfirmBtn.Focus();//设置完后应该转移焦点
     WaitHotKeyDrawer.IsOpen = false;
 }