Beispiel #1
0
        private void OnHotKeyHandler(HotKey hotkey)
        {
            ConfiguredHotKeyViewModel vm = HotKeys.FirstOrDefault(h => h.Shortcut.Id == hotkey.Id);
            ERole role = vm.Mode == Enums.Modes.Communication ? ERole.eCommunications : ERole.eMultimedia;

            _audio.SetDefaultDevice(vm.AudioDevice.DeviceId, role);
        }
Beispiel #2
0
        public void RemoveHotKey(HotKey hotKey, bool save = true)
        {
            var existing = HotKeys.FirstOrDefault(x => x.HotKey.Equals(hotKey));

            if (existing != null)
            {
                HotKeys.Remove(existing);
            }
            if (save)
            {
                Save();
            }
        }
Beispiel #3
0
        public static CaptureMode GetCaptureMode(WindowNative.KeyModifiers modifiers, Keys key)
        {
            var hotKey = HotKeys.FirstOrDefault(o => o.Value.Modifiers == modifiers && o.Value.Key == key);

            return((hotKey.Value != null) ? hotKey.Key : CaptureMode.None);
        }