/// <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; OCRDelayBox.Focus();//设置完后应该转移焦点 WaitHotKeyDrawer.IsOpen = false; }
/// <summary> /// 键盘点击事件 /// </summary> void Hook_OnKeyBoardActivity(object sender, System.Windows.Forms.KeyEventArgs e) { HotKey.IsMouse = false; HotKey.KeyCode = e.KeyCode; HotKeyTag.Text = "已设置触发键 键值:" + HotKey.KeyCode; hook.Stop(); hook = null; OCRDelayBox.Focus();//设置完后应该转移焦点 WaitHotKeyDrawer.IsOpen = false; }