private void _decreaseCurrentKeyCombinationLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var res = KeyCombinationDialog.GetKeyCombination(); if (res != null) { Program.DecreaseCurrentVolumeKeyCombination = res; } loadSettings(); }
private void _muteAllKeyCombinationLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var res = KeyCombinationDialog.GetKeyCombination(); if (res != null) { Program.MuteAllKeyCombination = res; } loadSettings(); }
private void _switchAudioDeviceLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var res = KeyCombinationDialog.GetKeyCombination(); if (res != null) { Program.SwitchAudioDeviceKeyCombination = res; } loadSettings(); }
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); }