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; }
public MouseHookHotkey([NotNull] MouseHookHotkey hotkey) : base(hotkey) { this._mouseButton = hotkey._mouseButton; this.isValid = hotkey.isValid; this.HotkeyVisitor = hotkey.HotkeyVisitor; }
public GenericHotkeyProxy(MouseHookHotkey mouseHookHotkey) : this((IHotkey)mouseHookHotkey) { }