private void buttonWhisperHotkey_Click(object sender, EventArgs e) { // Prevent the button from getting focus, place focus on the form instead mainForm.Focus(); MainFormBlur mainFormBlur = new MainFormBlur(mainForm); mainFormBlur.Show(mainForm); using (GetHotkeyKeyCodeDialog dialog = new GetHotkeyKeyCodeDialog()) { if (dialog.ShowDialog() == DialogResult.OK) { string hotkey = dialog.Result; labelWhisperHotkey.Text = hotkey; SetWhisperHotkey(hotkey); } } mainFormBlur.Close(); }
private void buttonEditMuteOutputHotkey_Click(object sender, EventArgs e) { // Prevent the button from getting focus, place focus on the form instead mainForm.Focus(); MainFormBlur mainFormBlur = new MainFormBlur(mainForm); mainFormBlur.Show(mainForm); using (GetHotkeyKeyCodeDialog dialog = new GetHotkeyKeyCodeDialog()) { if (dialog.ShowDialog() == DialogResult.OK) { string hotkey = dialog.Result; labelMuteOutputHotkey.Text = hotkey; Properties.Settings.Default.MuteOutputHotkey = hotkey; Properties.Settings.Default.Save(); } } mainFormBlur.Close(); }