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); }
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); }
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); }