├── SolutionStartPage.Core ├── Localization │ ├── Main.de-DE.Designer.cs │ └── Main.pl-PL.Designer.cs ├── packages.config ├── BLL │ ├── Interfaces │ │ ├── UserIOInterface.cs │ │ └── SystemInterface.cs │ └── Provider │ │ ├── MainResourceProvider.cs │ │ └── ViewStateProvider.cs ├── DAL │ └── FileSystem.cs ├── Properties │ └── AssemblyInfo.cs └── Views │ ├── BasePresenter.cs │ └── BasicPart │ └── VsoPagePresenter.cs ├── .nuget ├── NuGet.exe └── NuGet.Config ├── SolutionStartPage ├── StartPage.pkgdef ├── StartPage_Icon.png ├── StartPage_Preview.pdn ├── StartPage_Preview.png ├── StartPage.xaml ├── GettingStarted.md ├── License.txt ├── readme.md ├── Properties │ └── AssemblyInfo.cs ├── source.extension.vsixmanifest └── ReleaseNotes.md ├── SolutionStartPage.Shared ├── Content │ ├── up.png │ ├── add.png │ ├── back.png │ ├── down.png │ ├── error.png │ ├── folder.png │ ├── forward.png │ ├── remove.png │ ├── warning.png │ └── delete_all.png ├── Views │ ├── IBasicControlSubject.cs │ ├── PageRootView │ │ └── IPageRootView.cs │ ├── IViewModel.cs │ ├── SolutionPageView │ │ ├── ISolutionControl.cs │ │ ├── ISolutionGroupControl.cs │ │ ├── ISolutionPagePresenter.cs │ │ ├── ISolutionPageView.cs │ │ ├── ISolutionPageViewModel.cs │ │ ├── ISolutionPageModel.cs │ │ └── SolutionPageViewModelBase.cs │ ├── BasicPart │ │ ├── IVsoPagePresenter.cs │ │ ├── IVsoPageView.cs │ │ ├── IVsoPageViewModel.cs │ │ └── VsoPageViewModelBase.cs │ ├── IView.cs │ ├── IAppControlHost.cs │ └── IPresenter.cs ├── packages.config ├── BLL │ ├── Provider │ │ ├── IViewStateProvider.cs │ │ └── IResourceProvider.cs │ └── Interfaces │ │ ├── IUserIOInterface.cs │ │ └── ISystemInterface.cs ├── IBootstrapper.cs ├── Models │ ├── IIdeModel.cs │ ├── IIde.cs │ ├── IVisualStudioVersion.cs │ └── SolutionPageConfiguration.cs ├── DAL │ └── IFileSystem.cs ├── Converter │ ├── SolutionWidthToTextWidthConverter.cs │ ├── BoolToOpacityConverter.cs │ ├── InvertedBoolToOpacityConverter.cs │ └── BoolToVisibilityConverter.cs ├── Resources │ └── CommonConverter.xaml ├── Utilities.cs ├── Commands │ ├── CommandParameter.cs │ └── Commands.cs └── Properties │ └── AssemblyInfo.cs ├── SolutionStartPage.Proxies ├── packages.config ├── Views │ ├── PageRootControlProxy.cs │ ├── SolutionControlProxy.cs │ ├── SolutionGroupControlProxy.cs │ ├── VsoPageControlProxy.cs │ ├── ContentProxyBaseControl.cs │ └── SolutionPageControlProxy.cs ├── Properties │ └── AssemblyInfo.cs └── SolutionStartPage.Proxies.csproj ├── StartPageDebugHelper ├── App.config ├── Models │ ├── FileType.cs │ ├── VsVersionInformation.cs │ └── FileData.cs ├── Actions │ ├── IActionProvider.cs │ ├── BaseActionProvider.cs │ ├── ExecuteableAction.cs │ ├── ActionSet.cs │ └── Implementations │ │ ├── CleanDebugAction.cs │ │ └── CopyDebugAction.cs └── Properties │ └── AssemblyInfo.cs ├── SolutionStartPage.Vs2010 ├── Views │ ├── BasicPart │ │ ├── VsoPageViewModel.cs │ │ └── VsoPageControl.xaml.cs │ ├── SolutionPageView │ │ ├── SolutionPageViewModel.cs │ │ ├── SolutionPageModel.cs │ │ ├── SolutionGroupControl.xaml.cs │ │ ├── SolutionControl.xaml.cs │ │ └── SolutionPageControl.xaml.cs │ └── PageRootView │ │ ├── PageRootControl.xaml.cs │ │ └── PageRootControl.xaml ├── packages.config ├── Properties │ ├── settings.settings │ ├── settings.designer.cs │ ├── AssemblyInfo.cs │ └── resources.designer.cs ├── Models │ ├── VsIde.cs │ └── IdeModel.cs └── Vs2010Bootstrapper.cs ├── SolutionStartPage.Vs2013 ├── Views │ ├── BasicPart │ │ ├── VsoPageViewModel.cs │ │ └── VsoPageControl.xaml.cs │ ├── SolutionPageView │ │ ├── SolutionPageViewModel.cs │ │ ├── SolutionPageModel.cs │ │ ├── SolutionGroupControl.xaml.cs │ │ ├── SolutionControl.xaml.cs │ │ └── SolutionPageControl.xaml.cs │ └── PageRootView │ │ ├── PageRootControl.xaml │ │ └── PageRootControl.xaml.cs ├── packages.config ├── Properties │ ├── settings.settings │ ├── settings.designer.cs │ ├── AssemblyInfo.cs │ └── resources.designer.cs ├── Models │ ├── VsIde.cs │ └── IdeModel.cs └── Vs2013Bootstrapper.cs ├── SolutionStartPage.Vs2015 ├── Views │ ├── BasicPart │ │ ├── VsoPageViewModel.cs │ │ └── VsoPageControl.xaml.cs │ ├── SolutionPageView │ │ ├── SolutionPageViewModel.cs │ │ ├── SolutionPageModel.cs │ │ ├── SolutionGroupControl.xaml.cs │ │ ├── SolutionControl.xaml.cs │ │ └── SolutionPageControl.xaml.cs │ └── PageRootView │ │ ├── PageRootControl.xaml │ │ └── PageRootControl.xaml.cs ├── Properties │ ├── settings.settings │ ├── settings.designer.cs │ ├── AssemblyInfo.cs │ └── resources.designer.cs ├── packages.config ├── Models │ ├── VsIde.cs │ └── IdeModel.cs └── Vs2015Bootstrapper.cs ├── SolutionStartPage.Vs2017 ├── Views │ ├── BasicPart │ │ ├── VsoPageViewModel.cs │ │ └── VsoPageControl.xaml.cs │ ├── SolutionPageView │ │ ├── SolutionPageViewModel.cs │ │ ├── SolutionPageModel.cs │ │ ├── SolutionGroupControl.xaml.cs │ │ ├── SolutionControl.xaml.cs │ │ └── SolutionPageControl.xaml.cs │ └── PageRootView │ │ ├── PageRootControl.xaml │ │ └── PageRootControl.xaml.cs ├── Properties │ ├── settings.settings │ ├── settings.designer.cs │ ├── AssemblyInfo.cs │ └── resources.designer.cs ├── packages.config ├── Models │ ├── VsIde.cs │ └── IdeModel.cs └── Vs2017Bootstrapper.cs ├── SolutionStartPage.UnitTests ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── Core │ └── Views │ │ └── BasicPart │ │ └── VsoPagePresenterTest.cs ├── Shared │ ├── Converter │ │ ├── SolutionWidthToTextWidthConverterTest.cs │ │ ├── BoolToOpacityConverterTest.cs │ │ ├── InvertedBoolToOpacityConverterTest.cs │ │ └── BoolToVisibilityConverterTest.cs │ ├── UtilitiesTest.cs │ └── Models │ │ └── SolutionPageConfigurationTest.cs └── Start │ └── AssemblyDataProviderTest.cs ├── .gitattributes ├── DevGuide.md ├── readme.md ├── SolutionStartPage.sln.DotSettings └── .gitignore /SolutionStartPage.Core/Localization/Main.de-DE.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SolutionStartPage.Core/Localization/Main.pl-PL.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/.nuget/NuGet.exe -------------------------------------------------------------------------------- /SolutionStartPage/StartPage.pkgdef: -------------------------------------------------------------------------------- 1 | [$RootKey$\BindingPaths\{864B43EE-F9F9-4D3E-BCEE-3101FFFF5973}] 2 | "$PackageFolder$"="" -------------------------------------------------------------------------------- /SolutionStartPage/StartPage_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage/StartPage_Icon.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/up.png -------------------------------------------------------------------------------- /SolutionStartPage/StartPage_Preview.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage/StartPage_Preview.pdn -------------------------------------------------------------------------------- /SolutionStartPage/StartPage_Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage/StartPage_Preview.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/add.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/back.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/down.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/error.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/folder.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/forward.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/remove.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/warning.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Content/delete_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Herdo/SolutionStartPage/HEAD/SolutionStartPage.Shared/Content/delete_all.png -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/IBasicControlSubject.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views 2 | { 3 | public interface IBasicControlSubject 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/PageRootView/IPageRootView.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.PageRootView 2 | { 3 | public interface IPageRootView : IBasicControlSubject 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/IViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views 2 | { 3 | using System.ComponentModel; 4 | 5 | public interface IViewModel : INotifyPropertyChanged 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionControl.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | public interface ISolutionControl : IBasicControlSubject 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/BasicPart/IVsoPagePresenter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.BasicPart 2 | { 3 | public interface IVsoPagePresenter : IPresenter 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionGroupControl.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | public interface ISolutionGroupControl : IBasicControlSubject 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/BasicPart/IVsoPageView.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.BasicPart 2 | { 3 | public interface IVsoPageView : IView, 4 | IBasicControlSubject 5 | { 6 | } 7 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/Models/FileType.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Models 2 | { 3 | public enum FileType 4 | { 5 | Undefined = 0, 6 | DLL = 1, 7 | PDB = 2, 8 | XAML = 3 9 | } 10 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/BasicPart/VsoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | public class VsoPageViewModel : VsoPageViewModelBase 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/BasicPart/VsoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | public class VsoPageViewModel : VsoPageViewModelBase 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/BasicPart/VsoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | public class VsoPageViewModel : VsoPageViewModelBase 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/BasicPart/VsoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | public class VsoPageViewModel : VsoPageViewModelBase 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/BasicPart/IVsoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.BasicPart 2 | { 3 | public interface IVsoPageViewModel : IViewModel 4 | { 5 | string StartPageHeaderTitle { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionPagePresenter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | public interface ISolutionPagePresenter : IPresenter 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Properties/settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Properties/settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Properties/settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Properties/settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/PageRootControlProxy.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using Shared.Views.PageRootView; 4 | 5 | public class PageRootControlProxy : ContentProxyBaseControl, 6 | IPageRootView 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/SolutionControlProxy.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using Shared.Views.SolutionPageView; 4 | 5 | public class SolutionControlProxy : ContentProxyBaseControl, 6 | ISolutionControl 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/IView.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views 2 | { 3 | using System.Windows; 4 | 5 | public interface IView where TViewModel : IViewModel 6 | { 7 | event RoutedEventHandler Loaded; 8 | 9 | void ConnectDataSource(TViewModel vm); 10 | } 11 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/IAppControlHost.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views 2 | { 3 | public interface IAppControlHost 4 | { 5 | /// 6 | /// Gets or sets the DataContext for the whole start page. 7 | /// 8 | object DataContext { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/SolutionGroupControlProxy.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using Shared.Views.SolutionPageView; 4 | 5 | public class SolutionGroupControlProxy : ContentProxyBaseControl, 6 | ISolutionGroupControl 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/IPresenter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views 2 | { 3 | public interface IPresenter 4 | where TView : IView 5 | where TViewModel : IViewModel 6 | { 7 | TView View { get; } 8 | TViewModel ViewModel { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /SolutionStartPage/StartPage.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | -------------------------------------------------------------------------------- /StartPageDebugHelper/Models/VsVersionInformation.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Models 2 | { 3 | public class VsVersionInformation 4 | { 5 | public string InternalVersion { get; set; } 6 | 7 | public string PublicVersion { get; set; } 8 | 9 | public string Edition { get; set; } 10 | 11 | public bool UseLegacyPath { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/BLL/Provider/IViewStateProvider.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.BLL.Provider 2 | { 3 | using System.ComponentModel; 4 | 5 | public interface IViewStateProvider : INotifyPropertyChanged 6 | { 7 | bool EditModeEnabled { get; set; } 8 | bool DisplayFolders { get; set; } 9 | bool DisplayIcons { get; set; } 10 | bool DisplaySeparator { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/IBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared 2 | { 3 | using Unity; 4 | 5 | public interface IBootstrapper 6 | { 7 | /// 8 | /// Configures the unity container for the specific bootstrapper case. 9 | /// 10 | /// The container to configure. 11 | void Configure(IUnityContainer container); 12 | } 13 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/IActionProvider.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions 2 | { 3 | public interface IActionProvider 4 | { 5 | /// 6 | /// Gets the display name for the action. 7 | /// 8 | string DisplayName { get; } 9 | 10 | /// 11 | /// Executes a specific action. 12 | /// 13 | void ExecuteAction(); 14 | } 15 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/BLL/Interfaces/IUserIOInterface.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.BLL.Interfaces 2 | { 3 | using System.Windows.Input; 4 | 5 | public interface IUserIOInterface 6 | { 7 | /// 8 | /// Checks if the is pressed. 9 | /// 10 | /// The key to check. 11 | /// 12 | bool IsModifierKeyDown(ModifierKeys key); 13 | } 14 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Models/IIdeModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Models 2 | { 3 | using System; 4 | 5 | public interface IIdeModel 6 | { 7 | /// 8 | /// Gets the VS Version specific object. 9 | /// 10 | /// The datacontext required to get the . 11 | /// The function to resolve the ide. 12 | /// The Ide. 13 | IIde GetIde(object dataContext, Func ideResolver); 14 | } 15 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/SolutionPageView/SolutionPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.SolutionPageView 2 | { 3 | using Shared.BLL.Provider; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public sealed class SolutionPageViewModel : SolutionPageViewModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | #region Constructors 10 | 11 | public SolutionPageViewModel(IViewStateProvider viewStateProvider) 12 | : base(viewStateProvider) 13 | { 14 | } 15 | 16 | #endregion 17 | } 18 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/SolutionPageView/SolutionPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.SolutionPageView 2 | { 3 | using Shared.BLL.Provider; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public sealed class SolutionPageViewModel : SolutionPageViewModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | #region Constructors 10 | 11 | public SolutionPageViewModel(IViewStateProvider viewStateProvider) 12 | : base(viewStateProvider) 13 | { 14 | } 15 | 16 | #endregion 17 | } 18 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionPageView.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | using System; 4 | using System.Windows.Input; 5 | using Models; 6 | 7 | public interface ISolutionPageView : IView, 8 | IBasicControlSubject 9 | { 10 | event EventHandler AlterPageCanExecute; 11 | event EventHandler AlterPageExecuted; 12 | string BrowseBulkAddRootFolder(); 13 | string BrowseSolution(SolutionGroup solutionGroup); 14 | } 15 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/SolutionPageView/SolutionPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.SolutionPageView 2 | { 3 | using Shared.BLL.Provider; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public sealed class SolutionPageViewModel : SolutionPageViewModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constructors 11 | 12 | public SolutionPageViewModel(IViewStateProvider viewStateProvider) 13 | : base(viewStateProvider) 14 | { 15 | } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/SolutionPageView/SolutionPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.SolutionPageView 2 | { 3 | using Shared.BLL.Provider; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public sealed class SolutionPageViewModel : SolutionPageViewModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constructors 11 | 12 | public SolutionPageViewModel(IViewStateProvider viewStateProvider) 13 | : base(viewStateProvider) 14 | { 15 | } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionPageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | using System.Collections.ObjectModel; 4 | using Models; 5 | 6 | public interface ISolutionPageViewModel : IViewModel 7 | { 8 | bool EditModeEnabled { get; set; } 9 | 10 | bool DisplayFolders { get; set; } 11 | 12 | bool DisplayIcons { get; set; } 13 | 14 | bool DisplaySeparator { get; set; } 15 | 16 | int Columns { get; set; } 17 | 18 | ObservableCollection SolutionGroups { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/BLL/Interfaces/UserIOInterface.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.BLL.Interfaces 2 | { 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Windows.Input; 5 | using Shared.BLL.Interfaces; 6 | 7 | [ExcludeFromCodeCoverage] 8 | public class UserIOInterface : IUserIOInterface 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region IUserIOInterface Member 13 | 14 | bool IUserIOInterface.IsModifierKeyDown(ModifierKeys key) 15 | { 16 | return Keyboard.Modifiers.HasFlag(key); 17 | } 18 | 19 | #endregion 20 | } 21 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/DAL/IFileSystem.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.DAL 2 | { 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.IO; 6 | 7 | public interface IFileSystem 8 | { 9 | IEnumerable GetFilesInDirectory(string directory, string pattern); 10 | 11 | DirectoryInfo GetParentDirectory(string directory); 12 | 13 | bool DirectoryExists(string directory); 14 | 15 | bool FileExists(string file); 16 | 17 | FileVersionInfo GetFileVersionInfo(string file); 18 | 19 | void WriteAllTextToFile(string file, string contents); 20 | 21 | void DeleteFile(string file); 22 | } 23 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Converter/SolutionWidthToTextWidthConverter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Converter 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows.Data; 6 | 7 | public class SolutionWidthToTextWidthConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | var d = (double) value; 12 | return d - 32.0; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotSupportedException(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Resources/CommonConverter.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Converter/BoolToOpacityConverter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Converter 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows.Data; 6 | 7 | public class BoolToOpacityConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | return (bool) value 12 | ? 1.0 13 | : double.Parse(parameter.ToString(), CultureInfo.InvariantCulture); 14 | } 15 | 16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | throw new NotSupportedException(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Converter/InvertedBoolToOpacityConverter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Converter 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows.Data; 6 | 7 | public class InvertedBoolToOpacityConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | return (bool) value 12 | ? double.Parse(parameter.ToString(), CultureInfo.InvariantCulture) 13 | : 1.0; 14 | } 15 | 16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | throw new NotSupportedException(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/BLL/Interfaces/ISystemInterface.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.BLL.Interfaces 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using Annotations; 6 | 7 | public interface ISystemInterface 8 | { 9 | /// 10 | /// Starts a process with a given . 11 | /// 12 | /// The info to pass to the process before starting it. 13 | /// Any modify action to the process, before it get's started. 14 | /// is null. 15 | void StartProcess([NotNull] ProcessStartInfo startInfo, Action modifyAction = null); 16 | } 17 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/SolutionPageView/SolutionPageModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.SolutionPageView 2 | { 3 | using Shared.DAL; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public class SolutionPageModel : SolutionPageModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constants 11 | 12 | private const string _SETTINGS_FILE_NAME_2010 = "VS2010_SolutionStartPage.settings"; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageModel(IFileSystem fileSystem) 21 | : base(fileSystem, _SETTINGS_FILE_NAME_2010) 22 | { 23 | } 24 | 25 | #endregion 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/SolutionPageView/SolutionPageModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.SolutionPageView 2 | { 3 | using Shared.DAL; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public class SolutionPageModel : SolutionPageModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constants 11 | 12 | private const string _SETTINGS_FILE_NAME_2013 = "VS2013_SolutionStartPage.settings"; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageModel(IFileSystem fileSystem) 21 | : base(fileSystem, _SETTINGS_FILE_NAME_2013) 22 | { 23 | } 24 | 25 | #endregion 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/SolutionPageView/SolutionPageModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.SolutionPageView 2 | { 3 | using Shared.DAL; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public class SolutionPageModel : SolutionPageModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constants 11 | 12 | private const string _SETTINGS_FILE_NAME_2015 = "VS2015_SolutionStartPage.settings"; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageModel(IFileSystem fileSystem) 21 | : base(fileSystem, _SETTINGS_FILE_NAME_2015) 22 | { 23 | } 24 | 25 | #endregion 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/SolutionPageView/SolutionPageModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.SolutionPageView 2 | { 3 | using Shared.DAL; 4 | using Shared.Views.SolutionPageView; 5 | 6 | public class SolutionPageModel : SolutionPageModelBase 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Constants 11 | 12 | private const string _SETTINGS_FILE_NAME_2017 = "VS2017_SolutionStartPage.settings"; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageModel(IFileSystem fileSystem) 21 | : base(fileSystem, _SETTINGS_FILE_NAME_2017) 22 | { 23 | } 24 | 25 | #endregion 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/BasicPart/VsoPageViewModelBase.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.BasicPart 2 | { 3 | using System.ComponentModel; 4 | 5 | public abstract class VsoPageViewModelBase : IVsoPageViewModel 6 | { 7 | ///////////////////////////////////////////////////////// 8 | 9 | #region IVsoPageViewModel Member 10 | 11 | public string StartPageHeaderTitle 12 | { 13 | get { return "Visual Studio"; } 14 | set 15 | { 16 | /* Ignore */ 17 | } 18 | } 19 | 20 | #endregion 21 | 22 | ///////////////////////////////////////////////////////// 23 | 24 | #region INotifyPropertyChanged Members 25 | 26 | public event PropertyChangedEventHandler PropertyChanged; 27 | 28 | #endregion 29 | } 30 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/BasicPart/VsoPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | /// 6 | /// Interaction logic for VsoPageControl.xaml 7 | /// 8 | public partial class VsoPageControl : IVsoPageView 9 | { 10 | ///////////////////////////////////////////////////////// 11 | #region Constructors 12 | 13 | public VsoPageControl() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | #region IVsoPageView Member 22 | 23 | public void ConnectDataSource(IVsoPageViewModel vm) 24 | { 25 | VisualStudioEditionTextBlock.DataContext = vm; 26 | } 27 | 28 | #endregion 29 | } 30 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/BasicPart/VsoPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | /// 6 | /// Interaction logic for VisualStudioOverviewPageControl.xaml 7 | /// 8 | public partial class VsoPageControl : IVsoPageView 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region Constructors 13 | 14 | public VsoPageControl() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | #endregion 20 | 21 | ///////////////////////////////////////////////////////// 22 | 23 | #region IVsoPageView Members 24 | 25 | public void ConnectDataSource(IVsoPageViewModel vm) 26 | { 27 | // Ignore in VS 2010 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Models/IIde.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Models 2 | { 3 | public interface IIde 4 | { 5 | /// 6 | /// Gets the full edition name of the Visual Studio instance. 7 | /// 8 | string Edition { get; } 9 | 10 | /// 11 | /// Sets the object to access the IDE interface. 12 | /// 13 | object IdeAccess { set; } 14 | 15 | // ReSharper disable once InconsistentNaming 16 | /// 17 | /// Gets the Language Code ID of the current IDE language. 18 | /// 19 | int LCID { get; } 20 | 21 | /// 22 | /// Opens a solution. 23 | /// 24 | /// The path to the solution to open. 25 | void OpenSolution(string path); 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/BasicPart/VsoPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | /// 6 | /// Interaction logic for VsoPageControl.xaml 7 | /// 8 | public partial class VsoPageControl : IVsoPageView 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region Constructors 13 | 14 | public VsoPageControl() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | #endregion 20 | 21 | ///////////////////////////////////////////////////////// 22 | 23 | #region IVsoPageView Member 24 | 25 | public void ConnectDataSource(IVsoPageViewModel vm) 26 | { 27 | VisualStudioEditionTextBlock.DataContext = vm; 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/BasicPart/VsoPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.BasicPart 2 | { 3 | using Shared.Views.BasicPart; 4 | 5 | /// 6 | /// Interaction logic for VsoPageControl.xaml 7 | /// 8 | public partial class VsoPageControl : IVsoPageView 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region Constructors 13 | 14 | public VsoPageControl() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | #endregion 20 | 21 | ///////////////////////////////////////////////////////// 22 | 23 | #region IVsoPageView Member 24 | 25 | public void ConnectDataSource(IVsoPageViewModel vm) 26 | { 27 | VisualStudioEditionTextBlock.DataContext = vm; 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Models/VsIde.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Models 2 | { 3 | using EnvDTE80; 4 | using Shared.Models; 5 | 6 | public class VsIde : IIde 7 | { 8 | ///////////////////////////////////////////////////////// 9 | #region Fields 10 | 11 | private DTE2 _dte; 12 | 13 | #endregion 14 | 15 | ///////////////////////////////////////////////////////// 16 | #region IIde Member 17 | 18 | string IIde.Edition => _dte.Edition; 19 | 20 | object IIde.IdeAccess 21 | { 22 | set { _dte = value as DTE2; } 23 | } 24 | 25 | int IIde.LCID => _dte.LocaleID; 26 | 27 | void IIde.OpenSolution(string path) 28 | { 29 | if (path != null) 30 | _dte.ExecuteCommand("File.OpenProject", $"\"{path}\""); 31 | } 32 | 33 | #endregion 34 | } 35 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Models/VsIde.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Models 2 | { 3 | using EnvDTE80; 4 | using Shared.Models; 5 | 6 | public class VsIde : IIde 7 | { 8 | ///////////////////////////////////////////////////////// 9 | #region Fields 10 | 11 | private DTE2 _dte; 12 | 13 | #endregion 14 | 15 | ///////////////////////////////////////////////////////// 16 | #region IIde Member 17 | 18 | string IIde.Edition => _dte.Edition; 19 | 20 | object IIde.IdeAccess 21 | { 22 | set { _dte = value as DTE2; } 23 | } 24 | 25 | int IIde.LCID => _dte.LocaleID; 26 | 27 | void IIde.OpenSolution(string path) 28 | { 29 | if (path != null) 30 | _dte.ExecuteCommand("File.OpenProject", $"\"{path}\""); 31 | } 32 | 33 | #endregion 34 | } 35 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Converter/BoolToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Converter 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows; 6 | using System.Windows.Data; 7 | 8 | public class BoolToVisibilityConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | var val = (bool) value; 13 | if (parameter != null && ((String) parameter) == "invert") 14 | val = !val; 15 | 16 | return val 17 | ? Visibility.Visible 18 | : Visibility.Collapsed; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | throw new NotSupportedException(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Models/VsIde.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Models 2 | { 3 | using EnvDTE80; 4 | using Shared.Models; 5 | 6 | public class VsIde : IIde 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Fields 11 | 12 | private DTE2 _dte; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region IIde Member 19 | 20 | string IIde.Edition => _dte.Edition; 21 | 22 | object IIde.IdeAccess 23 | { 24 | set { _dte = value as DTE2; } 25 | } 26 | 27 | int IIde.LCID => _dte.LocaleID; 28 | 29 | void IIde.OpenSolution(string path) 30 | { 31 | if (path != null) 32 | _dte.ExecuteCommand("File.OpenProject", $"\"{path}\""); 33 | } 34 | 35 | #endregion 36 | } 37 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Models/VsIde.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Models 2 | { 3 | using EnvDTE80; 4 | using Shared.Models; 5 | 6 | public class VsIde : IIde 7 | { 8 | ///////////////////////////////////////////////////////// 9 | 10 | #region Fields 11 | 12 | private DTE2 _dte; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region IIde Member 19 | 20 | string IIde.Edition => _dte.Edition; 21 | 22 | object IIde.IdeAccess 23 | { 24 | set { _dte = value as DTE2; } 25 | } 26 | 27 | int IIde.LCID => _dte.LocaleID; 28 | 29 | void IIde.OpenSolution(string path) 30 | { 31 | if (path != null) 32 | _dte.ExecuteCommand("File.OpenProject", $"\"{path}\""); 33 | } 34 | 35 | #endregion 36 | } 37 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/BLL/Interfaces/SystemInterface.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.BLL.Interfaces 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Diagnostics.CodeAnalysis; 6 | using Shared.BLL.Interfaces; 7 | using static Shared.Utilities; 8 | 9 | [ExcludeFromCodeCoverage] 10 | public class SystemInterface : ISystemInterface 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region ISystemInterface Member 15 | 16 | void ISystemInterface.StartProcess(ProcessStartInfo startInfo, Action modifyAction) 17 | { 18 | ThrowIfNull(startInfo, nameof(startInfo)); 19 | 20 | var process = new Process 21 | { 22 | StartInfo = startInfo 23 | }; 24 | 25 | modifyAction?.Invoke(process); 26 | 27 | process.Start(); 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/BLL/Provider/IResourceProvider.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.BLL.Provider 2 | { 3 | using System.Globalization; 4 | using System.Windows; 5 | 6 | /// 7 | /// Interface for resource providers. 8 | /// 9 | public interface IResourceProvider 10 | { 11 | /// 12 | /// Gets or sets the current culture used for resource requests. 13 | /// 14 | CultureInfo Culture { get; set; } 15 | 16 | /// 17 | /// Gets the localized string associated with the . 18 | /// 19 | /// The key of the resource to get. 20 | /// The given is not found in the resources. 21 | /// The associated resource or null, if it's not found. 22 | string this[string key] { get; } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/VsoPageControlProxy.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using Microsoft.Practices.Unity; 4 | using Shared.Funtionality; 5 | using Shared.Views.BasicPart; 6 | 7 | public class VsoPageControlProxy : ContentProxyBaseControl, 8 | IVsoPageView 9 | { 10 | ///////////////////////////////////////////////////////// 11 | #region Constructors 12 | 13 | public VsoPageControlProxy() 14 | { 15 | // Initialize presenter 16 | UnityFactory.Resolve(new ParameterOverride("view", this)); 17 | } 18 | 19 | #endregion 20 | 21 | ///////////////////////////////////////////////////////// 22 | #region IVsoPageView Member 23 | 24 | void IVsoPageView.ConnectDataSource(IVsoPageViewModel vm) 25 | { 26 | RealSubject.ConnectDataSource(vm); 27 | } 28 | 29 | #endregion 30 | } 31 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Utilities.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared 2 | { 3 | using System; 4 | using Annotations; 5 | using static System.String; 6 | 7 | public static class Utilities 8 | { 9 | /// 10 | /// Checks if the is null and throws an exception, if so. 11 | /// 12 | /// The object to validate for null. 13 | /// The name of the object in the calling location. 14 | /// is null. 15 | /// 16 | /// view.ThrowIfNull(nameof(view)); 17 | /// 18 | public static void ThrowIfNull([CanBeNull] object obj, 19 | [CanBeNull] string name) 20 | { 21 | if (obj == null) 22 | throw new ArgumentNullException(name ?? Empty, "Expected [NotNull] parameter was null."); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /SolutionStartPage/GettingStarted.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | - Install the Extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Herdo.SolutionStartPage) 4 | - Select the proper Visual Studio version(s) you want to install the extension for 5 | - Type "Startup" in the Quick Launch box (in newer VS versions) or go to Tools --> Options --> Environment --> Startup and select the 'Solution Start Page' as start page 6 | 7 | # Usage 8 | 9 | - Right-click the right part of the new start page and enable the edit mode 10 | - To save the settings, right-click the same part again, and disable the edit mode 11 | - At the bottom, define the amount of columns you want to display 12 | - Add your first group at the bottom 13 | - You can also bulk add solutions in a specific directory 14 | - Enter a new name for the created group 15 | - Click to add a solution, browse for a .sln file and add it 16 | - Customize the solution appearance by editing the controls below it 17 | - Move groups and solutions with the arrow keys. -------------------------------------------------------------------------------- /StartPageDebugHelper/Models/FileData.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Models 2 | { 3 | using System; 4 | 5 | public class FileData 6 | { 7 | ///////////////////////////////////////////////////////// 8 | #region Properties 9 | 10 | public FileType FileType { get; } 11 | public string SourcePath { get; } 12 | public string TargetPath { get; } 13 | public Version SourceVersion { get; } 14 | public Version TargetVersion { get; } 15 | 16 | #endregion 17 | 18 | ///////////////////////////////////////////////////////// 19 | #region Constructors 20 | 21 | public FileData(FileType fileType, string sourcePath, string targetPath, Version sourceVersion, Version targetVersion) 22 | { 23 | FileType = fileType; 24 | SourcePath = sourcePath; 25 | TargetPath = targetPath; 26 | SourceVersion = sourceVersion; 27 | TargetVersion = targetVersion; 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /DevGuide.md: -------------------------------------------------------------------------------- 1 | # Solution Start Page - Dev Guide 2 | 3 | This document gives generals advices and rules for developing in this solution. 4 | 5 | ## Solution Structure 6 | 7 | The solution is structured into several projects, seperated into their concerns: 8 | - SolutionStartPage --> The start-up project, hosted inside the Visual Studio start page container; only contains files required for the extension and the Visual Studio Gallery etc. 9 | - SolutionStartPage.Core --> The general core functionality, for bootstrapping and the presenting logic 10 | - SolutionStartPage.Shared --> Shared library used across the whole application (except SolutionStartPage project) 11 | - SolutionStartPage.Proxies --> Contains proxie classes, used for runtime specific resolving of controls 12 | - SolutionStartPage.Vs#### --> Visual Studio Version specific implementation of controls 13 | 14 | The SolutionStartPage project (main project, containing the StartPage.xaml file) must reference 15 | all the other projects (even if declared as "Unused Reference" by ReSharper), in order to include them inside the VSIX. -------------------------------------------------------------------------------- /SolutionStartPage.Core/BLL/Provider/MainResourceProvider.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.BLL.Provider 2 | { 3 | using System.Globalization; 4 | using System.Windows; 5 | using Localization; 6 | using Shared.BLL.Provider; 7 | 8 | public class MainResourceProvider : IResourceProvider 9 | { 10 | ///////////////////////////////////////////////////////// 11 | #region IResourceProvider Member 12 | 13 | CultureInfo IResourceProvider.Culture 14 | { 15 | get => Main.Culture; 16 | set => Main.Culture = value; 17 | } 18 | 19 | public string this[string key] 20 | { 21 | get 22 | { 23 | var resource = Main.ResourceManager.GetString(key, Main.Culture); 24 | if (resource == null) 25 | throw new ResourceReferenceKeyNotFoundException( 26 | "Couldn't find the requested text in the localization resources.", key); 27 | return resource; 28 | } 29 | } 30 | 31 | #endregion 32 | } 33 | } -------------------------------------------------------------------------------- /SolutionStartPage/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Daniel Kuschny 4 | Copyright (c) 2015 Stefan Over 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Properties/settings.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34209 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2010.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Properties/settings.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2013.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SolutionStartPage/readme.md: -------------------------------------------------------------------------------- 1 | # Solution Start Page 2 | 3 | This is a start page based on the default VS2015 and VS2017 one. 4 | The 'news' section is replaced by a customizable overview of your solutions. 5 | 6 | 7 | # Getting Started 8 | 9 | ## Installation 10 | 11 | - Install the Extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Herdo.SolutionStartPage) 12 | - Select the proper Visual Studio version(s) you want to install the extension for 13 | - Type "Startup" in the Quick Launch box (in newer VS versions) or go to Tools --> Options --> Environment --> Startup and select the 'Solution Start Page' as start page 14 | 15 | ## Usage 16 | 17 | - Right-click the right part of the new start page and enable the edit mode 18 | - To save the settings, right-click the same part again, and disable the edit mode 19 | - At the bottom, define the amount of columns you want to display 20 | - Add your first group at the bottom 21 | - You can also bulk add solutions in a specific directory 22 | - Enter a new name for the created group 23 | - Click to add a solution, browse for a .sln file and add it 24 | - Customize the solution appearance by editing the controls below it 25 | - Move groups and solutions with the arrow keys. -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Properties/settings.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.42000 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2015.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Properties/settings.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.42000 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2017.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Commands/CommandParameter.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | namespace SolutionStartPage.Shared.Commands 4 | { 5 | public static class CommandParameter 6 | { 7 | public const string OPEN_SOLUTION_OPEN = "OpenSolutionOpen"; 8 | public const string OPEN_SOLUTION_OPEN_EXPLORER = "OpenSolutionOpenExplorer"; 9 | public const string ALTER_PAGE_ADD_GROUP = "AddGroup"; 10 | public const string ALTER_PAGE_ADD_GROUP_BULK_SINGLE = "AddGroupBulkSingleGroup"; 11 | public const string ALTER_PAGE_ADD_GROUP_BULK_MULTIPLE = "AddGroupBulkMultipleGroups"; 12 | public const string ALTER_PAGE_DELETE_ALL_GROUPS = "DeleteAllGroups"; 13 | public const string ALTER_SOLUTION_MOVE_UP = "MoveUp"; 14 | public const string ALTER_SOLUTION_MOVE_DOWN = "MoveDown"; 15 | public const string ALTER_SOLUTION_REMOVE_SOLUTION = "RemoveSolution"; 16 | public const string ALTER_SOLUTION_GROUP_MOVE_GROUP_BACK = "MoveGroupBack"; 17 | public const string ALTER_SOLUTION_GROUP_MOVE_GROUP_FORWARD = "MoveGroupForward"; 18 | public const string ALTER_SOLUTION_GROUP_REMOVE_GROUP = "RemoveGroup"; 19 | public const string ALTER_SOLUTION_GROUP_ADD_SOLUTION = "AddSolution"; 20 | } 21 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Solution Start Page 2 | 3 | This is a start page replacing the start pages of VS2010, VS2013, VS2015 and VS2017. 4 | The 'news' section is replaced by a customizable overview of your solutions. 5 | 6 | 7 | # Getting Started 8 | 9 | ## Installation 10 | 11 | - Install the Extension from the [Visual Studio Extension Gallery](https://visualstudiogallery.msdn.microsoft.com/de5a8b10-d521-43ba-8af4-938c19b10ec9) 12 | - Select the proper Visual Studio version(s) you want to install the extension for 13 | - Type "Startup" in the Quick Launch box (in newer VS versions) or go to Tools --> Options --> Environment --> Startup and select the 'Solution Start Page' as start page 14 | 15 | ## Usage 16 | 17 | - Right-click the right part of the new start page and enable the edit mode 18 | - To save the settings, right-click the same part again, and disable the edit mode 19 | - At the bottom, define the amount of columns you want to display 20 | - Add your first group at the bottom 21 | - You can also bulk add solutions in a specific directory 22 | - Enter a new name for the created group 23 | - Click to add a solution, browse for a .sln file and add it 24 | - Customize the solution appearance by editing the controls below it 25 | - Move groups and solutions with the arrow keys. 26 | -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/ContentProxyBaseControl.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | using Shared.Funtionality; 7 | using Shared.Views; 8 | 9 | /// 10 | /// Basic proxy implementation. 11 | /// 12 | /// The common subject type for the proxy and the actual implementation. 13 | public abstract class ContentProxyBaseControl : UserControl 14 | where TSubject : IBasicControlSubject 15 | { 16 | ///////////////////////////////////////////////////////// 17 | #region Fields 18 | 19 | private readonly TSubject _realSubject; 20 | 21 | #endregion 22 | 23 | ///////////////////////////////////////////////////////// 24 | #region Properties 25 | 26 | protected TSubject RealSubject 27 | { 28 | get { return _realSubject; } 29 | } 30 | 31 | #endregion 32 | 33 | ///////////////////////////////////////////////////////// 34 | #region Constructors 35 | 36 | protected ContentProxyBaseControl() 37 | { 38 | _realSubject = UnityFactory.Resolve(); 39 | Content = _realSubject; 40 | } 41 | 42 | #endregion 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Models/IdeModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Models 2 | { 3 | using System; 4 | using EnvDTE80; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using Shared.Models; 7 | 8 | public class IdeModel : IIdeModel 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region Private Methods 13 | 14 | private static DTE2 GetDte(object dataContext) 15 | { 16 | var dataSource = dataContext as IVsUIDataSource; 17 | if (dataSource != null) 18 | { 19 | IVsUIObject obj; 20 | object result; 21 | if (dataSource.GetValue("DTE", out obj) == 0 22 | && obj.get_Data(out result) == 0) 23 | { 24 | return result as DTE2; 25 | } 26 | } 27 | return null; 28 | } 29 | 30 | #endregion 31 | 32 | ///////////////////////////////////////////////////////// 33 | 34 | #region IIdeModel Member 35 | 36 | IIde IIdeModel.GetIde(object dataContext, Func ideResolver) 37 | { 38 | var dte = GetDte(dataContext); 39 | if (dte == null) 40 | return null; 41 | 42 | var ide = ideResolver(); 43 | ide.IdeAccess = dte; 44 | return ide; 45 | } 46 | 47 | #endregion 48 | } 49 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Models/IdeModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Models 2 | { 3 | using System; 4 | using EnvDTE80; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using Shared.Models; 7 | 8 | public class IdeModel : IIdeModel 9 | { 10 | ///////////////////////////////////////////////////////// 11 | 12 | #region Private Methods 13 | 14 | private static DTE2 GetDte(object dataContext) 15 | { 16 | var dataSource = dataContext as IVsUIDataSource; 17 | if (dataSource != null) 18 | { 19 | IVsUIObject obj; 20 | object result; 21 | if (dataSource.GetValue("DTE", out obj) == 0 22 | && obj.get_Data(out result) == 0) 23 | { 24 | return result as DTE2; 25 | } 26 | } 27 | return null; 28 | } 29 | 30 | #endregion 31 | 32 | ///////////////////////////////////////////////////////// 33 | 34 | #region IIdeModel Member 35 | 36 | IIde IIdeModel.GetIde(object dataContext, Func ideResolver) 37 | { 38 | var dte = GetDte(dataContext); 39 | if (dte == null) 40 | return null; 41 | 42 | var ide = ideResolver(); 43 | ide.IdeAccess = dte; 44 | return ide; 45 | } 46 | 47 | #endregion 48 | } 49 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/SolutionPageView/SolutionGroupControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.SolutionPageView 2 | { 3 | using System.Windows.Input; 4 | using Shared.Models; 5 | using Shared.Views.SolutionPageView; 6 | 7 | /// 8 | /// Interaction logic for SolutionGroupControl.xaml 9 | /// 10 | public partial class SolutionGroupControl : ISolutionGroupControl 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Properties 15 | 16 | private SolutionGroup SolutionGroup => DataContext as SolutionGroup; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | 22 | #region Constructors 23 | 24 | public SolutionGroupControl() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | 33 | #region Event Handler 34 | 35 | private void AlterSolutionGroup_OnExecuted(object sender, ExecutedRoutedEventArgs e) 36 | { 37 | SolutionGroup?.TriggerAlterSolutionGroup_Executed(e); 38 | } 39 | 40 | private void AlterSolutionGroup_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 41 | { 42 | SolutionGroup?.TriggerAlterSolutionGroup_CanExecute(e); 43 | } 44 | 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/SolutionPageView/SolutionGroupControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.SolutionPageView 2 | { 3 | using System.Windows.Input; 4 | using Shared.Models; 5 | using Shared.Views.SolutionPageView; 6 | 7 | /// 8 | /// Interaction logic for SolutionGroupControl.xaml 9 | /// 10 | public partial class SolutionGroupControl : ISolutionGroupControl 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Properties 15 | 16 | private SolutionGroup SolutionGroup => DataContext as SolutionGroup; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | 22 | #region Constructors 23 | 24 | public SolutionGroupControl() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | 33 | #region Event Handler 34 | 35 | private void AlterSolutionGroup_OnExecuted(object sender, ExecutedRoutedEventArgs e) 36 | { 37 | SolutionGroup?.TriggerAlterSolutionGroup_Executed(e); 38 | } 39 | 40 | private void AlterSolutionGroup_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 41 | { 42 | SolutionGroup?.TriggerAlterSolutionGroup_CanExecute(e); 43 | } 44 | 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/SolutionPageView/SolutionGroupControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.SolutionPageView 2 | { 3 | using System.Windows.Input; 4 | using Shared.Models; 5 | using Shared.Views.SolutionPageView; 6 | 7 | /// 8 | /// Interaction logic for SolutionGroupControl.xaml 9 | /// 10 | public partial class SolutionGroupControl : ISolutionGroupControl 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Properties 15 | 16 | private SolutionGroup SolutionGroup => DataContext as SolutionGroup; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | 22 | #region Constructors 23 | 24 | public SolutionGroupControl() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | 33 | #region Event Handler 34 | 35 | private void AlterSolutionGroup_OnExecuted(object sender, ExecutedRoutedEventArgs e) 36 | { 37 | SolutionGroup?.TriggerAlterSolutionGroup_Executed(e); 38 | } 39 | 40 | private void AlterSolutionGroup_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 41 | { 42 | SolutionGroup?.TriggerAlterSolutionGroup_CanExecute(e); 43 | } 44 | 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/SolutionPageView/SolutionGroupControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.SolutionPageView 2 | { 3 | using System.Windows.Input; 4 | using Shared.Models; 5 | using Shared.Views.SolutionPageView; 6 | 7 | /// 8 | /// Interaction logic for SolutionGroupControl.xaml 9 | /// 10 | public partial class SolutionGroupControl : ISolutionGroupControl 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Properties 15 | 16 | private SolutionGroup SolutionGroup => DataContext as SolutionGroup; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | 22 | #region Constructors 23 | 24 | public SolutionGroupControl() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | 33 | #region Event Handler 34 | 35 | private void AlterSolutionGroup_OnExecuted(object sender, ExecutedRoutedEventArgs e) 36 | { 37 | SolutionGroup?.TriggerAlterSolutionGroup_Executed(e); 38 | } 39 | 40 | private void AlterSolutionGroup_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 41 | { 42 | SolutionGroup?.TriggerAlterSolutionGroup_CanExecute(e); 43 | } 44 | 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/DAL/FileSystem.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.DAL 2 | { 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Diagnostics.CodeAnalysis; 6 | using System.IO; 7 | using Shared.DAL; 8 | 9 | [ExcludeFromCodeCoverage] 10 | public class FileSystem : IFileSystem 11 | { 12 | IEnumerable IFileSystem.GetFilesInDirectory(string directory, string pattern) 13 | { 14 | var di = new DirectoryInfo(directory); 15 | return di.GetFiles(pattern, SearchOption.AllDirectories); 16 | } 17 | 18 | DirectoryInfo IFileSystem.GetParentDirectory(string directory) 19 | { 20 | return Directory.GetParent(directory); 21 | } 22 | 23 | bool IFileSystem.DirectoryExists(string directory) 24 | { 25 | return Directory.Exists(directory); 26 | } 27 | 28 | bool IFileSystem.FileExists(string file) 29 | { 30 | return File.Exists(file); 31 | } 32 | 33 | FileVersionInfo IFileSystem.GetFileVersionInfo(string file) 34 | { 35 | return FileVersionInfo.GetVersionInfo(file); 36 | } 37 | 38 | void IFileSystem.WriteAllTextToFile(string file, string contents) 39 | { 40 | File.WriteAllText(file, contents); 41 | } 42 | 43 | void IFileSystem.DeleteFile(string file) 44 | { 45 | File.Delete(file); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | 8 | [assembly: AssemblyTitle("SolutionStartPage.Core")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SolutionStartPage.Core")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | 25 | [assembly: Guid("cf74423e-da16-493f-8a1a-62e810696a87")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("3.1.0.0")] 39 | [assembly: AssemblyFileVersion("3.1.0.0")] 40 | -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | 8 | [assembly: AssemblyTitle("SolutionStartPage.Shared")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SolutionStartPage.Shared")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | 25 | [assembly: Guid("1b659b5e-fe39-4232-873c-ed4bb65346e4")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("3.1.0.0")] 39 | [assembly: AssemblyFileVersion("3.1.0.0")] 40 | -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | 8 | [assembly: AssemblyTitle("SolutionStartPage.UnitTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SolutionStartPage.UnitTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | 25 | [assembly: Guid("7228ab34-2201-4eb0-964d-4cffa32fcab3")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("1.0.0.0")] 39 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SolutionStartPage.Proxies")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SolutionStartPage.Proxies")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ff21000d-81a2-4bb9-94db-cdf4ac6d1b37")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.5.0.0")] 36 | [assembly: AssemblyFileVersion("1.5.0.0")] 37 | -------------------------------------------------------------------------------- /StartPageDebugHelper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("StartPageDebugHelper")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("StartPageDebugHelper")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("49970af0-2c3f-48ea-8ebe-d236a1ff88fd")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("1.0.0.0")] 40 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/BaseActionProvider.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions 2 | { 3 | using System; 4 | using static System.Console; 5 | using static System.String; 6 | 7 | public abstract class BaseActionProvider 8 | { 9 | ///////////////////////////////////////////////////////// 10 | #region Fields 11 | 12 | protected readonly string DisplayName; 13 | 14 | #endregion 15 | 16 | ///////////////////////////////////////////////////////// 17 | #region Constructors 18 | 19 | /// 20 | /// Initializes a new instance of the class. 21 | /// 22 | /// The display name for the provider to display. 23 | /// is null, empty or whitespace. 24 | protected BaseActionProvider(string displayName) 25 | { 26 | if (IsNullOrWhiteSpace(displayName)) 27 | throw new ArgumentNullException(nameof(displayName)); 28 | 29 | DisplayName = displayName; 30 | } 31 | 32 | #endregion 33 | 34 | ///////////////////////////////////////////////////////// 35 | #region Protected Methods 36 | 37 | protected void PrintActionBase() 38 | { 39 | Clear(); 40 | ForegroundColor = ConsoleColor.DarkYellow; 41 | WriteLine($"Executing '{DisplayName}'."); 42 | ResetColor(); 43 | } 44 | 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.sln.DotSettings: -------------------------------------------------------------------------------- 1 | 2 | True 3 | True 4 | True 5 | True 6 | True 7 | DLL 8 | IO 9 | PDB 10 | XAML -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Core/Views/BasicPart/VsoPagePresenterTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Core.Views.BasicPart 2 | { 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Windows; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using SolutionStartPage.Core.Views.BasicPart; 7 | using SolutionStartPage.Shared.Models; 8 | using SolutionStartPage.Shared.Views.BasicPart; 9 | using Telerik.JustMock; 10 | 11 | [TestClass] 12 | [ExcludeFromCodeCoverage] 13 | public class VsoPagePresenterTest 14 | { 15 | [TestMethod] 16 | public void ViewLoaded() 17 | { 18 | // Arrange 19 | var vsVersion = Mock.Create(); 20 | var ide = Mock.Create(); 21 | var view = Mock.Create(); 22 | var vm = Mock.Create(); 23 | 24 | var dataSourceConnected = false; 25 | var startPageHeaderTitleSet = false; 26 | 27 | Mock.Arrange(() => view.ConnectDataSource(vm)).DoInstead(() => dataSourceConnected = true); 28 | Mock.ArrangeSet(() => vm.StartPageHeaderTitle = Arg.AnyString) 29 | .DoInstead(() => startPageHeaderTitleSet = true); 30 | var presenter = new VsoPagePresenter(vsVersion, ide, view, vm); 31 | 32 | // Act 33 | Mock.Raise(() => view.Loaded += null, new RoutedEventArgs()); 34 | 35 | // Assert 36 | Assert.IsTrue(dataSourceConnected); 37 | Assert.IsTrue(startPageHeaderTitleSet); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Vs2010Bootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010 2 | { 3 | using Microsoft.Practices.Unity; 4 | using Models; 5 | using Shared; 6 | using Shared.Models; 7 | using Shared.Views.BasicPart; 8 | using Shared.Views.PageRootView; 9 | using Shared.Views.SolutionPageView; 10 | using Views.BasicPart; 11 | using Views.PageRootView; 12 | using Views.SolutionPageView; 13 | 14 | public class Vs2010Bootstrapper : IBootstrapper 15 | { 16 | public void Configure(IUnityContainer container) 17 | { 18 | container 19 | // Register Models 20 | .RegisterType(new ContainerControlledLifetimeManager()) 21 | .RegisterType(new ContainerControlledLifetimeManager()) 22 | 23 | // Register Views & their components 24 | // Root View 25 | .RegisterType() 26 | // Basic Part 27 | .RegisterType() 28 | .RegisterType() 29 | // Solution Page 30 | .RegisterType() 31 | .RegisterType() 32 | .RegisterType() 33 | .RegisterType() 34 | .RegisterType() 35 | ; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Vs2013Bootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013 2 | { 3 | using Microsoft.Practices.Unity; 4 | using Models; 5 | using Shared; 6 | using Shared.Models; 7 | using Shared.Views.BasicPart; 8 | using Shared.Views.PageRootView; 9 | using Shared.Views.SolutionPageView; 10 | using Views.BasicPart; 11 | using Views.PageRootView; 12 | using Views.SolutionPageView; 13 | 14 | public class Vs2013Bootstrapper : IBootstrapper 15 | { 16 | public void Configure(IUnityContainer container) 17 | { 18 | container 19 | // Register Models 20 | .RegisterType(new ContainerControlledLifetimeManager()) 21 | .RegisterType(new ContainerControlledLifetimeManager()) 22 | 23 | // Register Views & their components 24 | // Root View 25 | .RegisterType() 26 | // Basic Part 27 | .RegisterType() 28 | .RegisterType() 29 | // Solution Page 30 | .RegisterType() 31 | .RegisterType() 32 | .RegisterType() 33 | .RegisterType() 34 | .RegisterType() 35 | ; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Vs2015Bootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015 2 | { 3 | using Models; 4 | using Shared; 5 | using Shared.Models; 6 | using Shared.Views.BasicPart; 7 | using Shared.Views.PageRootView; 8 | using Shared.Views.SolutionPageView; 9 | using Unity; 10 | using Unity.Lifetime; 11 | using Views.BasicPart; 12 | using Views.PageRootView; 13 | using Views.SolutionPageView; 14 | 15 | public class Vs2015Bootstrapper : IBootstrapper 16 | { 17 | public void Configure(IUnityContainer container) 18 | { 19 | container 20 | // Register Models 21 | .RegisterType(new ContainerControlledLifetimeManager()) 22 | .RegisterType(new ContainerControlledLifetimeManager()) 23 | 24 | // Register Views & their components 25 | // Root View 26 | .RegisterType() 27 | // Basic Part 28 | .RegisterType() 29 | .RegisterType() 30 | // Solution Page 31 | .RegisterType() 32 | .RegisterType() 33 | .RegisterType() 34 | .RegisterType() 35 | .RegisterType() 36 | ; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Vs2017Bootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017 2 | { 3 | using Models; 4 | using Shared; 5 | using Shared.Models; 6 | using Shared.Views.BasicPart; 7 | using Shared.Views.PageRootView; 8 | using Shared.Views.SolutionPageView; 9 | using Unity; 10 | using Unity.Lifetime; 11 | using Views.BasicPart; 12 | using Views.PageRootView; 13 | using Views.SolutionPageView; 14 | 15 | public class Vs2017Bootstrapper : IBootstrapper 16 | { 17 | public void Configure(IUnityContainer container) 18 | { 19 | container 20 | // Register Models 21 | .RegisterType(new ContainerControlledLifetimeManager()) 22 | .RegisterType(new ContainerControlledLifetimeManager()) 23 | 24 | // Register Views & their components 25 | // Root View 26 | .RegisterType() 27 | // Basic Part 28 | .RegisterType() 29 | .RegisterType() 30 | // Solution Page 31 | .RegisterType() 32 | .RegisterType() 33 | .RegisterType() 34 | .RegisterType() 35 | .RegisterType() 36 | ; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /SolutionStartPage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("Solution Start Page")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Solution Start Page")] 14 | [assembly: AssemblyCopyright("Copyright © 2015 Stefan Over")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("58A2B87A-464D-4D54-BD5D-A5369671F9C6")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("3.3.0.0")] 40 | [assembly: AssemblyFileVersion("3.3.0.0")] 41 | [assembly: NeutralResourcesLanguage("en-US")] -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("Solution Start Page")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Solution Start Page")] 14 | [assembly: AssemblyCopyright("Copyright © 2015 Stefan Over")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("58A2B87A-464D-4D54-BD5D-A5369671F9C6")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("2.5.0.0")] 40 | [assembly: AssemblyFileVersion("2.5.0.0")] 41 | [assembly: NeutralResourcesLanguage("en-US")] -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("Solution Start Page")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Solution Start Page")] 14 | [assembly: AssemblyCopyright("Copyright © 2015 Stefan Over")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("58A2B87A-464D-4D54-BD5D-A5369671F9C6")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("2.5.0.0")] 40 | [assembly: AssemblyFileVersion("2.5.0.0")] 41 | [assembly: NeutralResourcesLanguage("en-US")] -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("Solution Start Page")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Solution Start Page")] 14 | [assembly: AssemblyCopyright("Copyright © 2015 Stefan Over")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("58A2B87A-464D-4D54-BD5D-A5369671F9C6")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("3.1.0.0")] 40 | [assembly: AssemblyFileVersion("3.1.0.0")] 41 | [assembly: NeutralResourcesLanguage("en-US")] -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | 9 | [assembly: AssemblyTitle("Solution Start Page")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Solution Start Page")] 14 | [assembly: AssemblyCopyright("Copyright © 2017 Stefan Over")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | 26 | [assembly: Guid("58A2B87A-464D-4D54-BD5D-A5369671F9C6")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | 39 | [assembly: AssemblyVersion("3.1.0.0")] 40 | [assembly: AssemblyFileVersion("3.1.0.0")] 41 | [assembly: NeutralResourcesLanguage("en-US")] -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Commands/Commands.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Commands 2 | { 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Windows.Input; 5 | 6 | [ExcludeFromCodeCoverage] 7 | public static class Commands 8 | { 9 | #region OpenSolution 10 | 11 | private static RoutedUICommand _openSolution; 12 | 13 | public static RoutedCommand OpenSolution 14 | => _openSolution ?? (_openSolution = new RoutedUICommand("OpenSolution", 15 | "OpenSolution", 16 | typeof (Commands))); 17 | 18 | #endregion 19 | 20 | #region AlterSolution 21 | 22 | private static RoutedUICommand _alterSolution; 23 | 24 | public static RoutedCommand AlterSolution 25 | => _alterSolution ?? (_alterSolution = new RoutedUICommand("AlterSolution", 26 | "AlterSolution", 27 | typeof (Commands))); 28 | 29 | #endregion 30 | 31 | #region AlterSolutionGroup 32 | 33 | private static RoutedUICommand _alterSolutionGroup; 34 | 35 | public static RoutedCommand AlterSolutionGroup 36 | => _alterSolutionGroup ?? (_alterSolutionGroup = new RoutedUICommand("AlterSolutionGroup", 37 | "AlterSolutionGroup", 38 | typeof (Commands))); 39 | 40 | #endregion 41 | 42 | #region AlterPage 43 | 44 | private static RoutedUICommand _alterPage; 45 | 46 | public static RoutedCommand AlterPage => _alterPage ?? (_alterPage = new RoutedUICommand("AlterPage", 47 | "AlterPage", 48 | typeof (Commands))); 49 | 50 | #endregion 51 | } 52 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/ExecuteableAction.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions 2 | { 3 | using System; 4 | 5 | public class ExecuteableAction : BaseActionProvider, 6 | IActionProvider 7 | { 8 | ///////////////////////////////////////////////////////// 9 | #region Fields 10 | 11 | private readonly Action _action; 12 | 13 | #endregion 14 | 15 | ///////////////////////////////////////////////////////// 16 | #region Constructors 17 | 18 | /// 19 | /// Initializes a new instance of the class with a specific to execute. 20 | /// 21 | /// The display name for the provider to display. 22 | /// The action to execute, when is called. 23 | /// is null. 24 | public ExecuteableAction(string displayName, Action action) 25 | : base(displayName) 26 | { 27 | if (action == null) 28 | throw new ArgumentNullException(nameof(action)); 29 | 30 | _action = action; 31 | } 32 | 33 | #endregion 34 | 35 | ///////////////////////////////////////////////////////// 36 | #region IActionProvider Member 37 | 38 | string IActionProvider.DisplayName => DisplayName; 39 | 40 | void IActionProvider.ExecuteAction() 41 | { 42 | PrintActionBase(); 43 | _action(); 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/PageRootView/PageRootControl.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/PageRootView/PageRootControl.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/PageRootView/PageRootControl.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/PageRootView/PageRootControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.PageRootView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using Shared.Views.BasicPart; 6 | using Shared.Views.PageRootView; 7 | using Shared.Views.SolutionPageView; 8 | 9 | /// 10 | /// Interaction logic for PageRootControl.xaml 11 | /// 12 | public partial class PageRootControl : IPageRootView 13 | { 14 | ///////////////////////////////////////////////////////// 15 | 16 | #region Fields 17 | 18 | private readonly FrameworkElement _vsoPageControl; 19 | private readonly FrameworkElement _solutionPageControl; 20 | 21 | #endregion 22 | 23 | ///////////////////////////////////////////////////////// 24 | 25 | #region Constructors 26 | 27 | public PageRootControl(IVsoPagePresenter vsoPagePresenter, ISolutionPagePresenter solutionPagePresenter) 28 | { 29 | InitializeComponent(); 30 | 31 | _vsoPageControl = vsoPagePresenter.View as FrameworkElement; 32 | _solutionPageControl = solutionPagePresenter.View as FrameworkElement; 33 | 34 | LayoutViewComponents(); 35 | } 36 | 37 | #endregion 38 | 39 | ///////////////////////////////////////////////////////// 40 | 41 | #region Private Methods 42 | 43 | private void LayoutViewComponents() 44 | { 45 | // Add VSO Page Control 46 | LayoutGrid.Children.Add(_vsoPageControl); 47 | 48 | // Add Solution Page Control 49 | LayoutGrid.Children.Add(_solutionPageControl); 50 | Grid.SetColumn(_solutionPageControl, 1); 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/PageRootView/PageRootControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.PageRootView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using Shared.Views.BasicPart; 6 | using Shared.Views.PageRootView; 7 | using Shared.Views.SolutionPageView; 8 | 9 | /// 10 | /// Interaction logic for PageRootControl.xaml 11 | /// 12 | public partial class PageRootControl : IPageRootView 13 | { 14 | ///////////////////////////////////////////////////////// 15 | 16 | #region Fields 17 | 18 | private readonly FrameworkElement _vsoPageControl; 19 | private readonly FrameworkElement _solutionPageControl; 20 | 21 | #endregion 22 | 23 | ///////////////////////////////////////////////////////// 24 | 25 | #region Constructors 26 | 27 | public PageRootControl(IVsoPagePresenter vsoPagePresenter, ISolutionPagePresenter solutionPagePresenter) 28 | { 29 | InitializeComponent(); 30 | 31 | _vsoPageControl = vsoPagePresenter.View as FrameworkElement; 32 | _solutionPageControl = solutionPagePresenter.View as FrameworkElement; 33 | 34 | LayoutViewComponents(); 35 | } 36 | 37 | #endregion 38 | 39 | ///////////////////////////////////////////////////////// 40 | 41 | #region Private Methods 42 | 43 | private void LayoutViewComponents() 44 | { 45 | // Add VSO Page Control 46 | LayoutGrid.Children.Add(_vsoPageControl); 47 | 48 | // Add Solution Page Control 49 | LayoutGrid.Children.Add(_solutionPageControl); 50 | Grid.SetColumn(_solutionPageControl, 1); 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/PageRootView/PageRootControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.PageRootView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using Shared.Views.BasicPart; 6 | using Shared.Views.PageRootView; 7 | using Shared.Views.SolutionPageView; 8 | 9 | /// 10 | /// Interaction logic for PageRootControl.xaml 11 | /// 12 | public partial class PageRootControl : IPageRootView 13 | { 14 | ///////////////////////////////////////////////////////// 15 | 16 | #region Fields 17 | 18 | private readonly FrameworkElement _vsoPageControl; 19 | private readonly FrameworkElement _solutionPageControl; 20 | 21 | #endregion 22 | 23 | ///////////////////////////////////////////////////////// 24 | 25 | #region Constructors 26 | 27 | public PageRootControl(IVsoPagePresenter vsoPagePresenter, ISolutionPagePresenter solutionPagePresenter) 28 | { 29 | InitializeComponent(); 30 | 31 | _vsoPageControl = vsoPagePresenter.View as FrameworkElement; 32 | _solutionPageControl = solutionPagePresenter.View as FrameworkElement; 33 | 34 | LayoutViewComponents(); 35 | } 36 | 37 | #endregion 38 | 39 | ///////////////////////////////////////////////////////// 40 | 41 | #region Private Methods 42 | 43 | private void LayoutViewComponents() 44 | { 45 | // Add VSO Page Control 46 | LayoutGrid.Children.Add(_vsoPageControl); 47 | 48 | // Add Solution Page Control 49 | LayoutGrid.Children.Add(_solutionPageControl); 50 | Grid.SetColumn(_solutionPageControl, 1); 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Models/IdeModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Models 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Diagnostics; 6 | using EnvDTE80; 7 | using Microsoft.Internal.VisualStudio.PlatformUI; 8 | using Shared.Models; 9 | 10 | public class IdeModel : IIdeModel 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Private Methods 15 | 16 | private static DTE2 GetDte(object dataContext) 17 | { 18 | if (dataContext == null) 19 | return null; 20 | var typeDescriptor = dataContext as ICustomTypeDescriptor; 21 | if (typeDescriptor != null) 22 | { 23 | PropertyDescriptorCollection propertyCollection = typeDescriptor.GetProperties(); 24 | return propertyCollection.Find("DTE", false).GetValue(dataContext) as DTE2; 25 | } 26 | var dataSource = dataContext as DataSource; 27 | if (dataSource != null) 28 | { 29 | return dataSource.GetValue("DTE") as DTE2; 30 | } 31 | Debug.Assert(false, 32 | "Could not get DTE instance, was " + (dataContext == null ? "null" : dataContext.GetType().ToString())); 33 | return null; 34 | } 35 | 36 | #endregion 37 | 38 | ///////////////////////////////////////////////////////// 39 | 40 | #region IIdeModel Member 41 | 42 | IIde IIdeModel.GetIde(object dataContext, Func ideResolver) 43 | { 44 | var dte = GetDte(dataContext); 45 | if (dte == null) 46 | return null; 47 | 48 | var ide = ideResolver(); 49 | ide.IdeAccess = dte; 50 | return ide; 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Models/IdeModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Models 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Diagnostics; 6 | using EnvDTE80; 7 | using Microsoft.Internal.VisualStudio.PlatformUI; 8 | using Shared.Models; 9 | 10 | public class IdeModel : IIdeModel 11 | { 12 | ///////////////////////////////////////////////////////// 13 | 14 | #region Private Methods 15 | 16 | private static DTE2 GetDte(object dataContext) 17 | { 18 | if (dataContext == null) 19 | return null; 20 | var typeDescriptor = dataContext as ICustomTypeDescriptor; 21 | if (typeDescriptor != null) 22 | { 23 | PropertyDescriptorCollection propertyCollection = typeDescriptor.GetProperties(); 24 | return propertyCollection.Find("DTE", false).GetValue(dataContext) as DTE2; 25 | } 26 | var dataSource = dataContext as DataSource; 27 | if (dataSource != null) 28 | { 29 | return dataSource.GetValue("DTE") as DTE2; 30 | } 31 | Debug.Assert(false, 32 | "Could not get DTE instance, was " + (dataContext == null ? "null" : dataContext.GetType().ToString())); 33 | return null; 34 | } 35 | 36 | #endregion 37 | 38 | ///////////////////////////////////////////////////////// 39 | 40 | #region IIdeModel Member 41 | 42 | IIde IIdeModel.GetIde(object dataContext, Func ideResolver) 43 | { 44 | var dte = GetDte(dataContext); 45 | if (dte == null) 46 | return null; 47 | 48 | var ide = ideResolver(); 49 | ide.IdeAccess = dte; 50 | return ide; 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/Converter/SolutionWidthToTextWidthConverterTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Shared.Converter 2 | { 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using SolutionStartPage.Shared.Converter; 7 | 8 | [TestClass] 9 | [ExcludeFromCodeCoverage] 10 | public class SolutionWidthToTextWidthConverterTest 11 | { 12 | [TestMethod] 13 | [ExpectedException(typeof (NotSupportedException))] 14 | public void ConvertBack_NotSupportedException() 15 | { 16 | // Arrange 17 | var converter = new SolutionWidthToTextWidthConverter(); 18 | 19 | // Act 20 | converter.ConvertBack(null, null, null, null); 21 | } 22 | 23 | [TestMethod] 24 | public void Convert_Success() 25 | { 26 | // Arrange 27 | var converter = new SolutionWidthToTextWidthConverter(); 28 | 29 | // Act 30 | var result = converter.Convert(64.0, null, null, null); 31 | 32 | // Assert 33 | Assert.AreEqual(32.0, result); 34 | } 35 | 36 | [TestMethod] 37 | [ExpectedException(typeof (InvalidCastException))] 38 | public void Convert_InvalidCastException_value() 39 | { 40 | // Arrange 41 | var converter = new SolutionWidthToTextWidthConverter(); 42 | 43 | // Act 44 | converter.Convert("foo", null, null, null); 45 | } 46 | 47 | [TestMethod] 48 | [ExpectedException(typeof (NullReferenceException))] 49 | public void Convert_NullReferenceException_value() 50 | { 51 | // Arrange 52 | var converter = new SolutionWidthToTextWidthConverter(); 53 | 54 | // Act 55 | converter.Convert(null, null, null, null); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/Views/BasePresenter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.Views 2 | { 3 | using System.Threading.Tasks; 4 | using System.Windows; 5 | using Annotations; 6 | using Shared.Views; 7 | using static Shared.Utilities; 8 | 9 | public abstract class BasePresenter : IPresenter 10 | where TView : IView 11 | where TViewModel : IViewModel 12 | { 13 | ///////////////////////////////////////////////////////// 14 | #region Properties 15 | 16 | /// 17 | /// Gets the view. 18 | /// 19 | public TView View { get; } 20 | 21 | /// 22 | /// Gets the view model. 23 | /// 24 | public TViewModel ViewModel { get; } 25 | 26 | #endregion 27 | 28 | ///////////////////////////////////////////////////////// 29 | #region Constructors 30 | 31 | /// 32 | /// Initializes a new instance of the class. 33 | /// 34 | /// The view. 35 | /// The view model. 36 | /// Any parameter is null. 37 | protected BasePresenter([NotNull] TView view, 38 | [NotNull] TViewModel viewModel) 39 | { 40 | ThrowIfNull(view, nameof(view)); 41 | ThrowIfNull(viewModel, nameof(viewModel)); 42 | 43 | View = view; 44 | View.Loaded += async (sender, e) => await View_Loaded(sender, e); 45 | 46 | ViewModel = viewModel; 47 | } 48 | 49 | #endregion 50 | 51 | ///////////////////////////////////////////////////////// 52 | #region Protected Methods 53 | 54 | protected abstract Task View_Loaded(object sender, RoutedEventArgs e); 55 | 56 | #endregion 57 | } 58 | } -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/Views/SolutionPageControlProxy.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Proxies.Views 2 | { 3 | using System; 4 | using System.Windows.Input; 5 | using Microsoft.Practices.Unity; 6 | using Shared.Funtionality; 7 | using Shared.Models; 8 | using Shared.Views.SolutionPageView; 9 | 10 | public class SolutionPageControlProxy : ContentProxyBaseControl, 11 | ISolutionPageView 12 | { 13 | ///////////////////////////////////////////////////////// 14 | #region Constructors 15 | 16 | public SolutionPageControlProxy() 17 | { 18 | // Initialize presenter 19 | UnityFactory.Resolve(new ParameterOverride("view", this)); 20 | } 21 | 22 | #endregion 23 | 24 | ///////////////////////////////////////////////////////// 25 | #region ISolutionPageView Member 26 | 27 | event EventHandler ISolutionPageView.AlterPageCanExecute 28 | { 29 | add { RealSubject.AlterPageCanExecute += value; } 30 | remove { RealSubject.AlterPageCanExecute -= value; } 31 | } 32 | 33 | event EventHandler ISolutionPageView.AlterPageExecuted 34 | { 35 | add { RealSubject.AlterPageExecuted += value; } 36 | remove { RealSubject.AlterPageExecuted -= value; } 37 | } 38 | 39 | void ISolutionPageView.ConnectDataSource(ISolutionPageViewModel vm) 40 | { 41 | RealSubject.ConnectDataSource(vm); 42 | } 43 | 44 | string ISolutionPageView.BrowseBulkAddRootFolder() 45 | { 46 | return RealSubject.BrowseBulkAddRootFolder(); 47 | } 48 | 49 | Solution ISolutionPageView.BrowseSolution(SolutionGroup solutionGroup) 50 | { 51 | return RealSubject.BrowseSolution(solutionGroup); 52 | } 53 | 54 | #endregion 55 | } 56 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Visual Studio 3 | ################# 4 | 5 | ## Ignore Visual Studio temporary files, build results, and 6 | ## files generated by popular Visual Studio add-ons. 7 | 8 | # User-specific files 9 | *.suo 10 | *.user 11 | *.sln.docstates 12 | 13 | # Build results 14 | 15 | [Dd]ebug/ 16 | [Rr]elease/ 17 | x64/ 18 | build/ 19 | [Bb]in/ 20 | [Oo]bj/ 21 | 22 | # MSTest test Results 23 | [Tt]est[Rr]esult*/ 24 | [Bb]uild[Ll]og.* 25 | 26 | *_i.c 27 | *_p.c 28 | *.ilk 29 | *.meta 30 | *.obj 31 | *.pch 32 | *.pdb 33 | *.pgc 34 | *.pgd 35 | *.rsp 36 | *.sbr 37 | *.tlb 38 | *.tli 39 | *.tlh 40 | *.tmp 41 | *.tmp_proj 42 | *.log 43 | *.vspscc 44 | *.vssscc 45 | .builds 46 | *.pidb 47 | *.log 48 | *.scc 49 | 50 | # Visual Studio profiler 51 | *.psess 52 | *.vsp 53 | *.vspx 54 | 55 | # ReSharper is a .NET coding add-in 56 | _ReSharper*/ 57 | *.[Rr]e[Ss]harper 58 | 59 | # Click-Once directory 60 | publish/ 61 | 62 | # Publish Web Output 63 | *.Publish.xml 64 | *.pubxml 65 | *.publishproj 66 | 67 | # NuGet Packages Directory 68 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 69 | packages/ 70 | 71 | # Others 72 | sql/ 73 | *.Cache 74 | ClientBin/ 75 | [Ss]tyle[Cc]op.* 76 | ~$* 77 | *~ 78 | *.dbmdl 79 | *.[Pp]ublish.xml 80 | *.pfx 81 | *.publishsettings 82 | 83 | # Backup & report files from converting an old project file to a newer 84 | # Visual Studio version. Backup files are not needed, because we have git ;-) 85 | _UpgradeReport_Files/ 86 | Backup*/ 87 | UpgradeLog*.XML 88 | UpgradeLog*.htm 89 | 90 | # SQL Server files 91 | App_Data/*.mdf 92 | App_Data/*.ldf 93 | 94 | ############# 95 | ## Windows detritus 96 | ############# 97 | 98 | # Windows image file caches 99 | Thumbs.db 100 | ehthumbs.db 101 | 102 | # Folder config file 103 | Desktop.ini 104 | 105 | # Recycle Bin used on file shares 106 | $RECYCLE.BIN/ 107 | 108 | # Mac crap 109 | .DS_Store 110 | 111 | # Visual Studio crap 112 | *.lock 113 | *.ide 114 | *.ide-shm 115 | *.ide-wal -------------------------------------------------------------------------------- /SolutionStartPage/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Solution Start Page 6 | This is a start page replacing the start pages of VS2015 and VS2017. 7 | The 'news' section is replaced by a customizable overview of your solutions. 8 | https://github.com/Herdo/SolutionStartPage 9 | License.txt 10 | https://github.com/Herdo/SolutionStartPage/blob/master/SolutionStartPage/GettingStarted.md 11 | https://github.com/Herdo/SolutionStartPage/blob/master/SolutionStartPage/ReleaseNotes.md 12 | StartPage_Icon.png 13 | StartPage_Preview.png 14 | Start Page 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SolutionStartPage/ReleaseNotes.md: -------------------------------------------------------------------------------- 1 | # 3.3 2 | - Added Polish localization #23 (Localization pl-PL) 3 | - Checking if solutions are available directly when loading the configuration. 4 | This should decrease the average time the warning symbols will be displayed at start. 5 | 6 | # 3.2 7 | - Implemented change request #20 (Vista like folder browse dialog) 8 | - Implemented change request #15 (Additional configurations (display/hide icons; display/hide separator)) 9 | - Updated third party libraries 10 | 11 | # 3.1.1 12 | - Fixed issue #19 (Blank white page for VS 2017 15.6.0) 13 | 14 | # 3.1 15 | - Fixed issue #16 (Start page doesn't change background color on theme change) 16 | - Disabled MRU list due to invalid DataContext provided by Visual Studio 17 | 18 | # 3.0 19 | - Added support for VS 2017 20 | - Changed .NET Framework version to 4.6.2 21 | - Discontinued support for VS 2010 and VS 2013 22 | - Fixed scrolling on the start page 23 | 24 | # 2.4 25 | - Added support for environment variables in the paths 26 | 27 | # 2.3 28 | - Added option to hide/display folders 29 | 30 | # 2.2 31 | - Improved startup process, when loading the start page 32 | - Minor improvements 33 | 34 | # 2.1 35 | - Fixed "MRU List doesn't open any solution" (in VS 2015) 36 | 37 | # 2.0 38 | - Added support for VS 2015 (RC) 39 | - Added "Open parent directory"-Feature (by holding Ctrl and/or Shift while clicking a directory) 40 | - Added warning icon and tooltip for not existing solution files or diretories 41 | - Added localization (implemented for en-US (default) and de-DE) 42 | 43 | # 1.5 44 | - Fixed "Solution Buttons are always disabled" 45 | - New layout for the Settings region 46 | - Added text trimming for long solution names and directories 47 | - Added tooltip during edit mode for the directory preview 48 | 49 | # 1.4 50 | - Fixed "Invalid Manifest" for VS 2010 51 | 52 | # 1.3 53 | - Added support for VS2010 54 | 55 | # 1.2 56 | - Fixed "Open project..." link in the left pane 57 | 58 | # 1.1 59 | - Removed hovering effect for solution groups 60 | - Added bulk add functionality 61 | - Changed styling of links 62 | 63 | # 1.0 64 | - First Release -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/PageRootView/PageRootControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.PageRootView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using Shared.Views.BasicPart; 6 | using Shared.Views.PageRootView; 7 | using Shared.Views.SolutionPageView; 8 | 9 | /// 10 | /// Interaction logic for PageRootControl.xaml 11 | /// 12 | public partial class PageRootControl : IPageRootView 13 | { 14 | ///////////////////////////////////////////////////////// 15 | 16 | #region Fields 17 | 18 | private readonly FrameworkElement _vsoPageControl; 19 | private readonly FrameworkElement _solutionPageControl; 20 | 21 | #endregion 22 | 23 | ///////////////////////////////////////////////////////// 24 | 25 | #region Constructors 26 | 27 | public PageRootControl(IVsoPagePresenter vsoPagePresenter, ISolutionPagePresenter solutionPagePresenter) 28 | { 29 | InitializeComponent(); 30 | 31 | _vsoPageControl = vsoPagePresenter.View as FrameworkElement; 32 | _solutionPageControl = solutionPagePresenter.View as FrameworkElement; 33 | 34 | LayoutViewComponents(); 35 | } 36 | 37 | #endregion 38 | 39 | ///////////////////////////////////////////////////////// 40 | 41 | #region Private Methods 42 | 43 | private void LayoutViewComponents() 44 | { 45 | // Add VSO Page Control 46 | LayoutGrid.Children.Add(_vsoPageControl); 47 | Grid.SetRow(_vsoPageControl, 1); 48 | Grid.SetColumn(_vsoPageControl, 0); 49 | _vsoPageControl.Margin = new Thickness(15, -35, 15, 15); 50 | _vsoPageControl.VerticalAlignment = VerticalAlignment.Stretch; 51 | 52 | // Add Solution Page Control 53 | LayoutGrid.Children.Add(_solutionPageControl); 54 | Grid.SetRow(_solutionPageControl, 1); 55 | Grid.SetColumn(_solutionPageControl, 2); 56 | _solutionPageControl.Margin = new Thickness(0, -35, 15, 15); 57 | } 58 | 59 | #endregion 60 | } 61 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Models/IVisualStudioVersion.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Models 2 | { 3 | using System; 4 | 5 | public interface IVisualStudioVersion 6 | { 7 | /// 8 | /// Gets the full Visual Studio version number. 9 | /// 10 | Version FullVersion { get; } 11 | 12 | /// 13 | /// Gets a long string representation for the . 14 | /// 15 | string LongVersion { get; } 16 | 17 | /// 18 | /// Gets if the Visual Studio version is 2015 or later. 19 | /// 20 | bool Vs2015OrLater { get; } 21 | 22 | /// 23 | /// Gets if the Visual Studio version is 2013 or later. 24 | /// 25 | bool Vs2013OrLater { get; } 26 | 27 | /// 28 | /// Gets if the Visual Studio version is 2012 or later. 29 | /// 30 | bool Vs2012OrLater { get; } 31 | 32 | /// 33 | /// Gets if the Visual Studio version is 2010 or later. 34 | /// 35 | bool Vs2010OrLater { get; } 36 | 37 | /// 38 | /// Gets if the Visual Studio version is 2008 or older. 39 | /// 40 | bool Vs2008OrOlder { get; } 41 | 42 | /// 43 | /// Gets if the Visual Studio version is 2005. 44 | /// 45 | bool Vs2005 { get; } 46 | 47 | /// 48 | /// Gets if the Visual Studio version is 2008. 49 | /// 50 | bool Vs2008 { get; } 51 | 52 | /// 53 | /// Gets if the Visual Studio version is 2010. 54 | /// 55 | bool Vs2010 { get; } 56 | 57 | /// 58 | /// Gets if the Visual Studio version is 2012. 59 | /// 60 | bool Vs2012 { get; } 61 | 62 | /// 63 | /// Gets if the Visual Studio version is 2013. 64 | /// 65 | bool Vs2013 { get; } 66 | 67 | /// 68 | /// Gets if the Visual Studio version is 2015. 69 | /// 70 | bool Vs2015 { get; } 71 | } 72 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Models/SolutionPageConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Models 2 | { 3 | using System.Linq; 4 | using System.Xml.Serialization; 5 | using Views.SolutionPageView; 6 | 7 | [XmlRoot] 8 | public class SolutionPageConfiguration 9 | { 10 | ///////////////////////////////////////////////////////// 11 | #region Fields 12 | 13 | private int _columns; 14 | 15 | #endregion 16 | 17 | ///////////////////////////////////////////////////////// 18 | #region Properties 19 | 20 | [XmlElement] 21 | public int Columns 22 | { 23 | get => _columns; 24 | set 25 | { 26 | if (value == _columns) return; 27 | if (value < 1) 28 | _columns = 1; 29 | else if (value > 3) 30 | _columns = 3; 31 | else 32 | _columns = value; 33 | } 34 | } 35 | 36 | [XmlElement] 37 | public bool DisplayFolders { get; set; } 38 | 39 | [XmlElement] 40 | public bool DisplayIcons { get; set; } 41 | 42 | [XmlElement] 43 | public bool DisplaySeparator { get; set; } 44 | 45 | [XmlArray("SolutionGroups")] 46 | [XmlArrayItem("SolutionGroup")] 47 | public SolutionGroup[] SolutionGroups { get; set; } 48 | 49 | #endregion 50 | 51 | ///////////////////////////////////////////////////////// 52 | #region Constructors 53 | 54 | public SolutionPageConfiguration() 55 | { 56 | Columns = 3; 57 | DisplayFolders = true; 58 | DisplayIcons = true; 59 | DisplaySeparator = true; 60 | SolutionGroups = new SolutionGroup[0]; 61 | } 62 | 63 | #endregion 64 | 65 | ///////////////////////////////////////////////////////// 66 | #region Public Methods 67 | 68 | public SolutionPageConfiguration ApplyViewModel(ISolutionPageViewModel vm) 69 | { 70 | Columns = vm.Columns; 71 | DisplayFolders = vm.DisplayFolders; 72 | DisplayIcons = vm.DisplayIcons; 73 | DisplaySeparator = vm.DisplaySeparator; 74 | SolutionGroups = vm.SolutionGroups.ToArray(); 75 | 76 | return this; 77 | } 78 | 79 | #endregion 80 | } 81 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/ActionSet.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using static System.Console; 6 | using static System.Int32; 7 | 8 | public class ActionSet : BaseActionProvider, 9 | IActionProvider 10 | { 11 | ///////////////////////////////////////////////////////// 12 | #region Fields 13 | 14 | private readonly IDictionary _set; 15 | 16 | #endregion 17 | 18 | ///////////////////////////////////////////////////////// 19 | #region Constructors 20 | 21 | /// 22 | /// Initializes a new instance of the class with a given set of executeable actions. 23 | /// 24 | /// The display name for the provider to display. 25 | /// A set of s. 26 | /// is null. 27 | /// is not greater than 0. 28 | public ActionSet(string displayName, IDictionary set) 29 | : base(displayName) 30 | { 31 | if (set == null) 32 | throw new ArgumentNullException(nameof(set)); 33 | if (set.Count <= 0) 34 | throw new ArgumentException("Count must be greater than 0.", nameof(set.Count)); 35 | 36 | _set = set; 37 | } 38 | 39 | #endregion 40 | 41 | ///////////////////////////////////////////////////////// 42 | #region IActionProvider Member 43 | 44 | string IActionProvider.DisplayName => DisplayName; 45 | 46 | void IActionProvider.ExecuteAction() 47 | { 48 | PrintActionBase(); 49 | 50 | int resultAction; 51 | do 52 | { 53 | WriteLine("Select an action:"); 54 | foreach (var actionProvider in _set) 55 | WriteLine($"[{actionProvider.Key}] - {actionProvider.Value.DisplayName}"); 56 | } while (!TryParse(ReadLine(), out resultAction) 57 | && !_set.ContainsKey(resultAction)); 58 | 59 | _set[resultAction].ExecuteAction(); 60 | } 61 | 62 | #endregion 63 | } 64 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/PageRootView/PageRootControl.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SolutionStartPage.Core/Views/BasicPart/VsoPagePresenter.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.Views.BasicPart 2 | { 3 | using System.Threading.Tasks; 4 | using System.Windows; 5 | using Annotations; 6 | using Shared.Models; 7 | using Shared.Views.BasicPart; 8 | using static Shared.Utilities; 9 | 10 | public class VsoPagePresenter : BasePresenter, 11 | IVsoPagePresenter 12 | { 13 | ///////////////////////////////////////////////////////// 14 | #region Fields 15 | 16 | private readonly IVisualStudioVersion _vsVersion; 17 | private readonly IIde _ide; 18 | 19 | #endregion 20 | 21 | ///////////////////////////////////////////////////////// 22 | #region Constructors 23 | 24 | /// 25 | /// Initializes a new instance of the class. 26 | /// 27 | /// The version of the current Visual Studio instance. 28 | /// Information about the current Visual Studio instance. 29 | /// The view. 30 | /// The view model. 31 | /// Any parameter is null. 32 | public VsoPagePresenter([NotNull] IVisualStudioVersion vsVersion, 33 | [NotNull] IIde ide, 34 | [NotNull] IVsoPageView view, 35 | [NotNull] IVsoPageViewModel viewModel) 36 | : base(view, viewModel) 37 | { 38 | ThrowIfNull(vsVersion, nameof(vsVersion)); 39 | ThrowIfNull(ide, nameof(ide)); 40 | 41 | _vsVersion = vsVersion; 42 | _ide = ide; 43 | } 44 | 45 | #endregion 46 | 47 | ///////////////////////////////////////////////////////// 48 | #region Base Overrides 49 | 50 | protected override Task View_Loaded(object sender, RoutedEventArgs e) 51 | { 52 | LoadVmContent(); 53 | View.ConnectDataSource(ViewModel); 54 | return Task.CompletedTask; 55 | } 56 | 57 | #endregion 58 | 59 | ///////////////////////////////////////////////////////// 60 | #region Private Methods 61 | 62 | private void LoadVmContent() 63 | { 64 | ViewModel.StartPageHeaderTitle = $"{_ide.Edition} {_vsVersion.LongVersion}"; 65 | } 66 | 67 | #endregion 68 | } 69 | } -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/Implementations/CleanDebugAction.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions.Implementations 2 | { 3 | using System; 4 | using System.IO; 5 | using Models; 6 | using static System.Console; 7 | using static Program; 8 | 9 | public class CleanDebugAction : DebugActionBase 10 | { 11 | ///////////////////////////////////////////////////////// 12 | #region Public Methods 13 | 14 | public static void CleanData() 15 | { 16 | var files = GetFilesForAction(); 17 | 18 | if (files.Length == 0) 19 | { 20 | PrintWarning("No action executed. No files found."); 21 | PrintWarning("Please generate the source files by building the solution again."); 22 | return; 23 | } 24 | 25 | foreach (var file in files) 26 | DeleteFile(file); 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | #region Private Methods 33 | 34 | private static void DeleteFile(FileData file) 35 | { 36 | try 37 | { 38 | if (File.Exists(file.TargetPath)) 39 | { 40 | // If the version of the file to delete is different from the source version, we shall not delete it (might cause Visual Studio installation to malfunction) 41 | if (file.SourceVersion != null 42 | && file.TargetVersion != null 43 | && file.TargetVersion != file.SourceVersion) 44 | { 45 | PrintWarning($"Skipped file deletion of {file.TargetPath}, because it's newer thatn the source file and might be required by the Visual Studio installation."); 46 | return; 47 | } 48 | WriteLine("Deleting file: {0}", file.TargetPath); 49 | File.Delete(file.TargetPath); 50 | if (!File.Exists(file.TargetPath)) 51 | PrintSuccess("File deleted."); 52 | else 53 | PrintError("Unknown error during file deletion."); 54 | } 55 | else 56 | { 57 | PrintWarning($"Skipped file deletion of {file.TargetPath}, because it doesn't exist."); 58 | } 59 | } 60 | catch (Exception e) 61 | { 62 | PrintError(e.Message); 63 | } 64 | } 65 | 66 | #endregion 67 | } 68 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/ISolutionPageModel.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Threading.Tasks; 6 | using Annotations; 7 | using Models; 8 | 9 | public interface ISolutionPageModel 10 | { 11 | /// 12 | /// Loads the configuration. 13 | /// 14 | /// A for the current Visual Studio version 15 | /// or a default configuration, if none is found 16 | [NotNull] 17 | Task LoadConfiguration(); 18 | 19 | /// 20 | /// Saves the configuration for the current Visual Studio instance. 21 | /// 22 | /// The configuration to save. 23 | /// An awaitable . 24 | /// is null. 25 | Task SaveConfiguration([NotNull] SolutionPageConfiguration configuration); 26 | 27 | /// 28 | /// Gets all files in the , matching the . 29 | /// 30 | /// The directory to search in. 31 | /// The pattern to match. 32 | /// A collection of matching files. 33 | IEnumerable GetFilesInDirectory(string directory, string pattern); 34 | 35 | /// 36 | /// Gets the parent directory of the . 37 | /// 38 | /// The directory to get the parent from. 39 | /// The parent directory information. 40 | DirectoryInfo GetParentDirectory(string directory); 41 | 42 | /// 43 | /// Checks if the exists. 44 | /// 45 | /// The directory to check for existence. 46 | /// True, if the exists, otherwise false. 47 | bool DirectoryExists(string directory); 48 | 49 | /// 50 | /// Checks if the exists. 51 | /// 52 | /// The file to check for existence. 53 | /// True, if the exists, otherwise false. 54 | bool FileExists(string file); 55 | } 56 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Start/AssemblyDataProviderTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Start 2 | { 3 | using System; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text.RegularExpressions; 8 | using Microsoft.VisualStudio.TestTools.UnitTesting; 9 | 10 | [TestClass] 11 | public class AssemblyDataProviderTest 12 | { 13 | [TestMethod] 14 | public void CheckCorrectAssemblyReferences() 15 | { 16 | // Arrange 17 | const int numberOfSupportedVersions = 2; 18 | var testAssembly = Assembly.GetAssembly(typeof(AssemblyDataProviderTest)); 19 | var testAssemblyDirecotry = Path.GetDirectoryName(testAssembly.Location); 20 | Assert.IsNotNull(testAssemblyDirecotry); 21 | var solutionFilePath = Path.GetFullPath(Path.Combine(testAssemblyDirecotry, @"..\..\..\SolutionStartPage.sln")); 22 | var primaryProjectFilePath = Path.GetFullPath(Path.Combine(testAssemblyDirecotry, @"..\..\..\SolutionStartPage\SolutionStartPage.csproj")); 23 | var solutionRegex = new Regex("Project\\(\"\\{([\\w|-]{36})\\}\"\\) = \"(?SolutionStartPage.Vs(?\\d{4}))\".+"); 24 | var projectRefRegex = new Regex("SolutionStartPage.Vs(?\\d{4}))\\\\(?SolutionStartPage.Vs(?\\d{4})).csproj\"\\>"); 25 | 26 | // Act 27 | var solutionContent = File.ReadAllText(solutionFilePath); 28 | var projectContent = File.ReadAllText(primaryProjectFilePath); 29 | var solutionMatches = solutionRegex.Matches(solutionContent) 30 | .Cast() 31 | .OrderBy(m => int.Parse(m.Groups["version"].Value)) 32 | .Select(m => m.Groups["projectName"].Value).ToArray(); 33 | var projectMatches = projectRefRegex.Matches(projectContent) 34 | .Cast() 35 | .OrderBy(m => int.Parse(m.Groups["version1"].Value)) 36 | .Select(m => (projectName1: m.Groups["projectName1"].Value, projectName2: m.Groups["projectName2"].Value)).ToArray(); 37 | 38 | // Assert 39 | Assert.AreEqual(numberOfSupportedVersions, solutionMatches.Length); 40 | Assert.AreEqual(numberOfSupportedVersions, projectMatches.Length); 41 | foreach (var s in solutionMatches) 42 | { 43 | Assert.IsNotNull(projectMatches.SingleOrDefault(m => s == m.projectName1 && m.projectName1 == m.projectName2), $"The primary project is missing a project reference to the project '{s}'."); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/UtilitiesTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Shared 2 | { 3 | using System; 4 | using Microsoft.VisualStudio.TestTools.UnitTesting; 5 | using SolutionStartPage.Shared; 6 | 7 | [TestClass] 8 | public class UtilitiesTest 9 | { 10 | [TestMethod] 11 | public void ThrowIfNull_NotNull() 12 | { 13 | // Arrange 14 | var testObject1 = 1; 15 | var testObject2 = DateTime.Now; 16 | var testObject3 = "foo"; 17 | var testObject4 = new Uri("http://www.google.com", UriKind.Absolute); 18 | 19 | // Act 20 | Utilities.ThrowIfNull(testObject1, nameof(testObject1)); 21 | Utilities.ThrowIfNull(testObject2, nameof(testObject2)); 22 | Utilities.ThrowIfNull(testObject3, nameof(testObject3)); 23 | Utilities.ThrowIfNull(testObject4, nameof(testObject4)); 24 | 25 | // Assert 26 | // Nothing to assert / No exception thrown 27 | } 28 | 29 | [TestMethod] 30 | [ExpectedException(typeof (ArgumentNullException))] 31 | public void ThrowIfNull_ArgumentNullException_Integer() 32 | { 33 | // Arrange 34 | int? testObject = null; 35 | 36 | // Act 37 | Utilities.ThrowIfNull(testObject, nameof(testObject)); 38 | 39 | // Assert 40 | // Nothing to assert / Exception thrown 41 | } 42 | 43 | [TestMethod] 44 | [ExpectedException(typeof (ArgumentNullException))] 45 | public void ThrowIfNull_ArgumentNullException_DateTime() 46 | { 47 | // Arrange 48 | DateTime? testObject = null; 49 | 50 | // Act 51 | Utilities.ThrowIfNull(testObject, nameof(testObject)); 52 | 53 | // Assert 54 | // Nothing to assert / Exception thrown 55 | } 56 | 57 | [TestMethod] 58 | [ExpectedException(typeof (ArgumentNullException))] 59 | public void ThrowIfNull_ArgumentNullException_String() 60 | { 61 | // Arrange 62 | string testObject = null; 63 | 64 | // Act 65 | Utilities.ThrowIfNull(testObject, nameof(testObject)); 66 | 67 | // Assert 68 | // Nothing to assert / Exception thrown 69 | } 70 | 71 | [TestMethod] 72 | [ExpectedException(typeof (ArgumentNullException))] 73 | public void ThrowIfNull_ArgumentNullException_Uri() 74 | { 75 | // Arrange 76 | Uri testObject = null; 77 | 78 | // Act 79 | Utilities.ThrowIfNull(testObject, nameof(testObject)); 80 | 81 | // Assert 82 | // Nothing to assert / Exception thrown 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /SolutionStartPage.Core/BLL/Provider/ViewStateProvider.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Core.BLL.Provider 2 | { 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | using Annotations; 6 | using Shared.BLL.Provider; 7 | 8 | public class ViewStateProvider : IViewStateProvider 9 | { 10 | ///////////////////////////////////////////////////////// 11 | #region Fields 12 | 13 | private bool _editModeEnabled; 14 | private bool _displayFolders; 15 | private bool _displayIcons; 16 | private bool _displaySeparator; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | #region Constructors 22 | 23 | public ViewStateProvider() 24 | { 25 | _editModeEnabled = false; 26 | _displayFolders = true; 27 | } 28 | 29 | #endregion 30 | 31 | ///////////////////////////////////////////////////////// 32 | #region IViewStateProvider Member 33 | 34 | public bool EditModeEnabled 35 | { 36 | get => _editModeEnabled; 37 | set 38 | { 39 | if (value == _editModeEnabled) return; 40 | _editModeEnabled = value; 41 | OnPropertyChanged(); 42 | } 43 | } 44 | 45 | public bool DisplayFolders 46 | { 47 | get => _displayFolders; 48 | set 49 | { 50 | if (value == _displayFolders) return; 51 | _displayFolders = value; 52 | OnPropertyChanged(); 53 | } 54 | } 55 | 56 | public bool DisplayIcons 57 | { 58 | get => _displayIcons; 59 | set 60 | { 61 | if (value == _displayIcons) return; 62 | _displayIcons = value; 63 | OnPropertyChanged(); 64 | } 65 | } 66 | 67 | public bool DisplaySeparator 68 | { 69 | get => _displaySeparator; 70 | set 71 | { 72 | if (value == _displaySeparator) return; 73 | _displaySeparator = value; 74 | OnPropertyChanged(); 75 | } 76 | } 77 | 78 | #endregion 79 | 80 | ///////////////////////////////////////////////////////// 81 | #region INotifyPropertyChanged Members & Extension 82 | 83 | public event PropertyChangedEventHandler PropertyChanged; 84 | 85 | [NotifyPropertyChangedInvocator] 86 | private void OnPropertyChanged([CallerMemberName] string propertyName = null) 87 | { 88 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 89 | } 90 | 91 | #endregion 92 | } 93 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/SolutionPageView/SolutionControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.SolutionPageView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | using System.Windows.Input; 7 | using Shared.Converter; 8 | using Shared.Models; 9 | using Shared.Views.SolutionPageView; 10 | 11 | /// 12 | /// Interaction logic for SolutionControl.xaml 13 | /// 14 | public partial class SolutionControl : ISolutionControl 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Properties 19 | 20 | private Solution Solution => DataContext as Solution; 21 | 22 | #endregion 23 | 24 | ///////////////////////////////////////////////////////// 25 | 26 | #region Constructors 27 | 28 | public SolutionControl() 29 | { 30 | DataContextChanged += SolutionControl_DataContextChanged; 31 | 32 | InitializeComponent(); 33 | } 34 | 35 | #endregion 36 | 37 | ///////////////////////////////////////////////////////// 38 | 39 | #region Private Methods 40 | 41 | private void SetImageBinding() 42 | { 43 | if (Solution?.FileSystem == null) 44 | return; 45 | 46 | var converter = new PathToSystemImageConverter(Solution.FileSystem); 47 | var binding = new Binding("SolutionPath") 48 | { 49 | Source = Solution, 50 | Converter = converter 51 | }; 52 | SolutionFileImage.SetBinding(Image.SourceProperty, binding); 53 | } 54 | 55 | #endregion 56 | 57 | ///////////////////////////////////////////////////////// 58 | 59 | #region Event Handler 60 | 61 | private void OpenSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 62 | { 63 | Solution?.TriggerOpenSolution_Executed(Solution, e); 64 | } 65 | 66 | private void OpenSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 67 | { 68 | Solution?.TriggerOpenSolution_CanExecute(Solution, e); 69 | } 70 | 71 | private void AlterSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 72 | { 73 | Solution?.TriggerAlterSolution_Executed(Solution, e); 74 | } 75 | 76 | private void AlterSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 77 | { 78 | Solution?.TriggerAlterSolution_CanExecute(Solution, e); 79 | } 80 | 81 | private void SolutionControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) 82 | { 83 | if (Solution != null) 84 | SetImageBinding(); 85 | } 86 | 87 | #endregion 88 | } 89 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/SolutionPageView/SolutionControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.SolutionPageView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | using System.Windows.Input; 7 | using Shared.Converter; 8 | using Shared.Models; 9 | using Shared.Views.SolutionPageView; 10 | 11 | /// 12 | /// Interaction logic for SolutionControl.xaml 13 | /// 14 | public partial class SolutionControl : ISolutionControl 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Properties 19 | 20 | private Solution Solution => DataContext as Solution; 21 | 22 | #endregion 23 | 24 | ///////////////////////////////////////////////////////// 25 | 26 | #region Constructors 27 | 28 | public SolutionControl() 29 | { 30 | DataContextChanged += SolutionControl_DataContextChanged; 31 | 32 | InitializeComponent(); 33 | } 34 | 35 | #endregion 36 | 37 | ///////////////////////////////////////////////////////// 38 | 39 | #region Private Methods 40 | 41 | private void SetImageBinding() 42 | { 43 | if (Solution?.FileSystem == null) 44 | return; 45 | 46 | var converter = new PathToSystemImageConverter(Solution.FileSystem); 47 | var binding = new Binding("SolutionPath") 48 | { 49 | Source = Solution, 50 | Converter = converter 51 | }; 52 | SolutionFileImage.SetBinding(Image.SourceProperty, binding); 53 | } 54 | 55 | #endregion 56 | 57 | ///////////////////////////////////////////////////////// 58 | 59 | #region Event Handler 60 | 61 | private void OpenSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 62 | { 63 | Solution?.TriggerOpenSolution_Executed(Solution, e); 64 | } 65 | 66 | private void OpenSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 67 | { 68 | Solution?.TriggerOpenSolution_CanExecute(Solution, e); 69 | } 70 | 71 | private void AlterSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 72 | { 73 | Solution?.TriggerAlterSolution_Executed(Solution, e); 74 | } 75 | 76 | private void AlterSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 77 | { 78 | Solution?.TriggerAlterSolution_CanExecute(Solution, e); 79 | } 80 | 81 | private void SolutionControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) 82 | { 83 | if (Solution != null) 84 | SetImageBinding(); 85 | } 86 | 87 | #endregion 88 | } 89 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/SolutionPageView/SolutionControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.SolutionPageView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | using System.Windows.Input; 7 | using Shared.Converter; 8 | using Shared.Models; 9 | using Shared.Views.SolutionPageView; 10 | 11 | /// 12 | /// Interaction logic for SolutionControl.xaml 13 | /// 14 | public partial class SolutionControl : ISolutionControl 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Properties 19 | 20 | private Solution Solution => DataContext as Solution; 21 | 22 | #endregion 23 | 24 | ///////////////////////////////////////////////////////// 25 | 26 | #region Constructors 27 | 28 | public SolutionControl() 29 | { 30 | DataContextChanged += SolutionControl_DataContextChanged; 31 | 32 | InitializeComponent(); 33 | } 34 | 35 | #endregion 36 | 37 | ///////////////////////////////////////////////////////// 38 | 39 | #region Private Methods 40 | 41 | private void SetImageBinding() 42 | { 43 | if (Solution?.FileSystem == null) 44 | return; 45 | 46 | var converter = new PathToSystemImageConverter(Solution.FileSystem); 47 | var binding = new Binding("SolutionPath") 48 | { 49 | Source = Solution, 50 | Converter = converter 51 | }; 52 | SolutionFileImage.SetBinding(Image.SourceProperty, binding); 53 | } 54 | 55 | #endregion 56 | 57 | ///////////////////////////////////////////////////////// 58 | 59 | #region Event Handler 60 | 61 | private void OpenSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 62 | { 63 | Solution?.TriggerOpenSolution_Executed(Solution, e); 64 | } 65 | 66 | private void OpenSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 67 | { 68 | Solution?.TriggerOpenSolution_CanExecute(Solution, e); 69 | } 70 | 71 | private void AlterSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 72 | { 73 | Solution?.TriggerAlterSolution_Executed(Solution, e); 74 | } 75 | 76 | private void AlterSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 77 | { 78 | Solution?.TriggerAlterSolution_CanExecute(Solution, e); 79 | } 80 | 81 | private void SolutionControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) 82 | { 83 | if (Solution != null) 84 | SetImageBinding(); 85 | } 86 | 87 | #endregion 88 | } 89 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/SolutionPageView/SolutionControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.SolutionPageView 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | using System.Windows.Input; 7 | using Shared.Converter; 8 | using Shared.Models; 9 | using Shared.Views.SolutionPageView; 10 | 11 | /// 12 | /// Interaction logic for SolutionControl.xaml 13 | /// 14 | public partial class SolutionControl : ISolutionControl 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Properties 19 | 20 | private Solution Solution => DataContext as Solution; 21 | 22 | #endregion 23 | 24 | ///////////////////////////////////////////////////////// 25 | 26 | #region Constructors 27 | 28 | public SolutionControl() 29 | { 30 | DataContextChanged += SolutionControl_DataContextChanged; 31 | 32 | InitializeComponent(); 33 | } 34 | 35 | #endregion 36 | 37 | ///////////////////////////////////////////////////////// 38 | 39 | #region Private Methods 40 | 41 | private void SetImageBinding() 42 | { 43 | if (Solution?.FileSystem == null) 44 | return; 45 | 46 | var converter = new PathToSystemImageConverter(Solution.FileSystem); 47 | var binding = new Binding("SolutionPath") 48 | { 49 | Source = Solution, 50 | Converter = converter 51 | }; 52 | SolutionFileImage.SetBinding(Image.SourceProperty, binding); 53 | } 54 | 55 | #endregion 56 | 57 | ///////////////////////////////////////////////////////// 58 | 59 | #region Event Handler 60 | 61 | private void OpenSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 62 | { 63 | Solution?.TriggerOpenSolution_Executed(Solution, e); 64 | } 65 | 66 | private void OpenSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 67 | { 68 | Solution?.TriggerOpenSolution_CanExecute(Solution, e); 69 | } 70 | 71 | private void AlterSolution_OnExecuted(object sender, ExecutedRoutedEventArgs e) 72 | { 73 | Solution?.TriggerAlterSolution_Executed(Solution, e); 74 | } 75 | 76 | private void AlterSolution_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 77 | { 78 | Solution?.TriggerAlterSolution_CanExecute(Solution, e); 79 | } 80 | 81 | private void SolutionControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) 82 | { 83 | if (Solution != null) 84 | SetImageBinding(); 85 | } 86 | 87 | #endregion 88 | } 89 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/Converter/BoolToOpacityConverterTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Shared.Converter 2 | { 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using SolutionStartPage.Shared.Converter; 7 | 8 | [TestClass] 9 | [ExcludeFromCodeCoverage] 10 | public class BoolToOpacityConverterTest 11 | { 12 | [TestMethod] 13 | [ExpectedException(typeof (NotSupportedException))] 14 | public void ConvertBack_NotSupportedException() 15 | { 16 | // Arrange 17 | var converter = new BoolToOpacityConverter(); 18 | 19 | // Act 20 | converter.ConvertBack(null, null, null, null); 21 | } 22 | 23 | [TestMethod] 24 | public void Convert_TrueToFullOpacity() 25 | { 26 | // Arrange 27 | var converter = new BoolToOpacityConverter(); 28 | 29 | // Act 30 | var result = converter.Convert(true, null, null, null); 31 | 32 | // Assert 33 | Assert.AreEqual(1.0, result); 34 | } 35 | 36 | [TestMethod] 37 | public void Convert_TrueToLowerOpacity() 38 | { 39 | // Arrange 40 | var converter = new BoolToOpacityConverter(); 41 | 42 | // Act 43 | var result = converter.Convert(false, null, "0.5", null); 44 | 45 | // Assert 46 | Assert.AreEqual(0.5, result); 47 | } 48 | 49 | [TestMethod] 50 | [ExpectedException(typeof (InvalidCastException))] 51 | public void Convert_InvalidCastException_value() 52 | { 53 | // Arrange 54 | var converter = new BoolToOpacityConverter(); 55 | 56 | // Act 57 | converter.Convert(2.0, null, null, null); 58 | } 59 | 60 | [TestMethod] 61 | [ExpectedException(typeof (FormatException))] 62 | public void Convert_FormatException_parameter() 63 | { 64 | // Arrange 65 | var converter = new BoolToOpacityConverter(); 66 | 67 | // Act 68 | converter.Convert(false, null, "foo", null); 69 | } 70 | 71 | [TestMethod] 72 | [ExpectedException(typeof (NullReferenceException))] 73 | public void Convert_NullReferenceException_value() 74 | { 75 | // Arrange 76 | var converter = new BoolToOpacityConverter(); 77 | 78 | // Act 79 | converter.Convert(null, null, null, null); 80 | } 81 | 82 | [TestMethod] 83 | [ExpectedException(typeof (NullReferenceException))] 84 | public void Convert_NullReferenceException_parameter() 85 | { 86 | // Arrange 87 | var converter = new BoolToOpacityConverter(); 88 | 89 | // Act 90 | converter.Convert(false, null, null, null); 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/Converter/InvertedBoolToOpacityConverterTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Shared.Converter 2 | { 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using SolutionStartPage.Shared.Converter; 7 | 8 | [TestClass] 9 | [ExcludeFromCodeCoverage] 10 | public class InvertedBoolToOpacityConverterTest 11 | { 12 | [TestMethod] 13 | [ExpectedException(typeof (NotSupportedException))] 14 | public void ConvertBack_NotSupportedException() 15 | { 16 | // Arrange 17 | var converter = new InvertedBoolToOpacityConverter(); 18 | 19 | // Act 20 | converter.ConvertBack(null, null, null, null); 21 | } 22 | 23 | [TestMethod] 24 | public void Convert_TrueToHalfOpacity() 25 | { 26 | // Arrange 27 | var converter = new InvertedBoolToOpacityConverter(); 28 | 29 | // Act 30 | var result = converter.Convert(true, null, "0.5", null); 31 | 32 | // Assert 33 | Assert.AreEqual(0.5, result); 34 | } 35 | 36 | [TestMethod] 37 | public void Convert_FalseToFullOpacity() 38 | { 39 | // Arrange 40 | var converter = new InvertedBoolToOpacityConverter(); 41 | 42 | // Act 43 | var result = converter.Convert(false, null, null, null); 44 | 45 | // Assert 46 | Assert.AreEqual(1.0, result); 47 | } 48 | 49 | [TestMethod] 50 | [ExpectedException(typeof (InvalidCastException))] 51 | public void Convert_InvalidCastException_value() 52 | { 53 | // Arrange 54 | var converter = new InvertedBoolToOpacityConverter(); 55 | 56 | // Act 57 | converter.Convert(2.0, null, null, null); 58 | } 59 | 60 | [TestMethod] 61 | [ExpectedException(typeof (FormatException))] 62 | public void Convert_FormatException_parameter() 63 | { 64 | // Arrange 65 | var converter = new InvertedBoolToOpacityConverter(); 66 | 67 | // Act 68 | converter.Convert(true, null, "foo", null); 69 | } 70 | 71 | [TestMethod] 72 | [ExpectedException(typeof (NullReferenceException))] 73 | public void Convert_NullReferenceException_value() 74 | { 75 | // Arrange 76 | var converter = new InvertedBoolToOpacityConverter(); 77 | 78 | // Act 79 | converter.Convert(null, null, null, null); 80 | } 81 | 82 | [TestMethod] 83 | [ExpectedException(typeof (NullReferenceException))] 84 | public void Convert_NullReferenceException_parameter() 85 | { 86 | // Arrange 87 | var converter = new InvertedBoolToOpacityConverter(); 88 | 89 | // Act 90 | converter.Convert(true, null, null, null); 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Properties/resources.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34209 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2010.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SolutionStartPage.Vs2010.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Properties/resources.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2013.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SolutionStartPage.Vs2013.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/Converter/BoolToVisibilityConverterTest.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.UnitTests.Shared.Converter 2 | { 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using System.Windows; 6 | using Microsoft.VisualStudio.TestTools.UnitTesting; 7 | using SolutionStartPage.Shared.Converter; 8 | 9 | [TestClass] 10 | [ExcludeFromCodeCoverage] 11 | public class BoolToVisibilityConverterTest 12 | { 13 | [TestMethod] 14 | [ExpectedException(typeof (NotSupportedException))] 15 | public void ConvertBack_NotSupportedException() 16 | { 17 | // Arrange 18 | var converter = new BoolToVisibilityConverter(); 19 | 20 | // Act 21 | converter.ConvertBack(null, null, null, null); 22 | } 23 | 24 | [TestMethod] 25 | public void Convert_VisibleToVisible() 26 | { 27 | // Arrange 28 | var converter = new BoolToVisibilityConverter(); 29 | 30 | // Act 31 | var result = converter.Convert(true, null, null, null); 32 | 33 | // Assert 34 | Assert.AreEqual(Visibility.Visible, result); 35 | } 36 | 37 | [TestMethod] 38 | public void Convert_VisibleToCollapsed() 39 | { 40 | // Arrange 41 | var converter = new BoolToVisibilityConverter(); 42 | 43 | // Act 44 | var result = converter.Convert(true, null, "invert", null); 45 | 46 | // Assert 47 | Assert.AreEqual(Visibility.Collapsed, result); 48 | } 49 | 50 | [TestMethod] 51 | public void Convert_CollapsedToCollapsed() 52 | { 53 | // Arrange 54 | var converter = new BoolToVisibilityConverter(); 55 | 56 | // Act 57 | var result = converter.Convert(false, null, null, null); 58 | 59 | // Assert 60 | Assert.AreEqual(Visibility.Collapsed, result); 61 | } 62 | 63 | [TestMethod] 64 | public void Convert_CollapsedToVisible() 65 | { 66 | // Arrange 67 | var converter = new BoolToVisibilityConverter(); 68 | 69 | // Act 70 | var result = converter.Convert(false, null, "invert", null); 71 | 72 | // Assert 73 | Assert.AreEqual(Visibility.Visible, result); 74 | } 75 | 76 | [TestMethod] 77 | [ExpectedException(typeof (InvalidCastException))] 78 | public void Convert_InvalidCastException_value() 79 | { 80 | // Arrange 81 | var converter = new BoolToVisibilityConverter(); 82 | 83 | // Act 84 | converter.Convert(2.0, null, null, null); 85 | } 86 | 87 | [TestMethod] 88 | [ExpectedException(typeof (InvalidCastException))] 89 | public void Convert_InvalidCastException_parameter() 90 | { 91 | // Arrange 92 | var converter = new BoolToVisibilityConverter(); 93 | 94 | // Act 95 | converter.Convert(true, null, 2.0, null); 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2010/Views/SolutionPageView/SolutionPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2010.Views.SolutionPageView 2 | { 3 | using System; 4 | using System.Windows.Forms; 5 | using System.Windows.Input; 6 | using Shared.Models; 7 | using Shared.Views; 8 | using Shared.Views.SolutionPageView; 9 | using OpenFileDialog = Microsoft.Win32.OpenFileDialog; 10 | 11 | /// 12 | /// Interaction logic for SolutionPageControl.xaml 13 | /// 14 | public partial class SolutionPageControl : ISolutionPageView 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageControl() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | #endregion 26 | 27 | ///////////////////////////////////////////////////////// 28 | 29 | #region Event Handler 30 | 31 | private void AlterPage_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 32 | { 33 | AlterPageCanExecute?.Invoke(sender, e); 34 | } 35 | 36 | private void AlterPage_OnExecuted(object sender, ExecutedRoutedEventArgs e) 37 | { 38 | AlterPageExecuted?.Invoke(sender, e); 39 | } 40 | 41 | #endregion 42 | 43 | ///////////////////////////////////////////////////////// 44 | 45 | #region ISolutionPageView Member 46 | 47 | public event EventHandler AlterPageCanExecute; 48 | public event EventHandler AlterPageExecuted; 49 | 50 | void IView.ConnectDataSource(ISolutionPageViewModel viewModel) 51 | { 52 | DataContext = viewModel; 53 | } 54 | 55 | string ISolutionPageView.BrowseBulkAddRootFolder() 56 | { 57 | string selectedPath = null; 58 | var fbd = new FolderBrowserDialog 59 | { 60 | Description = @"Browse for a root folder...", 61 | ShowNewFolderButton = false, 62 | RootFolder = Environment.SpecialFolder.Desktop 63 | }; 64 | var dialogResult = fbd.ShowDialog(); 65 | if (dialogResult == DialogResult.OK) 66 | selectedPath = fbd.SelectedPath; 67 | 68 | return selectedPath; 69 | } 70 | 71 | string ISolutionPageView.BrowseSolution(SolutionGroup solutionGroup) 72 | { 73 | var ofd = new OpenFileDialog 74 | { 75 | CheckFileExists = true, 76 | CheckPathExists = true, 77 | DefaultExt = ".sln", 78 | Filter = @"Solution (*.sln)|*.sln|" + 79 | @"All files (*.*)|*.*", 80 | AddExtension = true, 81 | Multiselect = false, 82 | ValidateNames = true, 83 | Title = @"Browse for solution or other file..." 84 | }; 85 | 86 | return ofd.ShowDialog() == true 87 | ? ofd.FileName 88 | : null; 89 | } 90 | 91 | #endregion 92 | } 93 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2013/Views/SolutionPageView/SolutionPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2013.Views.SolutionPageView 2 | { 3 | using System; 4 | using System.Windows.Forms; 5 | using System.Windows.Input; 6 | using Shared.Models; 7 | using Shared.Views; 8 | using Shared.Views.SolutionPageView; 9 | using OpenFileDialog = Microsoft.Win32.OpenFileDialog; 10 | 11 | /// 12 | /// Interaction logic for SolutionPageControl.xaml 13 | /// 14 | public partial class SolutionPageControl : ISolutionPageView 15 | { 16 | ///////////////////////////////////////////////////////// 17 | 18 | #region Constructors 19 | 20 | public SolutionPageControl() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | #endregion 26 | 27 | ///////////////////////////////////////////////////////// 28 | 29 | #region Event Handler 30 | 31 | private void AlterPage_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 32 | { 33 | AlterPageCanExecute?.Invoke(sender, e); 34 | } 35 | 36 | private void AlterPage_OnExecuted(object sender, ExecutedRoutedEventArgs e) 37 | { 38 | AlterPageExecuted?.Invoke(sender, e); 39 | } 40 | 41 | #endregion 42 | 43 | ///////////////////////////////////////////////////////// 44 | 45 | #region ISolutionPageView Member 46 | 47 | public event EventHandler AlterPageCanExecute; 48 | public event EventHandler AlterPageExecuted; 49 | 50 | void IView.ConnectDataSource(ISolutionPageViewModel viewModel) 51 | { 52 | DataContext = viewModel; 53 | } 54 | 55 | string ISolutionPageView.BrowseBulkAddRootFolder() 56 | { 57 | string selectedPath = null; 58 | var fbd = new FolderBrowserDialog 59 | { 60 | Description = @"Browse for a root folder...", 61 | ShowNewFolderButton = false, 62 | RootFolder = Environment.SpecialFolder.Desktop 63 | }; 64 | var dialogResult = fbd.ShowDialog(); 65 | if (dialogResult == DialogResult.OK) 66 | selectedPath = fbd.SelectedPath; 67 | 68 | return selectedPath; 69 | } 70 | 71 | string ISolutionPageView.BrowseSolution(SolutionGroup solutionGroup) 72 | { 73 | var ofd = new OpenFileDialog 74 | { 75 | CheckFileExists = true, 76 | CheckPathExists = true, 77 | DefaultExt = ".sln", 78 | Filter = @"Solution (*.sln)|*.sln|" + 79 | @"All files (*.*)|*.*", 80 | AddExtension = true, 81 | Multiselect = false, 82 | ValidateNames = true, 83 | Title = @"Browse for solution or other file..." 84 | }; 85 | 86 | return ofd.ShowDialog() == true 87 | ? ofd.FileName 88 | : null; 89 | } 90 | 91 | #endregion 92 | } 93 | } -------------------------------------------------------------------------------- /SolutionStartPage.Shared/Views/SolutionPageView/SolutionPageViewModelBase.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Shared.Views.SolutionPageView 2 | { 3 | using System.Collections.ObjectModel; 4 | using System.ComponentModel; 5 | using System.Runtime.CompilerServices; 6 | using Annotations; 7 | using BLL.Provider; 8 | using Models; 9 | 10 | public abstract class SolutionPageViewModelBase : ISolutionPageViewModel 11 | { 12 | ///////////////////////////////////////////////////////// 13 | #region Fields 14 | 15 | private readonly IViewStateProvider _viewStateProvider; 16 | private int _columns; 17 | 18 | #endregion 19 | 20 | ///////////////////////////////////////////////////////// 21 | #region Properties 22 | 23 | public bool EditModeEnabled 24 | { 25 | get => _viewStateProvider.EditModeEnabled; 26 | set => _viewStateProvider.EditModeEnabled = value; 27 | } 28 | 29 | public bool DisplayFolders 30 | { 31 | get => _viewStateProvider.DisplayFolders; 32 | set => _viewStateProvider.DisplayFolders = value; 33 | } 34 | 35 | public bool DisplayIcons 36 | { 37 | get => _viewStateProvider.DisplayIcons; 38 | set => _viewStateProvider.DisplayIcons = value; 39 | } 40 | 41 | public bool DisplaySeparator 42 | { 43 | get => _viewStateProvider.DisplaySeparator; 44 | set => _viewStateProvider.DisplaySeparator = value; 45 | } 46 | 47 | public int Columns 48 | { 49 | get => _columns; 50 | set 51 | { 52 | if (value == _columns) return; 53 | _columns = value; 54 | OnPropertyChanged(); 55 | } 56 | } 57 | 58 | public ObservableCollection SolutionGroups { get; set; } 59 | 60 | #endregion 61 | 62 | ///////////////////////////////////////////////////////// 63 | #region Constructors 64 | 65 | protected SolutionPageViewModelBase(IViewStateProvider viewStateProvider) 66 | { 67 | _viewStateProvider = viewStateProvider; 68 | _viewStateProvider.PropertyChanged += viewStateProvider_PropertyChanged; 69 | } 70 | 71 | #endregion 72 | 73 | ///////////////////////////////////////////////////////// 74 | #region Event Handler 75 | 76 | private void viewStateProvider_PropertyChanged(object sender, PropertyChangedEventArgs e) 77 | { 78 | OnPropertyChanged(e.PropertyName); 79 | } 80 | 81 | #endregion 82 | 83 | ///////////////////////////////////////////////////////// 84 | #region INotifyPropertyChanged Members & Extension 85 | 86 | public event PropertyChangedEventHandler PropertyChanged; 87 | 88 | [NotifyPropertyChangedInvocator] 89 | private void OnPropertyChanged([CallerMemberName] string propertyName = null) 90 | { 91 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 92 | } 93 | 94 | #endregion 95 | } 96 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Views/SolutionPageView/SolutionPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2015.Views.SolutionPageView 2 | { 3 | using System; 4 | using System.Windows.Input; 5 | using Shared.Models; 6 | using Shared.Views; 7 | using Shared.Views.SolutionPageView; 8 | using OpenFileDialog = Microsoft.Win32.OpenFileDialog; 9 | 10 | /// 11 | /// Interaction logic for SolutionPageControl.xaml 12 | /// 13 | public partial class SolutionPageControl : ISolutionPageView 14 | { 15 | ///////////////////////////////////////////////////////// 16 | #region Constructors 17 | 18 | public SolutionPageControl() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | #endregion 24 | 25 | ///////////////////////////////////////////////////////// 26 | #region Event Handler 27 | 28 | private void AlterPage_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 29 | { 30 | AlterPageCanExecute?.Invoke(sender, e); 31 | } 32 | 33 | private void AlterPage_OnExecuted(object sender, ExecutedRoutedEventArgs e) 34 | { 35 | AlterPageExecuted?.Invoke(sender, e); 36 | } 37 | 38 | #endregion 39 | 40 | ///////////////////////////////////////////////////////// 41 | #region ISolutionPageView Member 42 | 43 | public event EventHandler AlterPageCanExecute; 44 | public event EventHandler AlterPageExecuted; 45 | 46 | void IView.ConnectDataSource(ISolutionPageViewModel viewModel) 47 | { 48 | DataContext = viewModel; 49 | } 50 | 51 | string ISolutionPageView.BrowseBulkAddRootFolder() 52 | { 53 | string selectedPath = null; 54 | var fbd = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog 55 | { 56 | Description = @"Browse for a root folder...", 57 | RootFolder = Environment.SpecialFolder.Recent, 58 | ShowNewFolderButton = false, 59 | UseDescriptionForTitle = true 60 | }; 61 | var dialogResult = fbd.ShowDialog(); 62 | if (dialogResult == true) 63 | selectedPath = fbd.SelectedPath; 64 | 65 | return selectedPath; 66 | } 67 | 68 | string ISolutionPageView.BrowseSolution(SolutionGroup solutionGroup) 69 | { 70 | var ofd = new OpenFileDialog 71 | { 72 | CheckFileExists = true, 73 | CheckPathExists = true, 74 | DefaultExt = ".sln", 75 | Filter = @"Solution (*.sln)|*.sln|" + 76 | @"All files (*.*)|*.*", 77 | AddExtension = true, 78 | Multiselect = false, 79 | ValidateNames = true, 80 | Title = @"Browse for solution or other file..." 81 | }; 82 | 83 | return ofd.ShowDialog() == true 84 | ? ofd.FileName 85 | : null; 86 | } 87 | 88 | #endregion 89 | } 90 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Views/SolutionPageView/SolutionPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionStartPage.Vs2017.Views.SolutionPageView 2 | { 3 | using System; 4 | using System.Windows.Input; 5 | using Shared.Models; 6 | using Shared.Views; 7 | using Shared.Views.SolutionPageView; 8 | using OpenFileDialog = Microsoft.Win32.OpenFileDialog; 9 | 10 | /// 11 | /// Interaction logic for SolutionPageControl.xaml 12 | /// 13 | public partial class SolutionPageControl : ISolutionPageView 14 | { 15 | ///////////////////////////////////////////////////////// 16 | #region Constructors 17 | 18 | public SolutionPageControl() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | #endregion 24 | 25 | ///////////////////////////////////////////////////////// 26 | #region Event Handler 27 | 28 | private void AlterPage_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) 29 | { 30 | AlterPageCanExecute?.Invoke(sender, e); 31 | } 32 | 33 | private void AlterPage_OnExecuted(object sender, ExecutedRoutedEventArgs e) 34 | { 35 | AlterPageExecuted?.Invoke(sender, e); 36 | } 37 | 38 | #endregion 39 | 40 | ///////////////////////////////////////////////////////// 41 | #region ISolutionPageView Member 42 | 43 | public event EventHandler AlterPageCanExecute; 44 | public event EventHandler AlterPageExecuted; 45 | 46 | void IView.ConnectDataSource(ISolutionPageViewModel viewModel) 47 | { 48 | DataContext = viewModel; 49 | } 50 | 51 | string ISolutionPageView.BrowseBulkAddRootFolder() 52 | { 53 | string selectedPath = null; 54 | var fbd = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog 55 | { 56 | Description = @"Browse for a root folder...", 57 | RootFolder = Environment.SpecialFolder.Recent, 58 | ShowNewFolderButton = false, 59 | UseDescriptionForTitle = true 60 | }; 61 | var dialogResult = fbd.ShowDialog(); 62 | if (dialogResult == true) 63 | selectedPath = fbd.SelectedPath; 64 | 65 | return selectedPath; 66 | } 67 | 68 | string ISolutionPageView.BrowseSolution(SolutionGroup solutionGroup) 69 | { 70 | var ofd = new OpenFileDialog 71 | { 72 | CheckFileExists = true, 73 | CheckPathExists = true, 74 | DefaultExt = ".sln", 75 | Filter = @"Solution (*.sln)|*.sln|" + 76 | @"All files (*.*)|*.*", 77 | AddExtension = true, 78 | Multiselect = false, 79 | ValidateNames = true, 80 | Title = @"Browse for solution or other file..." 81 | }; 82 | 83 | return ofd.ShowDialog() == true 84 | ? ofd.FileName 85 | : null; 86 | } 87 | 88 | #endregion 89 | } 90 | } -------------------------------------------------------------------------------- /SolutionStartPage.Vs2015/Properties/resources.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.42000 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2015.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. 17 | /// 18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert 19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. 20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen 21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SolutionStartPage.Vs2015.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle 51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SolutionStartPage.Vs2017/Properties/resources.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.42000 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionStartPage.Vs2017.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. 17 | /// 18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert 19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. 20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen 21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SolutionStartPage.Vs2017.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle 51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SolutionStartPage.UnitTests/Shared/Models/SolutionPageConfigurationTest.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable UseObjectOrCollectionInitializer 2 | 3 | namespace SolutionStartPage.UnitTests.Shared.Models 4 | { 5 | using System; 6 | using System.Collections.ObjectModel; 7 | using System.Diagnostics.CodeAnalysis; 8 | using System.Linq; 9 | using Microsoft.VisualStudio.TestTools.UnitTesting; 10 | using SolutionStartPage.Shared.Models; 11 | using SolutionStartPage.Shared.Views.SolutionPageView; 12 | using Telerik.JustMock; 13 | 14 | [TestClass] 15 | [ExcludeFromCodeCoverage] 16 | public class SolutionPageConfigurationTest 17 | { 18 | [TestMethod] 19 | public void Columns_GetSet() 20 | { 21 | // Arrange 22 | var config = new SolutionPageConfiguration(); 23 | 24 | // Act 25 | config.Columns = 2; 26 | var result = config.Columns; 27 | 28 | // Assert 29 | Assert.AreEqual(2, result); 30 | } 31 | 32 | [TestMethod] 33 | public void Columns_GetSet_SameValue() 34 | { 35 | // Arrange 36 | var config = new SolutionPageConfiguration {Columns = 2}; 37 | 38 | // Act 39 | config.Columns = 2; 40 | var result = config.Columns; 41 | 42 | // Assert 43 | Assert.AreEqual(2, result); 44 | } 45 | 46 | [TestMethod] 47 | public void Columns_Minvalue() 48 | { 49 | // Arrange 50 | var config = new SolutionPageConfiguration(); 51 | 52 | // Act 53 | config.Columns = -1; 54 | var result = config.Columns; 55 | 56 | // Assert 57 | Assert.AreEqual(1, result); 58 | } 59 | 60 | [TestMethod] 61 | public void Columns_Maxvalue() 62 | { 63 | // Arrange 64 | var config = new SolutionPageConfiguration(); 65 | 66 | // Act 67 | config.Columns = 4; 68 | var result = config.Columns; 69 | 70 | // Assert 71 | Assert.AreEqual(3, result); 72 | } 73 | 74 | [TestMethod] 75 | [ExpectedException(typeof (NullReferenceException))] 76 | public void ApplyViewModel_NullReferenceException() 77 | { 78 | // Arrange 79 | var config = new SolutionPageConfiguration(); 80 | 81 | // Act 82 | config.ApplyViewModel(null); 83 | } 84 | 85 | [TestMethod] 86 | public void ApplyViewModel_Success() 87 | { 88 | // Arrange 89 | var config = new SolutionPageConfiguration(); 90 | var vm = Mock.Create(); 91 | var group = new SolutionGroup(); 92 | Mock.Arrange(() => vm.Columns).Returns(2); 93 | Mock.Arrange(() => vm.SolutionGroups).Returns(new ObservableCollection {group}); 94 | 95 | // Act 96 | var result = config.ApplyViewModel(vm); 97 | 98 | // Assert 99 | Assert.IsNotNull(result); 100 | Assert.AreEqual(2, result.Columns); 101 | Assert.AreEqual(group, result.SolutionGroups.Single()); 102 | } 103 | } 104 | } -------------------------------------------------------------------------------- /SolutionStartPage.Proxies/SolutionStartPage.Proxies.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FCDF6C72-FDE2-45AF-B53B-E95427F2540E} 8 | Library 9 | Properties 10 | SolutionStartPage.Proxies 11 | SolutionStartPage.Proxies 12 | v4.5.1 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.dll 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | {221b199f-4d2f-4f3d-a04e-6c3a389f73c3} 56 | SolutionStartPage.Shared 57 | 58 | 59 | 60 | 61 | 62 | 63 | 70 | -------------------------------------------------------------------------------- /StartPageDebugHelper/Actions/Implementations/CopyDebugAction.cs: -------------------------------------------------------------------------------- 1 | namespace StartPageDebugHelper.Actions.Implementations 2 | { 3 | using System; 4 | using System.IO; 5 | using System.Security.Cryptography; 6 | using Models; 7 | using static System.Console; 8 | using static Program; 9 | 10 | public class CopyDebugAction : DebugActionBase 11 | { 12 | ///////////////////////////////////////////////////////// 13 | #region Public Methods 14 | 15 | public static void CopyData() 16 | { 17 | var files = GetFilesForAction(); 18 | 19 | if (files.Length == 0) 20 | { 21 | PrintWarning("No action executed. No files found."); 22 | PrintWarning("Please generate the source files by building the solution again."); 23 | return; 24 | } 25 | 26 | foreach (var file in files) 27 | CopyFile(file); 28 | } 29 | 30 | #endregion 31 | 32 | ///////////////////////////////////////////////////////// 33 | #region Private Methods 34 | 35 | private static void CopyFile(FileData file) 36 | { 37 | try 38 | { 39 | if (File.Exists(file.SourcePath)) 40 | { 41 | if (File.Exists(file.TargetPath)) 42 | { 43 | // Check MD5 hash prior to copying - only copy files that differ 44 | var sourceHash = GetFileHash(file.SourcePath); 45 | var targetHash = GetFileHash(file.TargetPath); 46 | if (sourceHash == targetHash) 47 | { 48 | PrintWarning($"Skipped file copy of {file.SourcePath} to {file.TargetPath}, because they are equal."); 49 | return; 50 | } 51 | // Check if existing version does not match the current version 52 | if (file.SourceVersion != null 53 | && file.TargetVersion != null 54 | && file.TargetVersion != file.SourceVersion) 55 | { 56 | PrintWarning($"Skipped file copy of {file.SourcePath} to {file.TargetPath}, because the existing version is different."); 57 | return; 58 | } 59 | } 60 | WriteLine("Copying file {0} to {1}", file.SourcePath, file.TargetPath); 61 | File.Copy(file.SourcePath, file.TargetPath, true); 62 | if (File.Exists(file.TargetPath)) 63 | PrintSuccess("File copied."); 64 | else 65 | PrintError("Unknown error during copy process."); 66 | } 67 | else 68 | { 69 | PrintWarning( 70 | $"Skipped file copy of {file.SourcePath} to {file.TargetPath}, because the source file doesn't exist."); 71 | } 72 | } 73 | catch (Exception e) 74 | { 75 | PrintError(e.Message); 76 | } 77 | } 78 | 79 | private static string GetFileHash(string path) 80 | { 81 | using (var md5 = MD5.Create()) 82 | { 83 | using (var stream = File.OpenRead(path)) 84 | { 85 | var hash = md5.ComputeHash(stream); 86 | return BitConverter.ToString(hash).Replace("-", "").ToLower(); 87 | } 88 | } 89 | } 90 | 91 | #endregion 92 | } 93 | } --------------------------------------------------------------------------------