Beispiel #1
0
        private void _decreaseCurrentKeyCombinationLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var res = KeyCombinationDialog.GetKeyCombination();

            if (res != null)
            {
                Program.DecreaseCurrentVolumeKeyCombination = res;
            }
            loadSettings();
        }
Beispiel #2
0
        private void _muteAllKeyCombinationLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var res = KeyCombinationDialog.GetKeyCombination();

            if (res != null)
            {
                Program.MuteAllKeyCombination = res;
            }
            loadSettings();
        }
Beispiel #3
0
        private void _switchAudioDeviceLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var res = KeyCombinationDialog.GetKeyCombination();

            if (res != null)
            {
                Program.SwitchAudioDeviceKeyCombination = res;
            }
            loadSettings();
        }
Beispiel #4
0
        public static HotKey GetKeyCombination(HotKey hotKey = null)
        {
            if (hotKey == null)
            {
                hotKey = new HotKey();
            }

            var diag = new KeyCombinationDialog();

            diag._hotKey = hotKey;
            return(diag.ShowDialog() == DialogResult.OK ? diag._hotKey : null);
        }