Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 2
0
 private void Checkbox_Green_CheckedChanged(object sender, EventArgs e)
 {
     _userPresetService.ToggleGreen();
     ChangeMetroStyle();
 }