private void SshConfig_Click(object sender, EventArgs e) { if (GitCommandHelpers.Plink()) { if (SshSettingsPage.AutoFindPuttyPaths()) { MessageBox.Show(this, _puttyFoundAuto.Text, _putty); } else { PageHost.GotoPage(SshSettingsPage.GetPageReference()); } } }
private void SshConfig_Click(object sender, EventArgs e) { if (GitCommandHelpers.Plink()) { if (SshSettingsPage.AutoFindPuttyPaths()) { MessageBox.Show(this, _puttyFoundAuto.Text, _putty); } else { PageHost.GotoPage(SshSettingsPage.GetPageReference()); } } // original //// if (Putty.Checked) //// { //// if (AutoFindPuttyPaths()) //// MessageBox.Show(this, _puttyFoundAuto.Text, _puttyFoundAutoCaption.Text); //// else //// tabControl1.SelectTab(tpSsh); //// } }
public FormSettings(GitUICommands aCommands, SettingsPageReference initalPage = null) : base(aCommands) { InitializeComponent(); Translate(); settingsTreeView.SuspendLayout(); //if form is created for translation purpose if (aCommands == null) return; settingsTreeView.AddSettingsPage(new GitExtensionsSettingsGroup(), null); SettingsPageReference gitExtPageRef = GitExtensionsSettingsGroup.GetPageReference(); _commonLogic = new CommonLogic(Module); _checkSettingsLogic = new CheckSettingsLogic(_commonLogic, Module); var checklistSettingsPage = new ChecklistSettingsPage(_commonLogic, _checkSettingsLogic, Module, this); settingsTreeView.AddSettingsPage(checklistSettingsPage, gitExtPageRef, true); // as root settingsTreeView.AddSettingsPage(new GitSettingsPage(_checkSettingsLogic, this), gitExtPageRef); settingsTreeView.AddSettingsPage(new GitExtensionsSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new AppearanceSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new ColorsSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new StartPageSettingsPage(), gitExtPageRef); var globalSettingsSettingsPage = new GlobalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module); settingsTreeView.AddSettingsPage(globalSettingsSettingsPage, gitExtPageRef); var localSettingsSettingsPage = new LocalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module); settingsTreeView.AddSettingsPage(localSettingsSettingsPage, gitExtPageRef); var _sshSettingsPage = new SshSettingsPage(_commonLogic); settingsTreeView.AddSettingsPage(_sshSettingsPage, gitExtPageRef); checklistSettingsPage.SshSettingsPage = _sshSettingsPage; settingsTreeView.AddSettingsPage(new ScriptsSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new HotkeysSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new ShellExtensionSettingsPage(), gitExtPageRef); settingsTreeView.AddSettingsPage(new AdvancedSettingsPage(), gitExtPageRef); SettingsPageReference advancedPageRef = AdvancedSettingsPage.GetPageReference(); settingsTreeView.AddSettingsPage(new ConfirmationsSettingsPage(), advancedPageRef); settingsTreeView.AddSettingsPage(new PluginsSettingsGroup(), null); SettingsPageReference pluginsPageRef = PluginsSettingsGroup.GetPageReference(); settingsTreeView.AddSettingsPage(new PluginRootIntroductionPage(), pluginsPageRef, true); // as root foreach (var gitPlugin in LoadedPlugins.Plugins) { var settingsPage = PluginSettingsPage.CreateSettingsPageFromPlugin(gitPlugin); settingsTreeView.AddSettingsPage(settingsPage, pluginsPageRef); } settingsTreeView.GotoPage(initalPage); settingsTreeView.ResumeLayout(); }