コード例 #1
0
        private void EventBinding()
        {
            MainWin.StateChanged            += MainWindowState;
            MainWin.KeyCombSelect.GotFocus  += KeyCombSelect_GotFocus;
            MainWin.KeyCombSelect.LostFocus += KeyCombSelect_LostFocus;
            MainWin.ChangeLogWay.Click      += ChangeLogWay_Click;

            switch (Properties.Settings.Default.TranslationWay)
            {
            case "Clipboard":
                KeyHook = new KeyboardHooking(new NotificatorClipboardText());
                break;

            case "Screen":
                KeyHook = new KeyboardHooking(new NotificatorScreenText());
                break;
            }
            KeyHook.Start(SettingsManager.KeyFromString(Properties.Settings.Default.KeyComb));
        }
コード例 #2
0
 private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
 {
     //disable keyboard intercepts
     KeyboardHooking.ReleaseHook();
 }
コード例 #3
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     //enable keyboard intercepts
     KeyboardHooking.SetHook();
 }