public void ProcessHotkey(Hotkeys hotkey, HotkeyBinding form, TextBox textBox) { form.Close(); textBox.Text = hotkey.subKey.ToString() + "," + hotkey.mainKey.ToString(); textBox.Tag = hotkey; SaveHotkeys(); this.Visible = true; }
public void CancelHotkey(HotkeyBinding form) { form.Close(); this.Visible = true; }
//Hotkey Handling: //Note: Saving & Loading, use ToString() and use Keys key = (Keys)Enum.Parse(typeof(Keys), key2.ToString()); private void HandleHotkey(object sender, EventArgs e) { HotkeyBinding form = new HotkeyBinding(this, (TextBox)sender); form.Visible = true; this.Visible = false; }