public PreferencesDialog(MainForm mainForm) { RShare.MainForm.SetUILanguage(); InitializeComponent(); m_PreferencesControl = new PreferencesControl(mainForm); m_PreferencesControl.Dock = DockStyle.Fill; m_DirectoriesControl = new DirectoriesControl(); m_DirectoriesControl.Dock = DockStyle.Fill; m_MiscControl = new MiscControl(); m_MiscControl.Dock = DockStyle.Fill; m_AboutControl = new AboutControl(); m_AboutControl.Dock = DockStyle.Fill; toolStripStatusLabel.Text = Properties.Resources.RestartAfterChanges; switch (m_Settings["PreferencesDialogLastTab"]) { case "1": directoriesToolStripButton.PerformClick(); break; case "2": miscToolStripButton.PerformClick(); break; case "3": aboutToolStripButton.PerformClick(); break; default: preferencesToolStripButton.PerformClick(); break; } }