public Form1() { InitializeComponent(); this.ShowInTaskbar = false; if (TwitchMarker.Properties.Settings.Default.hotkey != Keys.None) { //ghk = new KeyHandler(TwitchMarker.Properties.Settings.Default.hotkey, this); savedHotkey = TwitchMarker.Properties.Settings.Default.hotkey; setKey(TwitchMarker.Properties.Settings.Default.hotkey); ghk.Register(); } else { ghk = new KeyHandler(Keys.F11, this); txt_hotkey.Text = "F11"; ghk.Register(); } if (TwitchMarker.Properties.Settings.Default.channel != "") { txt_Name.Text = TwitchMarker.Properties.Settings.Default.channel; savedChannel = txt_Name.Text; newThread(); } }
private void cancel_btn_Click(object sender, EventArgs e) { if (txt_hotkey.Text == "F11") { ghk = new KeyHandler(Keys.F11, this); txt_hotkey.Text = "F11"; ghk.Register(); } txt_Name.Text = savedChannel; setKey(savedHotkey); this.Location = new Point(this.Location.X, this.Location.Y - 5000); }