public FormSettings(FormBrowser browser, PluginManager plugins, UpdateHandler updates) { InitializeComponent(); Text = Program.BrandName + " Settings"; this.browser = browser; this.browser.PauseNotification(); this.tabPanel.SetupTabPanel(100); this.tabPanel.AddButton("General", SelectTab <TabSettingsGeneral>); this.tabPanel.AddButton("Notifications", () => SelectTab(() => new TabSettingsNotifications(browser.CreateNotificationForm(NotificationFlags.DisableContextMenu), wasTabSelectedAutomatically))); this.tabPanel.AddButton("Updates", () => SelectTab(() => new TabSettingsUpdates(updates))); this.tabPanel.AddButton("Advanced", () => SelectTab(() => new TabSettingsAdvanced(browser.ReinjectCustomCSS, plugins))); this.tabPanel.SelectTab(tabPanel.Buttons.First()); }
public FormSettings(FormBrowser browser, PluginManager plugins, UpdateHandler updates, int startTabIndex = 0) { InitializeComponent(); Text = Program.BrandName + " Settings"; this.browser = browser; this.browser.PauseNotification(); this.tabPanel.SetupTabPanel(100); this.tabPanel.AddButton("General", () => SelectTab(() => new TabSettingsGeneral(updates))); this.tabPanel.AddButton("Notifications", () => SelectTab(() => new TabSettingsNotifications(browser.CreateNotificationForm(false)))); this.tabPanel.AddButton("Sounds", () => SelectTab(() => new TabSettingsSounds())); this.tabPanel.AddButton("Advanced", () => SelectTab(() => new TabSettingsAdvanced(browser.ReinjectCustomCSS, plugins))); this.tabPanel.SelectTab(tabPanel.Buttons.ElementAt(startTabIndex)); }