Пример #1
0
        private void GlobalHookKeyUp(object sender, KeyEventArgs e)
        {
            var config      = GetCurrentConfiguration();
            var combination = e.Serialize();

            _userLoggingService.LogLine(e.KeyCode.ToString());

            if (!_gamePresetService.IsRunning())
            {
                if (config.Shortcuts.TurnOnRed == combination)
                {
                    _userPresetService.ToggleRed();
                }
                if (config.Shortcuts.TurnOnGreen == combination)
                {
                    _userPresetService.ToggleGreen();
                }
                if (config.Shortcuts.TurnOnBlue == combination)
                {
                    _userPresetService.ToggleBlue();
                }
                if (config.Shortcuts.TurnOff == combination)
                {
                    _userPresetService.ToggleColor(false, false, false);
                }
            }
        }
Пример #2
0
 private void Checkbox_Blue_CheckedChanged(object sender, EventArgs e)
 {
     _userPresetService.ToggleBlue();
     ChangeMetroStyle();
 }