public void OpenSettings(int tabIndex) { if (!TryBringToFront <FormSettings>()) { bool prevEnableUpdateCheck = Config.EnableUpdateCheck; FormSettings form = new FormSettings(this, plugins, updates, tabIndex); form.FormClosed += (sender, args) => { if (!prevEnableUpdateCheck && Config.EnableUpdateCheck) { updates.DismissUpdate(string.Empty); updates.Check(false); } if (!Config.EnableTrayHighlight) { trayIcon.HasNotifications = false; } UpdateProperties(PropertyBridge.Properties.ExpandLinksOnHover | PropertyBridge.Properties.HasCustomNotificationSound); form.Dispose(); }; ShowChildForm(form); } }
public void OpenSettings(Type startTab) { if (!FormManager.TryBringToFront <FormSettings>()) { bool prevEnableUpdateCheck = Config.EnableUpdateCheck; FormSettings form = new FormSettings(this, plugins, updates, analytics, startTab); form.FormClosed += (sender, args) => { if (!prevEnableUpdateCheck && Config.EnableUpdateCheck) { Config.DismissedUpdate = null; Config.Save(); updates.Check(true); } if (!Config.EnableTrayHighlight) { trayIcon.HasNotifications = false; } if (Config.AllowDataCollection) { if (analytics == null) { analytics = new AnalyticsManager(this, plugins, Program.AnalyticsFilePath); } } else if (analytics != null) { analytics.Dispose(); analytics = null; } BrowserCache.RefreshTimer(); if (form.ShouldReloadBrowser) { FormManager.TryFind <FormPlugins>()?.Close(); plugins.Reload(); // also reloads the browser } else { browser.UpdateProperties(); } notification.RequiresResize = true; form.Dispose(); }; AnalyticsFile.OpenOptions.Trigger(); ShowChildForm(form); } }
private void OpenSettingsForceUpdate() { LOG.Debug("OpenSettingsForceUpdate()"); FormSettings settingsForm = new FormSettings(); Program.Settings = new Settings(); if (settingsForm.ShowDialog(this) == DialogResult.OK) { LOG.Info("Settings closed OK; callUpdateAll = true"); callUpdateAll = true; } settingsForm.Dispose(); }
public void Cleanup() { formSettings.Dispose(); }