diff --git a/src/options/Constants/PageConstants.cs b/src/options/Constants/PageConstants.cs index 0017684..2896fac 100644 --- a/src/options/Constants/PageConstants.cs +++ b/src/options/Constants/PageConstants.cs @@ -19,5 +19,6 @@ public static class PageConstants public const string PackageVersion = "Version Number"; public const string OpenLinksInVS = "Open Links in VS"; public const string EnableStartPagePlusOptions = "Start Page+ Options"; + public const string AutoCloseOnSolutionOpen = "Automatically close Start Page+ when solution opens, show when solution closes"; } } \ No newline at end of file diff --git a/src/options/Pages/GeneralDialogPage.cs b/src/options/Pages/GeneralDialogPage.cs index 10dd332..787eeed 100644 --- a/src/options/Pages/GeneralDialogPage.cs +++ b/src/options/Pages/GeneralDialogPage.cs @@ -32,5 +32,10 @@ public class GeneralDialogPage : DialogPage [DisplayName(Enable + Space + Quote + Constants.PageConstants.EnableStartPagePlusOptions + Quote)] [Description("Determines if a button to open" + Space + Quote + PackageName + Quote + Space + "options is added to the" + Space + Quote + "Tools" + Quote + Space + "Menu")] public bool EnableStartPagePlusOptions { get; set; } = true; + + [Category(H2 + Features)] + [DisplayName(Enable + Space + Quote + Constants.PageConstants.AutoCloseOnSolutionOpen + Quote)] + [Description("Determines whether to automatically close StartPage+ when a solution opens and open StartPage+ when the solution is closed")] + public bool AutomaticallyCloseOnSolutionOpen { get; set; } = true; } } \ No newline at end of file diff --git a/src/ui/StartPagePlusWindow.cs b/src/ui/StartPagePlusWindow.cs index 60a87e0..7c6cb37 100644 --- a/src/ui/StartPagePlusWindow.cs +++ b/src/ui/StartPagePlusWindow.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Windows; using Microsoft.VisualStudio.Imaging; using Microsoft.VisualStudio.Shell; using Microsoft.Win32; @@ -19,4 +20,4 @@ public StartPagePlusWindow(RegistryKey registryRoot) : base(null) Content = new MainView(registryRoot); } } -} \ No newline at end of file +} diff --git a/src/ui/Views/MainView.xaml b/src/ui/Views/MainView.xaml index 55cdf65..9e4b36f 100644 --- a/src/ui/Views/MainView.xaml +++ b/src/ui/Views/MainView.xaml @@ -80,6 +80,7 @@