private void butSubmit_Click(object sender, EventArgs e) { // --- General section --- if (chkHotKey.Checked) { if (!main.SetHotKey(selectedKeys)) { return; } } else { main.SetHotKey(KeyCombination.None); } if (chkTruncateTitle.Checked) { Settings.Default.TitleLengthLimit = (int)numLimit.Value; } else { Settings.Default.TitleLengthLimit = int.MaxValue; } // --- Application section Settings.Default.AlwaysCheckForUpdates = chkUpdates.Checked; this.Close(); }
private void butHotKey_Click(object sender, EventArgs e) { // remove current shortcut during key selection main.SetHotKey(KeyCombination.None); HotKeyInputForm hkForm = new HotKeyInputForm((Keys)selectedKeys); if (hkForm.ShowDialog(this) == DialogResult.OK) { selectedKeys = (KeyCombination)hkForm.SelectedKeys; txtHotKey.Text = selectedKeys.ToString(); } // restores previous shortcut main.SetHotKey(selectedKeys); }