From 5eb258e5bdb771882566d87e1185a6d45432ff7d Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:15:43 +0100 Subject: [PATCH 01/10] Add license as embeeded resource --- .../ModularToolManager.csproj | 4 ++++ src/ModularToolManager/Resources/LICENSE | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/ModularToolManager/Resources/LICENSE diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 1a41d839..c2320d05 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -7,6 +7,10 @@ + + + + diff --git a/src/ModularToolManager/Resources/LICENSE b/src/ModularToolManager/Resources/LICENSE new file mode 100644 index 00000000..8e8c4142 --- /dev/null +++ b/src/ModularToolManager/Resources/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 XanatosX + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From e6748bcc4b078a5bc64746a428a90d8363a0c1e5 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Mon, 30 Jan 2023 20:55:18 +0100 Subject: [PATCH 02/10] Add code to get version Add code to get license Add new window for about Add license to about window Add version to about window --- .../DependencyInjectionExtension.cs | 7 +- src/ModularToolManager/Icons.axaml | 2 + .../Properties/Properties.Designer.cs | 9 +++ .../Properties/Properties.resx | 3 + .../Properties/Resources.Designer.cs | 9 +++ .../Properties/Resources.resx | 3 + .../IO/GetApplicationInformationService.cs | 62 ++++++++++++++++ .../Services/IO/ResourceReaderService.cs | 71 +++++++++++++++++++ .../ViewModels/AboutViewModel.cs | 31 ++++++++ .../ViewModels/MainWindowViewModel.cs | 11 +++ src/ModularToolManager/Views/AboutView.axaml | 21 ++++++ .../Views/AboutView.axaml.cs | 15 ++++ src/ModularToolManager/Views/MainWindow.axaml | 5 -- 13 files changed, 242 insertions(+), 7 deletions(-) create mode 100644 src/ModularToolManager/Services/IO/GetApplicationInformationService.cs create mode 100644 src/ModularToolManager/Services/IO/ResourceReaderService.cs create mode 100644 src/ModularToolManager/ViewModels/AboutViewModel.cs create mode 100644 src/ModularToolManager/Views/AboutView.axaml create mode 100644 src/ModularToolManager/Views/AboutView.axaml.cs diff --git a/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs b/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs index 67e487bd..62d30776 100644 --- a/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs +++ b/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs @@ -57,7 +57,8 @@ public static IServiceCollection AddViewModels(this IServiceCollection collectio .AddTransient() .AddTransient() .AddTransient() - .AddTransient(); + .AddTransient() + .AddTransient(); } /// @@ -95,6 +96,8 @@ public static IServiceCollection AddServices(this IServiceCollection collection) .AddSingleton() .AddTransient() .AddSingleton() - .AddTransient(); + .AddTransient() + .AddTransient() + .AddTransient(); } } diff --git a/src/ModularToolManager/Icons.axaml b/src/ModularToolManager/Icons.axaml index 513a67e2..1f57e140 100644 --- a/src/ModularToolManager/Icons.axaml +++ b/src/ModularToolManager/Icons.axaml @@ -8,6 +8,7 @@ diff --git a/src/ModularToolManager/Properties/Properties.Designer.cs b/src/ModularToolManager/Properties/Properties.Designer.cs index b983ae7d..9b4f4907 100644 --- a/src/ModularToolManager/Properties/Properties.Designer.cs +++ b/src/ModularToolManager/Properties/Properties.Designer.cs @@ -96,6 +96,15 @@ internal static string GithubUrl { } } + /// + /// Looks up a localized string similar to question_circle_regular. + /// + internal static string Icon_About { + get { + return ResourceManager.GetString("Icon_About", resourceCulture); + } + } + /// /// Looks up a localized string similar to edit_regular. /// diff --git a/src/ModularToolManager/Properties/Properties.resx b/src/ModularToolManager/Properties/Properties.resx index 4df16c07..b7dc5ec8 100644 --- a/src/ModularToolManager/Properties/Properties.resx +++ b/src/ModularToolManager/Properties/Properties.resx @@ -129,6 +129,9 @@ https://github.com/XanatosX/ModularToolManager/issues + + question_circle_regular + edit_regular diff --git a/src/ModularToolManager/Properties/Resources.Designer.cs b/src/ModularToolManager/Properties/Resources.Designer.cs index 9ac9aeb5..95d3affa 100644 --- a/src/ModularToolManager/Properties/Resources.Designer.cs +++ b/src/ModularToolManager/Properties/Resources.Designer.cs @@ -60,6 +60,15 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to License. + /// + public static string About_License { + get { + return ResourceManager.GetString("About_License", resourceCulture); + } + } + /// /// Looks up a localized string similar to Path to function. /// diff --git a/src/ModularToolManager/Properties/Resources.resx b/src/ModularToolManager/Properties/Resources.resx index 3f1780ca..1180dc43 100644 --- a/src/ModularToolManager/Properties/Resources.resx +++ b/src/ModularToolManager/Properties/Resources.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + License + Path to function diff --git a/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs b/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs new file mode 100644 index 00000000..22be84e1 --- /dev/null +++ b/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs @@ -0,0 +1,62 @@ +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ModularToolManager.Services.IO; + + +internal class GetApplicationInformationService +{ + private readonly ResourceReaderService readerService; + private readonly ILogger logger; + private const string LICENSE_FILE_NAME = "LICENSE"; + + private string? license; + + /// + /// Create a new instance of this class + /// + /// The reader service to use + public GetApplicationInformationService(ResourceReaderService readerService, ILogger logger) + { + this.readerService = readerService; + this.logger = logger; + } + + /// + /// Get the license for the project + /// + /// The license information + public string? GetLicense() + { + license ??= readerService.GetResourceData(LICENSE_FILE_NAME); + return license; + } + + /// + /// Get the version of the application + /// + /// The version of the project or null + public Version? GetVersion() + { + var assembly = Assembly.GetExecutingAssembly(); + Version? returnVersion = null; + try + { + + var versionString = FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion; + returnVersion = new Version(versionString ?? "0.0.0"); + } + catch (Exception e) + { + logger.LogError(e, "Could not get version from assembly"); + } + + return returnVersion; + } +} diff --git a/src/ModularToolManager/Services/IO/ResourceReaderService.cs b/src/ModularToolManager/Services/IO/ResourceReaderService.cs new file mode 100644 index 00000000..872321ae --- /dev/null +++ b/src/ModularToolManager/Services/IO/ResourceReaderService.cs @@ -0,0 +1,71 @@ +using Microsoft.Extensions.Logging; +using System.IO; +using System.Reflection; + +namespace ModularToolManager.Services.IO; + +/// +/// Service to read resource files from the project +/// +internal class ResourceReaderService +{ + /// + /// The base namespace for resource files + /// + private const string BASE_NAMESPACE = "ModularToolManager.Resources"; + + /// + /// The logger to use for writing errors + /// + private readonly ILogger logger; + + /// + /// Create a new instance of this class + /// + /// The logger to use + public ResourceReaderService(ILogger logger) + { + this.logger = logger; + } + + /// + /// Get the stream to the resource by its file name + /// + /// The file name to use + /// The stream to the file, Stream.Null if nothing was found or null + public Stream? GetResourceStream(string fileName) + { + return Assembly.GetExecutingAssembly().GetManifestResourceStream(GetResourcePath(fileName)) ?? Stream.Null; + } + + /// + /// Get the content of the resource to load + /// + /// The file name to load + /// The string with the content or null if nothing was found + public string? GetResourceData(string fileName) + { + string? returnString = null; + var stream = GetResourceStream(fileName); + if (stream is null || stream == Stream.Null) + { + logger.LogError($"Could not get stream for resource with name {fileName}"); + return returnString; + } + using (StreamReader reader = new StreamReader(stream)) + { + returnString = reader.ReadToEnd(); + } + return returnString; + } + + /// + /// Get the path of the resource by the file name + /// + /// The file name to get the resource from + /// The path to the resource file + private string GetResourcePath(string fileName) + { + return $"{BASE_NAMESPACE}.{fileName}"; + } +} diff --git a/src/ModularToolManager/ViewModels/AboutViewModel.cs b/src/ModularToolManager/ViewModels/AboutViewModel.cs new file mode 100644 index 00000000..25905ec7 --- /dev/null +++ b/src/ModularToolManager/ViewModels/AboutViewModel.cs @@ -0,0 +1,31 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using ModularToolManager.Services.IO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ModularToolManager.ViewModels; +internal partial class AboutViewModel : ObservableObject +{ + [ObservableProperty] + private string license; + + [ObservableProperty] + private string version; + + //@TODO: Add new view for this! + [ObservableProperty] + private List dependencies; + + private readonly GetApplicationInformationService getApplicationInformationService; + + public AboutViewModel(GetApplicationInformationService getApplicationInformationService) + { + this.getApplicationInformationService = getApplicationInformationService; + License = getApplicationInformationService.GetLicense() ?? string.Empty; + Version = getApplicationInformationService.GetVersion()?.ToString() ?? string.Empty; + Dependencies = new(); + } +} diff --git a/src/ModularToolManager/ViewModels/MainWindowViewModel.cs b/src/ModularToolManager/ViewModels/MainWindowViewModel.cs index 266127b5..ea48feaa 100644 --- a/src/ModularToolManager/ViewModels/MainWindowViewModel.cs +++ b/src/ModularToolManager/ViewModels/MainWindowViewModel.cs @@ -165,6 +165,17 @@ private async Task OpenSettings() await OpenModalWindow(Properties.Resources.SubMenu_Settings, Properties.Properties.Icon_settings, nameof(SettingsViewModel)); } + + /// + /// Open the about window + /// + /// A awaitable task + [RelayCommand] + private async Task OpenAbout() + { + await OpenModalWindow(Properties.Resources.SubMenu_About, Properties.Properties.Icon_About, nameof(AboutViewModel)); + } + /// /// Method to open a modal window /// diff --git a/src/ModularToolManager/Views/AboutView.axaml b/src/ModularToolManager/Views/AboutView.axaml new file mode 100644 index 00000000..ad26da5c --- /dev/null +++ b/src/ModularToolManager/Views/AboutView.axaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + diff --git a/src/ModularToolManager/Views/AboutView.axaml.cs b/src/ModularToolManager/Views/AboutView.axaml.cs new file mode 100644 index 00000000..0c583c69 --- /dev/null +++ b/src/ModularToolManager/Views/AboutView.axaml.cs @@ -0,0 +1,15 @@ +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace ModularToolManager.Views; +public partial class AboutView : UserControl +{ + public AboutView() + { + InitializeComponent(); + } + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} diff --git a/src/ModularToolManager/Views/MainWindow.axaml b/src/ModularToolManager/Views/MainWindow.axaml index 502e924a..b7d55313 100644 --- a/src/ModularToolManager/Views/MainWindow.axaml +++ b/src/ModularToolManager/Views/MainWindow.axaml @@ -17,11 +17,6 @@ HasSystemDecorations="False" CanResize="False" ShowInTaskbar="{Binding ShowInTaskbar}"> - From 6071450deaa51fb12e0a333e4ec25851829fde01 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 31 Jan 2023 08:18:16 +0100 Subject: [PATCH 03/10] Add depdencies to about view Add dependencies Add link button style --- src/ModularToolManager/App.axaml | 3 +- .../Models/DependencyModel.cs | 17 +++++++ .../ModularToolManager.csproj | 2 + .../Properties/Resources.Designer.cs | 45 +++++++++++++++++++ .../Properties/Resources.resx | 15 +++++++ .../{ => Resources}/Icons.axaml | 0 .../Resources/LinkButtonStyle.axaml | 29 ++++++++++++ .../Resources/dependencies.json | 20 +++++++++ .../MicrosoftDepdencyResolverService.cs | 12 ++++- .../IO/GetApplicationInformationService.cs | 23 ++++++++++ .../ViewModels/AboutViewModel.cs | 18 ++++++-- .../ViewModels/DependencyViewModel.cs | 45 +++++++++++++++++++ src/ModularToolManager/Views/AboutView.axaml | 11 +++-- .../Views/DependencyView.axaml | 17 +++++++ .../Views/DependencyView.axaml.cs | 15 +++++++ src/ModularToolManager/Views/PluginView.axaml | 7 +-- .../Dependency/IDependencyResolverService.cs | 8 ++++ 17 files changed, 275 insertions(+), 12 deletions(-) create mode 100644 src/ModularToolManager/Models/DependencyModel.cs rename src/ModularToolManager/{ => Resources}/Icons.axaml (100%) create mode 100644 src/ModularToolManager/Resources/LinkButtonStyle.axaml create mode 100644 src/ModularToolManager/Resources/dependencies.json create mode 100644 src/ModularToolManager/ViewModels/DependencyViewModel.cs create mode 100644 src/ModularToolManager/Views/DependencyView.axaml create mode 100644 src/ModularToolManager/Views/DependencyView.axaml.cs diff --git a/src/ModularToolManager/App.axaml b/src/ModularToolManager/App.axaml index 3793ebb5..edcd6100 100644 --- a/src/ModularToolManager/App.axaml +++ b/src/ModularToolManager/App.axaml @@ -11,7 +11,8 @@ - + + diff --git a/src/ModularToolManager/Models/DependencyModel.cs b/src/ModularToolManager/Models/DependencyModel.cs new file mode 100644 index 00000000..46533172 --- /dev/null +++ b/src/ModularToolManager/Models/DependencyModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ModularToolManager.Models; +internal class DependencyModel +{ + public string? Name { get; init; } + + public string? Version { get; init; } + + public string? LicenseUrl { get; init; } + + public string? ProjectUrl { get; init; } +} diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index c2320d05..aa7a877b 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -7,9 +7,11 @@ + + diff --git a/src/ModularToolManager/Properties/Resources.Designer.cs b/src/ModularToolManager/Properties/Resources.Designer.cs index 95d3affa..350ddb2d 100644 --- a/src/ModularToolManager/Properties/Resources.Designer.cs +++ b/src/ModularToolManager/Properties/Resources.Designer.cs @@ -60,6 +60,15 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to Dependencies. + /// + public static string About_Dependency { + get { + return ResourceManager.GetString("About_Dependency", resourceCulture); + } + } + /// /// Looks up a localized string similar to License. /// @@ -69,6 +78,15 @@ public static string About_License { } } + /// + /// Looks up a localized string similar to Version:. + /// + public static string About_Version_Colon { + get { + return ResourceManager.GetString("About_Version_Colon", resourceCulture); + } + } + /// /// Looks up a localized string similar to Path to function. /// @@ -168,6 +186,24 @@ public static string DefaultButton_Save { } } + /// + /// Looks up a localized string similar to License. + /// + public static string Dependency_License { + get { + return ResourceManager.GetString("Dependency_License", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Project. + /// + public static string Dependency_Project { + get { + return ResourceManager.GetString("Dependency_Project", resourceCulture); + } + } + /// /// Looks up a localized string similar to Search for function. /// @@ -267,6 +303,15 @@ public static string Plugin_Url_Colon { } } + /// + /// Looks up a localized string similar to Running with Avalonia UI. + /// + public static string RunningWith { + get { + return ResourceManager.GetString("RunningWith", resourceCulture); + } + } + /// /// Looks up a localized string similar to Keep on Top. /// diff --git a/src/ModularToolManager/Properties/Resources.resx b/src/ModularToolManager/Properties/Resources.resx index 1180dc43..199dd245 100644 --- a/src/ModularToolManager/Properties/Resources.resx +++ b/src/ModularToolManager/Properties/Resources.resx @@ -117,9 +117,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Dependencies + License + + Version: + Path to function @@ -153,6 +159,12 @@ Edit + + License + + + Project + Search for function @@ -186,6 +198,9 @@ Project url: + + Running with Avalonia UI + Keep on Top diff --git a/src/ModularToolManager/Icons.axaml b/src/ModularToolManager/Resources/Icons.axaml similarity index 100% rename from src/ModularToolManager/Icons.axaml rename to src/ModularToolManager/Resources/Icons.axaml diff --git a/src/ModularToolManager/Resources/LinkButtonStyle.axaml b/src/ModularToolManager/Resources/LinkButtonStyle.axaml new file mode 100644 index 00000000..8fbeed8e --- /dev/null +++ b/src/ModularToolManager/Resources/LinkButtonStyle.axaml @@ -0,0 +1,29 @@ + + + + diff --git a/src/ModularToolManagerModel/Services/Dependency/IDependencyResolverService.cs b/src/ModularToolManagerModel/Services/Dependency/IDependencyResolverService.cs index 16bdef7c..dc7cd77b 100644 --- a/src/ModularToolManagerModel/Services/Dependency/IDependencyResolverService.cs +++ b/src/ModularToolManagerModel/Services/Dependency/IDependencyResolverService.cs @@ -21,6 +21,14 @@ public interface IDependencyResolverService /// An instance of type T or null if nothing found T? GetDependency(Action? furtherInitilization); + /// + /// Get a dependency of type T by object factory + /// + /// The type of the dependency to get + /// The factory to use for object initialization + /// >An instance of type T or null if nothing found + T? GetDependency(Func objectFactory); + /// /// Get all dependencies of type T /// From ac86de2fc36836340b8ac5843930c25a09c2f5b6 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 31 Jan 2023 20:30:21 +0100 Subject: [PATCH 04/10] Fix crash if settings for functions are null --- src/ModularToolManager/ViewModels/AddFunctionViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ModularToolManager/ViewModels/AddFunctionViewModel.cs b/src/ModularToolManager/ViewModels/AddFunctionViewModel.cs index c01a87e4..6336b779 100644 --- a/src/ModularToolManager/ViewModels/AddFunctionViewModel.cs +++ b/src/ModularToolManager/ViewModels/AddFunctionViewModel.cs @@ -198,7 +198,7 @@ public bool LoadInFunction(string identifier) SelectedFunctionPlugin = FunctionPlugins.FirstOrDefault(plugin => plugin.Plugin == function.Plugin); foreach (var setting in PluginSettings ?? Enumerable.Empty()) { - var settingToUpdate = function.Settings.FirstOrDefault(pSetting => pSetting.Key == setting.GetSettingsModel().Key); + var settingToUpdate = function.Settings?.FirstOrDefault(pSetting => pSetting.Key == setting.GetSettingsModel().Key); if (settingToUpdate is not null) { setting.UpdateValue(settingToUpdate.Value); From bd40f38e9d169db7508ac46260a913564e091ab0 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 31 Jan 2023 20:32:17 +0100 Subject: [PATCH 05/10] Improve visuals for dependencies --- .../Resources/dependencies.json | 30 +++++++++++++++++++ .../ViewModels/AboutViewModel.cs | 1 + src/ModularToolManager/Views/AboutView.axaml | 3 +- .../Views/DependencyView.axaml | 8 ++--- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/ModularToolManager/Resources/dependencies.json b/src/ModularToolManager/Resources/dependencies.json index 325f33d7..32c40ca0 100644 --- a/src/ModularToolManager/Resources/dependencies.json +++ b/src/ModularToolManager/Resources/dependencies.json @@ -16,5 +16,35 @@ "Version": "0.10.18", "ProjectUrl": "https://avaloniaui.net/", "LicenseUrl": "https://licenses.nuget.org/MIT" + }, + { + "Name": "CommunityToolkit.Mvvm", + "Version": "8.0.0", + "ProjectUrl": "https://github.com/CommunityToolkit/dotnet", + "LicenseUrl": "https://licenses.nuget.org/MIT" + }, + { + "Name": "Microsoft.Extensions.DependencyInjection", + "Version": "7.0.0", + "ProjectUrl": "https://dot.net", + "LicenseUrl": "https://licenses.nuget.org/MIT" + }, + { + "Name": "Serilog", + "Version": "2.12.0", + "ProjectUrl": "https://serilog.net/", + "LicenseUrl": "https://licenses.nuget.org/Apache-2.0" + }, + { + "Name": "Serilog.Extensions.Logging", + "Version": "3.1.0", + "ProjectUrl": "https://serilog.net/", + "LicenseUrl": "https://licenses.nuget.org/Apache-2.0" + }, + { + "Name": "Serilog.Sinks.File", + "Version": "5.0.0", + "ProjectUrl": "https://serilog.net/", + "LicenseUrl": "https://licenses.nuget.org/Apache-2.0" } ] \ No newline at end of file diff --git a/src/ModularToolManager/ViewModels/AboutViewModel.cs b/src/ModularToolManager/ViewModels/AboutViewModel.cs index d9e06af4..9ee6b627 100644 --- a/src/ModularToolManager/ViewModels/AboutViewModel.cs +++ b/src/ModularToolManager/ViewModels/AboutViewModel.cs @@ -33,6 +33,7 @@ public AboutViewModel(GetApplicationInformationService getApplicationInformation License = getApplicationInformationService.GetLicense() ?? string.Empty; Version = getApplicationInformationService.GetVersion()?.ToString() ?? string.Empty; Dependencies = getApplicationInformationService.GetDependencies() + .OrderBy(d => d.Name) .Select(dep => dependencyResolverService.GetDependency(provider => { return new DependencyViewModel(dep, provider.GetRequiredService()); diff --git a/src/ModularToolManager/Views/AboutView.axaml b/src/ModularToolManager/Views/AboutView.axaml index 993393b8..60942193 100644 --- a/src/ModularToolManager/Views/AboutView.axaml +++ b/src/ModularToolManager/Views/AboutView.axaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:p="clr-namespace:ModularToolManager.Properties" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" + MinWidth="900" x:Class="ModularToolManager.Views.AboutView"> @@ -16,7 +17,7 @@ - + diff --git a/src/ModularToolManager/Views/DependencyView.axaml b/src/ModularToolManager/Views/DependencyView.axaml index a4dffdde..e97e24b4 100644 --- a/src/ModularToolManager/Views/DependencyView.axaml +++ b/src/ModularToolManager/Views/DependencyView.axaml @@ -6,12 +6,10 @@ xmlns:p="clr-namespace:ModularToolManager.Properties" x:Class="ModularToolManager.Views.DependencyView"> - + - -