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

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

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

            if (res != null)
            {
                Program.SwitchAudioDeviceKeyCombination = res;
            }
            loadSettings();
        }
예제 #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);
        }