Esempio n. 1
0
        private void SetGlobalHookEventResetHistoryHotkey()
        {
            if (!CXHotkey.IsValidHotkey(ResetHistoryHotkeyString))
            {
                return;
            }

            var onCombinationDictionary = new Dictionary <CXHotkeyCombination, Action>
            {
                { CXHotkeyCombination.FromString(ResetHistoryHotkeyString), () =>
                  {
                      _overlayService.ResetHistory();
                  } }
            };

            _globalResetHistoryHookEvent = Hook.GlobalEvents();
            _globalResetHistoryHookEvent.OnCXCombination(onCombinationDictionary);
        }
Esempio n. 2
0
        private void SetGlobalHookEventOverlayHotkey()
        {
            if (!CXHotkey.IsValidHotkey(OverlayHotkeyString))
            {
                return;
            }

            var onCombinationDictionary = new Dictionary <CXHotkeyCombination, Action>
            {
                { CXHotkeyCombination.FromString(OverlayHotkeyString), () =>
                  {
                      IsOverlayActive = !IsOverlayActive;
                  } }
            };

            _globalOverlayHookEvent = Hook.GlobalEvents();
            _globalOverlayHookEvent.OnCXCombination(onCombinationDictionary);
        }
Esempio n. 3
0
        private void SetGlobalHookEventCaptureHotkey()
        {
            if (!CXHotkey.IsValidHotkey(CaptureHotkeyString))
            {
                return;
            }

            var onCombinationDictionary = new Dictionary <CXHotkeyCombination, Action>
            {
                { CXHotkeyCombination.FromString(CaptureHotkeyString), () =>
                  {
                      if (!_dataOffsetRunning)
                      {
                          SetCaptureMode();
                      }
                  } }
            };

            _globalCaptureHookEvent = Hook.GlobalEvents();
            _globalCaptureHookEvent.OnCXCombination(onCombinationDictionary);
        }