コード例 #1
0
        internal GlobalHotKeyManager(GlobalHotKeyEvents globalHotKeyEvents)
        {
            _globalHotKeyEvents = globalHotKeyEvents;

            _listener            = new LowLevelKeyboardListener();
            _listener.OnKeyDown += _listener_OnKeyDown;
            _listener.OnKeyUp   += _listener_OnKeyUp;

            _listener.HookKeyboard();
        }
コード例 #2
0
ファイル: StartUpWindow.xaml.cs プロジェクト: djserega/Helper
        public StartUpWindow()
        {
            InitializeComponent();

            CheckCommandLineArgs();

            _globalHotKeyEvents = new GlobalHotKeyEvents();
            _globalHotKeyEvents.GlobalHotKeyOpenFormMessage += _globalHotKeyEvents_GlobalHotKeyOpenFormMessage;

            _notifyIconEvents = new NotifyIconEvents();
            _notifyIconEvents.NotifyIconOpenFormEvent        += _notifyIconEvents_NotifyIconOpenFormEvent;
            _notifyIconEvents.NotifyIconShowFormMessageEvent += _notifyIconEvents_NotifyIconShowFormMessageEvent;
            _notifyIconEvents.NotifyIconExitAppEvent         += _notifyIconEvents_NotifyIconExitAppEvent;

            _notify = new Notify(_notifyIconEvents);

            _globalHotKeyManager = new GlobalHotKeyManager(_globalHotKeyEvents);
        }