예제 #1
0
        public GenericHotkeyProxy(IHotkey hotkey)
        {
            if (hotkey is KeyboardHotkey kbdHotkey)
            {
                this.Type            = HotkeyType.Keyboard;
                this.keyboardHotkey  = new KeyboardHotkey(kbdHotkey);
                this.mouseHookHotkey = new MouseHookHotkey(hotkey);
            }
            else if (hotkey is MouseHookHotkey mhHotkey)
            {
                this.Type            = HotkeyType.MouseHook;
                this.mouseHookHotkey = new MouseHookHotkey(mhHotkey);
                this.keyboardHotkey  = new KeyboardHotkey(hotkey);
            }
            else
            {
                this.Type            = HotkeyType.Undefined;
                this.keyboardHotkey  = hotkey != null ? new KeyboardHotkey(hotkey) : new KeyboardHotkey();
                this.mouseHookHotkey = hotkey != null ? new MouseHookHotkey(hotkey) : new MouseHookHotkey();
            }

            App.Container.BuildUp(this.keyboardHotkey, this.mouseHookHotkey);

            this.keyboardHotkey.PropertyChanged  += this.KeyboardHotkey_PropertyChanged;
            this.mouseHookHotkey.PropertyChanged += this.MouseHookHotkey_PropertyChanged;
        }
예제 #2
0
        public MouseHookHotkey([NotNull] MouseHookHotkey hotkey) : base(hotkey)
        {
            this._mouseButton = hotkey._mouseButton;
            this.isValid      = hotkey.isValid;

            this.HotkeyVisitor = hotkey.HotkeyVisitor;
        }
예제 #3
0
 public GenericHotkeyProxy(MouseHookHotkey mouseHookHotkey) : this((IHotkey)mouseHookHotkey)
 {
 }