Ejemplo n.º 1
0
 public Switcher()
 {
     kbdHook = new KeyboardHook();
     kbdHook.KeyboardEvent += ProcessKeyPress;
     mouseHook = new MouseHook();
     mouseHook.MouseEvent += ProcessMousePress;
 }
Ejemplo n.º 2
0
 public Switcher(ISettings settings)
 {
     this.settings = settings;
     kbdHook = new KeyboardHook();
     kbdHook.KeyboardEvent += ProcessKeyPress;
     mouseHook = new MouseHook();
     mouseHook.MouseEvent += ProcessMousePress;
 }
Ejemplo n.º 3
0
 public SettingsForm(Settings settings)
 {
     this.settings = settings;
     currentTextBox = null;
     kbdHook = new KeyboardHook();
     kbdHook.KeyboardEvent += kbdHook_KeyboardEvent;
     InitializeComponent();
     InitializeValues();
 }
Ejemplo n.º 4
0
 void InitializeHotkeyBoxes()
 {
     textBoxSwitchHotkey.GotFocus        += (s, e) => currentHotkeyType = HotKeyType.Switch;
     textBoxSwitchHotkey.Enter           += (s, e) => currentHotkeyType = HotKeyType.Switch;
     textBoxSwitchHotkey.LostFocus       += (s, e) => ApplyCurrentHotkey();
     textBoxSwitchHotkey.Leave           += (s, e) => ApplyCurrentHotkey();
     textBoxConvertHotkey.GotFocus       += (s, e) => currentHotkeyType = HotKeyType.Convert;
     textBoxConvertHotkey.Enter          += (s, e) => currentHotkeyType = HotKeyType.Convert;
     textBoxConvertHotkey.LostFocus      += (s, e) => ApplyCurrentHotkey();
     textBoxConvertHotkey.Leave          += (s, e) => ApplyCurrentHotkey();
     textBoxSwitchLayoutHotkey.GotFocus  += (s, e) => currentHotkeyType = HotKeyType.SwitchLayout;
     textBoxSwitchLayoutHotkey.Enter     += (s, e) => currentHotkeyType = HotKeyType.SwitchLayout;
     textBoxSwitchLayoutHotkey.LostFocus += (s, e) => ApplyCurrentHotkey();
     textBoxSwitchLayoutHotkey.Leave     += (s, e) => ApplyCurrentHotkey();
     currentHotkeyType      = HotKeyType.None;
     kbdHook                = new KeyboardHook();
     kbdHook.KeyboardEvent += kbdHook_KeyboardEvent;
 }
Ejemplo n.º 5
0
 void InitializeHotkeyBoxes()
 {
     textBoxSwitchHotkey.GotFocus += (s, e) => currentHotkeyType = HotKeyType.Switch;
     textBoxSwitchHotkey.Enter += (s, e) => currentHotkeyType = HotKeyType.Switch;
     textBoxSwitchHotkey.LostFocus += (s, e) => ApplyCurrentHotkey();
     textBoxSwitchHotkey.Leave += (s, e) => ApplyCurrentHotkey();
     textBoxConvertHotkey.GotFocus += (s, e) => currentHotkeyType = HotKeyType.Convert;
     textBoxConvertHotkey.Enter += (s, e) => currentHotkeyType = HotKeyType.Convert;
     textBoxConvertHotkey.LostFocus += (s, e) => ApplyCurrentHotkey();
     textBoxConvertHotkey.Leave += (s, e) => ApplyCurrentHotkey();
     currentHotkeyType = HotKeyType.None;
     kbdHook = new KeyboardHook();
     kbdHook.KeyboardEvent += kbdHook_KeyboardEvent;
 }