public SettingsDialog() { this.InitializeComponent(); this.AcceptButton = this.bOK; this.CancelButton = this.bCancel; this.globalVarsTable.Columns.Add("Name"); this.globalVarsTable.Columns.Add("Value"); this.gridGlobalVariables.DataSource = this.globalVarsTable; this.gridGlobalVariables.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells; this.gridGlobalVariables.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; this.hotkeys = Hotkey.GetHotkeys(); }
private void mnuSettings_Click(object sender, EventArgs e) { using (SettingsDialog dialog = new SettingsDialog()) { if (dialog.ShowDialog(this) == DialogResult.OK) { if (dialog.CustomColumnsChanged) { SaveDialogSettings(); RebuildCustomColumns(); LoadDialogSettings(); } olvJobs.RefreshObjects(m_Jobs); UpdateStatusbar(); this.hotkeys = Hotkey.GetHotkeys(); } } }
protected override void OnLoad(EventArgs e) { if (DesignMode) return; RebuildCustomColumns(); base.OnLoad(e); mnuShowGroups.Checked = Conversion.ToBoolean(Settings.GetValue("GeGeek", "ShowGroups", true)); mnuAutoScroll.Checked = Conversion.ToBoolean(Settings.GetValue("GeGeek", "AutoScroll", true)); olvJobs.ShowGroups = mnuShowGroups.Checked; if (Conversion.ToBoolean(Settings.GetValue("GeGeek", "ShowStatusBar", false))) { mnuShowStatusBar.PerformClick(); } UpdateList(); UpdateNumByStatus(); if (Convert.ToBoolean(Settings.GetValue("GeGeek", "ShowLog", false))) { mnuLog.PerformClick(); } if ((bool)Settings.GetValue("UpdateAtStartup", false)) { RunJobs(false, false, false); } // Check applications for updates if ((bool)Settings.GetValue("UpdateOnlineDatabase", true)) { m_Updater.BeginCheckForOnlineUpdates(m_Jobs); } this.hotkeys = Hotkey.GetHotkeys(); }