From 404c8ca4045c4095426294de78d7f155a760790b Mon Sep 17 00:00:00 2001 From: jeffman Date: Wed, 14 Sep 2016 23:43:48 -0400 Subject: [PATCH] Updated third party info --- .../AboutWindow.xaml.cs | 34 ++++++++++++++----- .../RopeSnake.UI.ProjectManager.csproj | 4 +++ RopeSnake.UI.ProjectManager/packages.config | 1 + 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/RopeSnake.UI.ProjectManager/AboutWindow.xaml.cs b/RopeSnake.UI.ProjectManager/AboutWindow.xaml.cs index 25ea75e..02f0a1e 100644 --- a/RopeSnake.UI.ProjectManager/AboutWindow.xaml.cs +++ b/RopeSnake.UI.ProjectManager/AboutWindow.xaml.cs @@ -42,12 +42,13 @@ private void InitializeThirdParty() { _thirdPartyList = new ObservableCollection(); - foreach(var type in new[] { - typeof(NLog.Logger), - typeof(Newtonsoft.Json.JsonConvert), - typeof(SharpFileSystem.FileSystemPath), - typeof(Xceed.Wpf.Toolkit.NumericUpDown<>), - typeof(Ookii.Dialogs.Wpf.VistaOpenFileDialog) }) + foreach (var type in new[] { + new ThirdPartyTypeInfo(typeof(NLog.Logger).AssemblyQualifiedName, "http://nlog-project.org/", "BSD License"), + new ThirdPartyTypeInfo(typeof(Newtonsoft.Json.JsonConvert).AssemblyQualifiedName, "http://www.newtonsoft.com/json", "MIT License"), + new ThirdPartyTypeInfo(typeof(SharpFileSystem.FileSystemPath).AssemblyQualifiedName, "https://github.com/bobvanderlinden/sharpfilesystem", "MIT License"), + new ThirdPartyTypeInfo(typeof(Xceed.Wpf.Toolkit.NumericUpDown<>).AssemblyQualifiedName, "http://wpftoolkit.codeplex.com/", "Microsoft Public License"), + new ThirdPartyTypeInfo(typeof(Ookii.Dialogs.Wpf.VistaOpenFileDialog).AssemblyQualifiedName, "http://www.ookii.org/software/dialogs/", "BSD License"), + new ThirdPartyTypeInfo(typeof(CommandLine.Parser).AssemblyQualifiedName, "https://github.com/gsscoder/commandline", "MIT License") }) { _thirdPartyList.Add(new ThirdPartyInfo(type)); } @@ -89,14 +90,17 @@ public ThirdPartyInfo(string title, string copyright, string version, string url License = license; } - public ThirdPartyInfo(Type typeFromAssembly) + public ThirdPartyInfo(ThirdPartyTypeInfo typeInfo) { - var assembly = typeFromAssembly.Assembly; + var type = Type.GetType(typeInfo.TypeName); + var assembly = type.Assembly; var assemblyName = assembly.GetName(); Title = assemblyName.Name; Version = assemblyName.Version.ToString(); Copyright = assembly.GetCustomAttribute().Copyright; + Url = typeInfo.Url; + License = typeInfo.License; } private string GenerateDescription() @@ -123,4 +127,18 @@ private string GenerateDescription() return sb.ToString(); } } + + class ThirdPartyTypeInfo + { + public string TypeName { get; } + public string Url { get; } + public string License { get; } + + public ThirdPartyTypeInfo(string typeName, string url, string license) + { + TypeName = typeName; + Url = url; + License = license; + } + } } diff --git a/RopeSnake.UI.ProjectManager/RopeSnake.UI.ProjectManager.csproj b/RopeSnake.UI.ProjectManager/RopeSnake.UI.ProjectManager.csproj index bcfaf2e..8fd1273 100644 --- a/RopeSnake.UI.ProjectManager/RopeSnake.UI.ProjectManager.csproj +++ b/RopeSnake.UI.ProjectManager/RopeSnake.UI.ProjectManager.csproj @@ -38,6 +38,10 @@ Resources\ropesnake.ico + + ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll + True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True diff --git a/RopeSnake.UI.ProjectManager/packages.config b/RopeSnake.UI.ProjectManager/packages.config index d2ba6db..f093aca 100644 --- a/RopeSnake.UI.ProjectManager/packages.config +++ b/RopeSnake.UI.ProjectManager/packages.config @@ -1,5 +1,6 @@  +