From 412cc5674429817828f54b27dac92ff887a42c7f Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 2 Jan 2024 07:46:01 +0100 Subject: [PATCH 01/29] Fix codacy errors Fix codacy performance errors Fix codacy Code Style errors Fix codacy Security errors --- .../Converters/Serialization/CultureInfoJsonConverter.cs | 3 ++- .../Services/Language/ResourceCultureService.cs | 3 ++- .../Services/Settings/ISettingsService.cs | 4 ++-- .../Services/Settings/SerializedSettingsService.cs | 6 +++--- src/ModularToolManager/ViewModels/ModalWindowViewModel.cs | 4 ++-- .../ViewModels/StringPluginSettingViewModel.cs | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/ModularToolManager/Converters/Serialization/CultureInfoJsonConverter.cs b/src/ModularToolManager/Converters/Serialization/CultureInfoJsonConverter.cs index 4b2ab2b1..8fe26547 100644 --- a/src/ModularToolManager/Converters/Serialization/CultureInfoJsonConverter.cs +++ b/src/ModularToolManager/Converters/Serialization/CultureInfoJsonConverter.cs @@ -21,10 +21,11 @@ internal class CultureInfoJsonConverter : JsonConverter CultureInfo? culture = null; try { - culture = CultureInfo.GetCultureInfo(isoThreeCode ?? String.Empty); + culture = CultureInfo.GetCultureInfo(isoThreeCode ?? string.Empty); } catch (Exception) { + // Culture not detected, returning null! } return culture; } diff --git a/src/ModularToolManager/Services/Language/ResourceCultureService.cs b/src/ModularToolManager/Services/Language/ResourceCultureService.cs index 1b7d55ec..c7c1c8f1 100644 --- a/src/ModularToolManager/Services/Language/ResourceCultureService.cs +++ b/src/ModularToolManager/Services/Language/ResourceCultureService.cs @@ -113,8 +113,9 @@ public List GetAvailableCultures() { returnCulture = CultureInfo.GetCultureInfo(Properties.Properties.FallbackLanguage); } - catch (System.Exception) + catch (System.Exception e) { + logger.LogWarning($"Could not get culture fallback with error {e.Message}"); } return returnCulture; } diff --git a/src/ModularToolManager/Services/Settings/ISettingsService.cs b/src/ModularToolManager/Services/Settings/ISettingsService.cs index 5f97aa40..5b03c752 100644 --- a/src/ModularToolManager/Services/Settings/ISettingsService.cs +++ b/src/ModularToolManager/Services/Settings/ISettingsService.cs @@ -17,9 +17,9 @@ public interface ISettingsService /// /// Change the application settings /// - /// The current settings to change + /// The current settings to change /// True if changing was successful - bool ChangeSettings(Action changeSettings); + bool ChangeSettings(Action changeSettingsAction); /// /// Save the application settings diff --git a/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs b/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs index a16dcbef..55637d5c 100644 --- a/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs +++ b/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs @@ -48,14 +48,14 @@ public SerializedSettingsService(ISerializeService serializer, } /// - public bool ChangeSettings(Action changeSettings) + public bool ChangeSettings(Action changeSettingsAction) { - if (changeSettings is null) + if (changeSettingsAction is null) { return false; } ApplicationSettings settings = GetApplicationSettings(); - changeSettings(settings); + changeSettingsAction(settings); return settings is not null ? SaveApplicationSettings(settings) : false; } diff --git a/src/ModularToolManager/ViewModels/ModalWindowViewModel.cs b/src/ModularToolManager/ViewModels/ModalWindowViewModel.cs index 2174bd57..20c7ffb4 100644 --- a/src/ModularToolManager/ViewModels/ModalWindowViewModel.cs +++ b/src/ModularToolManager/ViewModels/ModalWindowViewModel.cs @@ -47,7 +47,7 @@ public partial class ModalWindowViewModel : ObservableObject /// Can the modal be resized /// [ObservableProperty] - public bool canResize; + private bool canResize; /// /// The service used to switch the application theme @@ -95,7 +95,7 @@ public ModalWindowViewModel( private void SwitchTheme(int themeId) { var theme = themeService.GetStyleById(themeId); - theme ??= theme ??= themeService.GetAllStyles().FirstOrDefault() ?? new ApplicationStyle { MaterialOpacity = 1, TintOpacity = 0.65f, TintColor = Colors.Pink }; + theme ??= themeService.GetAllStyles().FirstOrDefault() ?? new ApplicationStyle { MaterialOpacity = 1, TintOpacity = 0.65f, TintColor = Colors.Pink }; if (theme is null) { return; diff --git a/src/ModularToolManager/ViewModels/StringPluginSettingViewModel.cs b/src/ModularToolManager/ViewModels/StringPluginSettingViewModel.cs index 88830ae0..a179c32a 100644 --- a/src/ModularToolManager/ViewModels/StringPluginSettingViewModel.cs +++ b/src/ModularToolManager/ViewModels/StringPluginSettingViewModel.cs @@ -30,9 +30,9 @@ public override SettingModel GetSettingsModel() /// public override void UpdateValue(object? newData) { - if (newData is string) + if (newData is string stringData) { - SettingText = (string)newData; + SettingText = stringData; } } } From f5d8af7b7bdb436a5b1125a8fbb96f7cd6b7f060 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 2 Jan 2024 07:55:44 +0100 Subject: [PATCH 02/29] Fix codacy errors Fix codacy unused code errors Fix codacy error prone errors --- src/DefaultPlugins/ScriptExecutionPlugin.cs | 5 ++--- src/ModularToolManager/App.axaml.cs | 2 +- .../Converters/Serialization/ColorConverter.cs | 1 - .../Services/Settings/SerializedSettingsService.cs | 2 +- .../Services/Styling/DefaultStyleService.cs | 4 +--- .../Services/Ui/WindowManagementService.cs | 2 +- .../ViewModels/FunctionSelectionViewModel.cs | 2 +- src/ModularToolManager/ViewModels/MainWindowViewModel.cs | 2 +- .../ViewModels/PluginSettingBaseViewModel.cs | 2 +- src/ModularToolManagerModel/Services/IO/UrlOpenerService.cs | 2 +- 10 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/DefaultPlugins/ScriptExecutionPlugin.cs b/src/DefaultPlugins/ScriptExecutionPlugin.cs index e49cc7a5..475a4a75 100644 --- a/src/DefaultPlugins/ScriptExecutionPlugin.cs +++ b/src/DefaultPlugins/ScriptExecutionPlugin.cs @@ -1,7 +1,6 @@ using DefaultPlugins.Information; using DefaultPlugins.ProcessStartStrategies; using ModularToolManagerPlugin.Attributes; -using ModularToolManagerPlugin.Enums; using ModularToolManagerPlugin.Models; using ModularToolManagerPlugin.Plugin; using ModularToolManagerPlugin.Services; @@ -10,7 +9,7 @@ namespace DefaultPlugins; /// -/// Plugin to run scripts on windows maschines +/// Plugin to run scripts on windows machines /// public sealed class ScriptExecutionPlugin : AbstractFunctionPlugin { @@ -22,7 +21,7 @@ public sealed class ScriptExecutionPlugin : AbstractFunctionPlugin /// /// The factory to use for creating starter objects /// - private DefaultScriptStarterFactory starterFactory; + private readonly DefaultScriptStarterFactory starterFactory; /// /// Fallback text if a translation is missing diff --git a/src/ModularToolManager/App.axaml.cs b/src/ModularToolManager/App.axaml.cs index d09b0002..1614debd 100644 --- a/src/ModularToolManager/App.axaml.cs +++ b/src/ModularToolManager/App.axaml.cs @@ -77,7 +77,7 @@ private Serilog.ILogger CreateLoggerConfig(IServiceCollection collection) public override void OnFrameworkInitializationCompleted() { var provider = BuildServiceCollection().BuildServiceProvider(); - WeakReferenceMessenger.Default.Register(this, (_, e) => + WeakReferenceMessenger.Default.Register(this, (_, _) => { if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { diff --git a/src/ModularToolManager/Converters/Serialization/ColorConverter.cs b/src/ModularToolManager/Converters/Serialization/ColorConverter.cs index 4efd2c6e..369b7aaa 100644 --- a/src/ModularToolManager/Converters/Serialization/ColorConverter.cs +++ b/src/ModularToolManager/Converters/Serialization/ColorConverter.cs @@ -69,7 +69,6 @@ public override Color Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSe case CurrentColorMode.Blue: blue = number; break; - default: break; } } } diff --git a/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs b/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs index 55637d5c..c5ba93cd 100644 --- a/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs +++ b/src/ModularToolManager/Services/Settings/SerializedSettingsService.cs @@ -66,7 +66,7 @@ public ApplicationSettings GetApplicationSettings() { return cachedApplicationSettings; } - ApplicationSettings returnData = new ApplicationSettings() + ApplicationSettings returnData = new ApplicationSettings { ShowInTaskbar = true, EnableAutocompleteForFunctionSearch = true, diff --git a/src/ModularToolManager/Services/Styling/DefaultStyleService.cs b/src/ModularToolManager/Services/Styling/DefaultStyleService.cs index abfd2d75..a6247057 100644 --- a/src/ModularToolManager/Services/Styling/DefaultStyleService.cs +++ b/src/ModularToolManager/Services/Styling/DefaultStyleService.cs @@ -43,8 +43,7 @@ public IEnumerable GetCurrentAppIncludeStyles() { return Enumerable.Empty(); } - var styles = App.Current.Styles.Where(style => style.GetType() == typeof(Styles)).ToList(); ; - var types = styles.Select(style => style.GetType()); + var styles = App.Current.Styles.Where(style => style.GetType() == typeof(Styles)).ToList(); return App.Current?.Styles.Where(style => style.GetType() == typeof(Styles)) ?? Enumerable.Empty(); } @@ -54,7 +53,6 @@ public IEnumerable GetCurrentAppIncludeStyles() /// public T? GetStyleByName(IStyle? style, string name) where T : AvaloniaObject { - var test = GetCurrentAppIncludeStyles(); return GetAllStylesWithinResource(style) .Where(style => style.Resources.Count > 0) .Where(style => style.Resources.ContainsKey(name)) diff --git a/src/ModularToolManager/Services/Ui/WindowManagementService.cs b/src/ModularToolManager/Services/Ui/WindowManagementService.cs index 94a12fe8..915c565a 100644 --- a/src/ModularToolManager/Services/Ui/WindowManagementService.cs +++ b/src/ModularToolManager/Services/Ui/WindowManagementService.cs @@ -145,7 +145,7 @@ public async Task ShowModalWindowAsync(ShowWindowModel modalData, Window? parent public async Task ShowOpenFileDialogAsync(ShowOpenFileDialogModel fileDialogModel, Window parent) { IStorageFolder? initialDirectory = await parent.StorageProvider.TryGetFolderFromPathAsync(fileDialogModel.InitialDirectory ?? string.Empty); - var files = await parent.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions() { + var files = await parent.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions { AllowMultiple = fileDialogModel.AllowMultipleSelection, FileTypeFilter = fileDialogModel.FileDialogFilters.ToList(), SuggestedStartLocation = initialDirectory diff --git a/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs b/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs index d2c8dc24..4318e24b 100644 --- a/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs +++ b/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs @@ -127,7 +127,7 @@ private void SaveFunctionsOrder(SaveFunctionsOrderMessage saveFunctionMessage) /// protected override void OnPropertyChanged(PropertyChangedEventArgs e) { - Action action = e.PropertyName == nameof(SearchText) ? () => FilterFunctionList() : () => { return; }; + Action action = e.PropertyName == nameof(SearchText) ? () => FilterFunctionList() : () => { }; action(); base.OnPropertyChanged(e); } diff --git a/src/ModularToolManager/ViewModels/MainWindowViewModel.cs b/src/ModularToolManager/ViewModels/MainWindowViewModel.cs index 304b7520..29d2b7e8 100644 --- a/src/ModularToolManager/ViewModels/MainWindowViewModel.cs +++ b/src/ModularToolManager/ViewModels/MainWindowViewModel.cs @@ -133,7 +133,7 @@ public MainWindowViewModel( SelectLanguageCommand = new AsyncRelayCommand(async () => await OpenModalWindow(Properties.Resources.SubMenu_Language, Properties.Properties.Icon_language, nameof(ChangeLanguageViewModel))); HideApplicationCommand = new RelayCommand(() => WeakReferenceMessenger.Default.Send(new ToggleApplicationVisibilityMessage(true))); - WeakReferenceMessenger.Default.Register>(this, (_, e) => + WeakReferenceMessenger.Default.Register>(this, (_, _) => { UpdateShowInTaskbar(); }); diff --git a/src/ModularToolManager/ViewModels/PluginSettingBaseViewModel.cs b/src/ModularToolManager/ViewModels/PluginSettingBaseViewModel.cs index c780dc0e..5d24f11e 100644 --- a/src/ModularToolManager/ViewModels/PluginSettingBaseViewModel.cs +++ b/src/ModularToolManager/ViewModels/PluginSettingBaseViewModel.cs @@ -30,7 +30,7 @@ internal abstract partial class PluginSettingBaseViewModel : ObservableValidator /// Create a new instance of this class /// /// The setting model to create the data set from - public PluginSettingBaseViewModel(SettingModel settingModel) + protected PluginSettingBaseViewModel(SettingModel settingModel) { storedModel = settingModel; TranslationKey = settingModel.DisplayName ?? string.Empty; diff --git a/src/ModularToolManagerModel/Services/IO/UrlOpenerService.cs b/src/ModularToolManagerModel/Services/IO/UrlOpenerService.cs index 12967bdb..7e820b08 100644 --- a/src/ModularToolManagerModel/Services/IO/UrlOpenerService.cs +++ b/src/ModularToolManagerModel/Services/IO/UrlOpenerService.cs @@ -26,7 +26,7 @@ public bool OpenUrl(Uri url) { try { - ProcessStartInfo processStartInfo = new ProcessStartInfo() + ProcessStartInfo processStartInfo = new ProcessStartInfo { UseShellExecute = true, FileName = url.OriginalString From 491daa3005d0d92a1b8e997153a4ab40686daf6e Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 2 Jan 2024 08:03:07 +0100 Subject: [PATCH 03/29] Fix Codacy error --- src/ModularToolManager/Services/Styling/DefaultStyleService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ModularToolManager/Services/Styling/DefaultStyleService.cs b/src/ModularToolManager/Services/Styling/DefaultStyleService.cs index a6247057..f3130303 100644 --- a/src/ModularToolManager/Services/Styling/DefaultStyleService.cs +++ b/src/ModularToolManager/Services/Styling/DefaultStyleService.cs @@ -43,7 +43,6 @@ public IEnumerable GetCurrentAppIncludeStyles() { return Enumerable.Empty(); } - var styles = App.Current.Styles.Where(style => style.GetType() == typeof(Styles)).ToList(); return App.Current?.Styles.Where(style => style.GetType() == typeof(Styles)) ?? Enumerable.Empty(); } From 128b5b2a63f502b6607d08cb8c93f626e66b0da5 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:34:21 +0100 Subject: [PATCH 04/29] Add new avalonia logo for about page Adjust gitattributes --- .gitattributes | 1 + src/ModularToolManager/Assets/built-with-avalonia.png | 3 +++ src/ModularToolManager/ModularToolManager.csproj | 2 ++ src/ModularToolManager/Views/AboutView.axaml | 5 ++--- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/ModularToolManager/Assets/built-with-avalonia.png diff --git a/.gitattributes b/.gitattributes index 361484f1..91a10970 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ *.ico filter=lfs diff=lfs merge=lfs -text +**/Assets/*.png filter=lfs diff=lfs merge=lfs -text diff --git a/src/ModularToolManager/Assets/built-with-avalonia.png b/src/ModularToolManager/Assets/built-with-avalonia.png new file mode 100644 index 00000000..b6d62854 --- /dev/null +++ b/src/ModularToolManager/Assets/built-with-avalonia.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acd3ef1d9a149a2838e2fc5cd50a54043a0749c950b5b5c74dff849f62547db0 +size 49140 diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 29030eb6..f7c62b81 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -9,6 +9,7 @@ + @@ -16,6 +17,7 @@ + diff --git a/src/ModularToolManager/Views/AboutView.axaml b/src/ModularToolManager/Views/AboutView.axaml index 641d314c..8c4fd331 100644 --- a/src/ModularToolManager/Views/AboutView.axaml +++ b/src/ModularToolManager/Views/AboutView.axaml @@ -20,9 +20,8 @@ - - - + + + + + + + + + + + + diff --git a/src/ModularToolManager/Resources/LinkButtonStyle.axaml b/src/ModularToolManager/Resources/LinkButtonStyle.axaml index c124d74c..cbf9d009 100644 --- a/src/ModularToolManager/Resources/LinkButtonStyle.axaml +++ b/src/ModularToolManager/Resources/LinkButtonStyle.axaml @@ -27,4 +27,8 @@ + + diff --git a/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs b/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs index 51af6acd..a08ac3b2 100644 --- a/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs +++ b/src/ModularToolManager/Services/IO/GetApplicationInformationService.cs @@ -149,4 +149,11 @@ public IEnumerable GetHotkeys() return returnHotkeys; } + + /// + /// Get the url for the avalonia UI project + /// + /// The avalonia ui project url + public string GetAvaloniaProjectUrl() => Properties.Properties.AvaloniaProjectUrl; + } diff --git a/src/ModularToolManager/ViewModels/AboutViewModel.cs b/src/ModularToolManager/ViewModels/AboutViewModel.cs index 7b8368d7..3b4bf931 100644 --- a/src/ModularToolManager/ViewModels/AboutViewModel.cs +++ b/src/ModularToolManager/ViewModels/AboutViewModel.cs @@ -46,6 +46,12 @@ internal partial class AboutViewModel : ObservableObject [ObservableProperty] private string? gitHubUserManualUrl; + /// + /// The url to open for the avalonia project + /// + [ObservableProperty] + private string? avaloniaProjectUrl; + /// /// Service used to open url /// @@ -66,6 +72,7 @@ public AboutViewModel(GetApplicationInformationService applicationInformationSer Version = applicationInformationService.GetVersion()?.ToString(); GitHubUrl = applicationInformationService.GetGithubUrl(); GitHubUserManualUrl = applicationInformationService.GetGithubUserManualUrl(); + AvaloniaProjectUrl = applicationInformationService.GetAvaloniaProjectUrl(); Dependencies = applicationInformationService.GetDependencies() .OrderBy(d => d.Name) .Select(dep => dependencyResolverService.GetDependency(provider => diff --git a/src/ModularToolManager/Views/AboutView.axaml b/src/ModularToolManager/Views/AboutView.axaml index 8c4fd331..3cbc64b9 100644 --- a/src/ModularToolManager/Views/AboutView.axaml +++ b/src/ModularToolManager/Views/AboutView.axaml @@ -21,7 +21,9 @@ - + +/// Strategy to position the given window in the bottom left corner of the screen. +/// +public class BottomLeftStrategy : IWindowPositionStrategy +{ + // + public void PositionWindow(Window window, Screen? screen) + { + if (screen is null) + { + return; + } + PixelRect workingArea = screen.WorkingArea; + double newXPos = workingArea.X; + double newYPos = workingArea.Bottom - window.Height; + window.Position = new PixelPoint((int)newXPos, (int)newYPos); + } +} diff --git a/src/ModularToolManager/Strategies/WindowPosition/BottomRightStrategy.cs b/src/ModularToolManager/Strategies/WindowPosition/BottomRightStrategy.cs index 76fd860a..deb682e8 100644 --- a/src/ModularToolManager/Strategies/WindowPosition/BottomRightStrategy.cs +++ b/src/ModularToolManager/Strategies/WindowPosition/BottomRightStrategy.cs @@ -17,8 +17,8 @@ public void PositionWindow(Window window, Screen? screen) return; } PixelRect workingArea = screen.WorkingArea; - double newXPos = workingArea.X + workingArea.Width - window.Width; - double newYPos = workingArea.Y + workingArea.Height - window.Height; + double newXPos = workingArea.Right - window.Width; + double newYPos = workingArea.Bottom - window.Height; window.Position = new PixelPoint((int)newXPos, (int)newYPos); } } diff --git a/src/ModularToolManager/Strategies/WindowPosition/TopLeftStrategy.cs b/src/ModularToolManager/Strategies/WindowPosition/TopLeftStrategy.cs new file mode 100644 index 00000000..7d3440e5 --- /dev/null +++ b/src/ModularToolManager/Strategies/WindowPosition/TopLeftStrategy.cs @@ -0,0 +1,25 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Platform; + +namespace ModularToolManager.Strategies.WindowPosition; + +/// +/// Position a Window in the bottom left of a given screen +/// +public class TopLeftStrategy : IWindowPositionStrategy +{ + /// + public void PositionWindow(Window window, Screen? screen) + { + if (screen is null ) + { + return; + } + + PixelRect workingArea = screen.WorkingArea; + double newXPos = workingArea.X; + double newYPos = workingArea.Y; + window.Position = new PixelPoint((int)newXPos, (int)newYPos); + } +} diff --git a/src/ModularToolManager/Strategies/WindowPosition/TopRightStrategy.cs b/src/ModularToolManager/Strategies/WindowPosition/TopRightStrategy.cs new file mode 100644 index 00000000..10939edb --- /dev/null +++ b/src/ModularToolManager/Strategies/WindowPosition/TopRightStrategy.cs @@ -0,0 +1,25 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Platform; + +namespace ModularToolManager.Strategies.WindowPosition; + +/// +/// Position a Window in the top left of a given screen +/// +public class TopRightStrategy : IWindowPositionStrategy +{ + /// + public void PositionWindow(Window window, Screen? screen) + { + if (screen is null) + { + return; + } + + PixelRect workingArea = screen.WorkingArea; + double newXPos = workingArea.Right - window.Width; + double newYPos = workingArea.Y; + window.Position = new PixelPoint((int)newXPos, (int)newYPos); + } +} From 21c4a688e97220cce79679908ba7248b97b5f81f Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:44:09 +0100 Subject: [PATCH 09/29] Add code to switch window position Add code to display different window positions Extend settings window to allow window position selection --- .../Models/ApplicationSettings.cs | 4 +++ .../Properties/Resources.Designer.cs | 36 +++++++++++++++++++ .../Properties/Resources.de.resx | 12 +++++++ .../Properties/Resources.resx | 12 +++++++ .../ViewModels/SettingsViewModel.cs | 20 +++++++++++ .../WindowPositionStrategyViewModel.cs | 27 ++++++++++++++ .../Views/MainWindow.axaml.cs | 4 ++- .../Views/SettingsView.axaml | 1 + .../Views/WindowPositionStrategyView.axaml | 8 +++++ .../Views/WindowPositionStrategyView.axaml.cs | 10 ++++++ 10 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs create mode 100644 src/ModularToolManager/Views/WindowPositionStrategyView.axaml create mode 100644 src/ModularToolManager/Views/WindowPositionStrategyView.axaml.cs diff --git a/src/ModularToolManager/Models/ApplicationSettings.cs b/src/ModularToolManager/Models/ApplicationSettings.cs index 6b5be4fe..9c3780ca 100644 --- a/src/ModularToolManager/Models/ApplicationSettings.cs +++ b/src/ModularToolManager/Models/ApplicationSettings.cs @@ -2,6 +2,7 @@ using System.Globalization; using System.Linq; using System.Text.Json.Serialization; +using ModularToolManager.Enums; namespace ModularToolManager.Models; @@ -61,6 +62,9 @@ public class ApplicationSettings [JsonPropertyName("search_autocomplete")] public bool EnableAutocompleteForFunctionSearch { get; set; } + [JsonPropertyName("window_position")] + public WindowPositionEnum WindowPosition { get; set; } = WindowPositionEnum.BottomRight; + /// /// Create a new instance of this class /// diff --git a/src/ModularToolManager/Properties/Resources.Designer.cs b/src/ModularToolManager/Properties/Resources.Designer.cs index 37d228db..b597e2c5 100644 --- a/src/ModularToolManager/Properties/Resources.Designer.cs +++ b/src/ModularToolManager/Properties/Resources.Designer.cs @@ -762,6 +762,42 @@ public static string Settings_StartMinimized { } } + /// + /// Looks up a localized string similar to Bottom Left. + /// + public static string Settings_WindowPosition_Bottom_Left { + get { + return ResourceManager.GetString("Settings_WindowPosition_Bottom_Left", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bottom Right. + /// + public static string Settings_WindowPosition_Bottom_Right { + get { + return ResourceManager.GetString("Settings_WindowPosition_Bottom_Right", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Top Left. + /// + public static string Settings_WindowPosition_Top_Left { + get { + return ResourceManager.GetString("Settings_WindowPosition_Top_Left", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Top Right. + /// + public static string Settings_WindowPosition_Top_Right { + get { + return ResourceManager.GetString("Settings_WindowPosition_Top_Right", resourceCulture); + } + } + /// /// Looks up a localized string similar to About. /// diff --git a/src/ModularToolManager/Properties/Resources.de.resx b/src/ModularToolManager/Properties/Resources.de.resx index 84dcffb1..f7f1e220 100644 --- a/src/ModularToolManager/Properties/Resources.de.resx +++ b/src/ModularToolManager/Properties/Resources.de.resx @@ -315,6 +315,18 @@ Minimiert starten + + Unten links + + + Unten rechts + + + Oben links + + + Oben rechts + Über diff --git a/src/ModularToolManager/Properties/Resources.resx b/src/ModularToolManager/Properties/Resources.resx index 74781a69..067aa295 100644 --- a/src/ModularToolManager/Properties/Resources.resx +++ b/src/ModularToolManager/Properties/Resources.resx @@ -351,6 +351,18 @@ Start minimized + + Bottom Left + + + Bottom Right + + + Top Left + + + Top Right + About diff --git a/src/ModularToolManager/ViewModels/SettingsViewModel.cs b/src/ModularToolManager/ViewModels/SettingsViewModel.cs index f69534d5..222b2bed 100644 --- a/src/ModularToolManager/ViewModels/SettingsViewModel.cs +++ b/src/ModularToolManager/ViewModels/SettingsViewModel.cs @@ -2,12 +2,14 @@ using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using CommunityToolkit.Mvvm.Messaging.Messages; +using ModularToolManager.Enums; using ModularToolManager.Models; using ModularToolManager.Models.Messages; using ModularToolManager.Services.Settings; using ModularToolManager.Services.Ui; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; namespace ModularToolManager.ViewModels; @@ -70,6 +72,12 @@ internal partial class SettingsViewModel : ObservableObject [ObservableProperty] private bool enableAutocompleteForFunctionSearch; + [ObservableProperty] + private ObservableCollection availableWindowPositions; + + [ObservableProperty] + private WindowPositionStrategyViewModel? selectedWindowPosition; + /// /// Create a new instance of this class /// @@ -88,6 +96,17 @@ public SettingsViewModel(ISettingsService settingsService, IThemeService themeSe .Where(style => !string.IsNullOrEmpty(style.Name)) .Select(style => new ApplicationStyleViewModel(style)) .ToList(); + + + AvailableWindowPositions = new ObservableCollection(); + foreach(var windowPosition in Enum.GetValues(typeof(WindowPositionEnum)) + .Cast() + .Select(positionEntry => new WindowPositionStrategyViewModel(positionEntry)) + .ToList()) + { + AvailableWindowPositions.Add(windowPosition); + } + SelectedWindowPosition = AvailableWindowPositions.FirstOrDefault(position => position.WindowPosition == appSettings.WindowPosition) ?? AvailableWindowPositions.FirstOrDefault(entry => entry.WindowPosition == WindowPositionEnum.BottomRight); SelectedTheme = AvailableThemes.Where(theme => theme.Id == appSettings.SelectedThemeId).FirstOrDefault() ?? AvailableThemes.FirstOrDefault(); EnableAutocompleteForFunctionSearch = appSettings.EnableAutocompleteForFunctionSearch; @@ -115,6 +134,7 @@ private void Ok() settings.ClearSearchAfterFunctionExecute = ClearSearchAfterFunctionExecute; settings.SelectedThemeId = SelectedTheme?.Id ?? 0; settings.EnableAutocompleteForFunctionSearch = EnableAutocompleteForFunctionSearch; + settings.WindowPosition = SelectedWindowPosition?.WindowPosition ?? WindowPositionEnum.BottomRight; }); if (changeResult) { diff --git a/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs b/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs new file mode 100644 index 00000000..b312255b --- /dev/null +++ b/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs @@ -0,0 +1,27 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.ComponentModel.__Internals; +using ModularToolManager.Enums; + +namespace ModularToolManager.ViewModels; + +public partial class WindowPositionStrategyViewModel : ObservableObject +{ + [ObservableProperty] + private string displayName; + + public WindowPositionEnum WindowPosition {get; init;} + + public WindowPositionStrategyViewModel(WindowPositionEnum windowPositionEnum) + { + WindowPosition = windowPositionEnum; + DisplayName = windowPositionEnum switch + { + WindowPositionEnum.TopLeft => Properties.Resources.Settings_WindowPosition_Top_Left, + WindowPositionEnum.TopRight => Properties.Resources.Settings_WindowPosition_Top_Right, + WindowPositionEnum.BottomLeft => Properties.Resources.Settings_WindowPosition_Bottom_Left, + WindowPositionEnum.BottomRight => Properties.Resources.Settings_WindowPosition_Bottom_Right, + _ => "" + }; + } + +} diff --git a/src/ModularToolManager/Views/MainWindow.axaml.cs b/src/ModularToolManager/Views/MainWindow.axaml.cs index 793de76c..849c8965 100644 --- a/src/ModularToolManager/Views/MainWindow.axaml.cs +++ b/src/ModularToolManager/Views/MainWindow.axaml.cs @@ -94,6 +94,7 @@ public MainWindow(IWindowManagementService? modalService, ISettingsService? sett WeakReferenceMessenger.Default.Register>(this, (_, settings) => { Topmost = settings.Value.AlwaysOnTop; + PositionWindow(); }); if (settingsService?.GetApplicationSettings().AlwaysOnTop ?? false) { @@ -129,7 +130,8 @@ public override void Show() /// private void PositionWindow() { - windowPositionFactory?.GetWindowPositionStrategy(WindowPositionEnum.BottomRight)?.PositionWindow(this, Screens.Primary); + var windowPosition = settingsService?.GetApplicationSettings()?.WindowPosition ?? WindowPositionEnum.BottomRight; + windowPositionFactory?.GetWindowPositionStrategy(windowPosition)?.PositionWindow(this, Screens.Primary); } /// diff --git a/src/ModularToolManager/Views/SettingsView.axaml b/src/ModularToolManager/Views/SettingsView.axaml index 946e0537..e3a5030a 100644 --- a/src/ModularToolManager/Views/SettingsView.axaml +++ b/src/ModularToolManager/Views/SettingsView.axaml @@ -11,6 +11,7 @@ Content="{x:Static p:Resources.Settings_KeepOnTop}" IsChecked="{Binding TopMost}" /> + + + diff --git a/src/ModularToolManager/Views/WindowPositionStrategyView.axaml.cs b/src/ModularToolManager/Views/WindowPositionStrategyView.axaml.cs new file mode 100644 index 00000000..1d8527d5 --- /dev/null +++ b/src/ModularToolManager/Views/WindowPositionStrategyView.axaml.cs @@ -0,0 +1,10 @@ +using Avalonia.Controls; + +namespace ModularToolManager.Views; +public partial class WindowPositionStrategyView : UserControl +{ + public WindowPositionStrategyView() + { + InitializeComponent(); + } +} From 3eb81369308e67d4408823985299997af1ca8337 Mon Sep 17 00:00:00 2001 From: XanatosX <10531466+XanatosX@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:47:57 +0100 Subject: [PATCH 10/29] Add missing summary blocks --- .../Models/ApplicationSettings.cs | 3 +++ .../ViewModels/SettingsViewModel.cs | 6 ++++++ .../ViewModels/WindowPositionStrategyViewModel.cs | 14 +++++++++++++- src/ModularToolManager/Views/MainWindow.axaml.cs | 2 -- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/ModularToolManager/Models/ApplicationSettings.cs b/src/ModularToolManager/Models/ApplicationSettings.cs index 9c3780ca..6e7ad36e 100644 --- a/src/ModularToolManager/Models/ApplicationSettings.cs +++ b/src/ModularToolManager/Models/ApplicationSettings.cs @@ -62,6 +62,9 @@ public class ApplicationSettings [JsonPropertyName("search_autocomplete")] public bool EnableAutocompleteForFunctionSearch { get; set; } + /// + /// The window position to use by the application. Set to bottom right by default + /// [JsonPropertyName("window_position")] public WindowPositionEnum WindowPosition { get; set; } = WindowPositionEnum.BottomRight; diff --git a/src/ModularToolManager/ViewModels/SettingsViewModel.cs b/src/ModularToolManager/ViewModels/SettingsViewModel.cs index 222b2bed..a42359f6 100644 --- a/src/ModularToolManager/ViewModels/SettingsViewModel.cs +++ b/src/ModularToolManager/ViewModels/SettingsViewModel.cs @@ -72,9 +72,15 @@ internal partial class SettingsViewModel : ObservableObject [ObservableProperty] private bool enableAutocompleteForFunctionSearch; + /// + /// All the available window positions for the application + /// [ObservableProperty] private ObservableCollection availableWindowPositions; + /// + /// The currently selected window position + /// [ObservableProperty] private WindowPositionStrategyViewModel? selectedWindowPosition; diff --git a/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs b/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs index b312255b..0f531537 100644 --- a/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs +++ b/src/ModularToolManager/ViewModels/WindowPositionStrategyViewModel.cs @@ -1,16 +1,28 @@ using CommunityToolkit.Mvvm.ComponentModel; -using CommunityToolkit.Mvvm.ComponentModel.__Internals; using ModularToolManager.Enums; namespace ModularToolManager.ViewModels; +/// +/// View model for the window position strategy +/// public partial class WindowPositionStrategyViewModel : ObservableObject { + /// + /// The display name of the window position strategy + /// [ObservableProperty] private string displayName; + /// + /// The stored window position enum + /// public WindowPositionEnum WindowPosition {get; init;} + /// + /// Create a new instance of this class + /// + /// The window position enum to create a view model for public WindowPositionStrategyViewModel(WindowPositionEnum windowPositionEnum) { WindowPosition = windowPositionEnum; diff --git a/src/ModularToolManager/Views/MainWindow.axaml.cs b/src/ModularToolManager/Views/MainWindow.axaml.cs index 849c8965..4e4eb78a 100644 --- a/src/ModularToolManager/Views/MainWindow.axaml.cs +++ b/src/ModularToolManager/Views/MainWindow.axaml.cs @@ -1,4 +1,3 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Media; using CommunityToolkit.Mvvm.Messaging; @@ -9,7 +8,6 @@ using ModularToolManager.Services.Settings; using ModularToolManager.Services.Ui; using System; -using System.Linq; namespace ModularToolManager.Views; From 6b2f9fa0ffa3979f12f1f9c7fa369babd3aecbe3 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:01:56 +0100 Subject: [PATCH 11/29] Rework dependency injection Add fuzzy search Add search filter selection Add search filter selection to settings Add search filter persistance fixing #134 --- src/ModularToolManager/App.axaml.cs | 16 +-- .../DependencyInjectionExtension.cs | 107 ------------------ .../Models/ApplicationSettings.cs | 11 +- .../ModularToolManager.csproj | 4 + .../Properties/Resources.Designer.cs | 36 ++++++ .../Properties/Resources.de.resx | 12 ++ .../Properties/Resources.resx | 12 ++ .../Services/DepedencyInjection.cs | 49 ++++++++ .../Strategies/DependencyInjection.cs | 21 ++++ .../FunctionButtonContainsNeedleFilter.cs | 48 ++++++++ .../Filters/FunctionButtonFuzzyFilter.cs | 60 ++++++++++ .../Strategies/Filters/IFilterStrategy.cs | 27 +++++ .../Strategies/Filters/IFunctionFilter.cs | 10 ++ .../ViewModels/DepedencyInjection.cs | 30 +++++ .../FunctionSearchFilterViewModel.cs | 46 ++++++++ .../ViewModels/FunctionSelectionViewModel.cs | 21 +++- .../ViewModels/SettingsViewModel.cs | 50 ++++++-- .../Views/DependencyInjection.cs | 30 +++++ .../Views/FunctionSearchFilterView.axaml | 8 ++ .../Views/FunctionSearchFilterView.axaml.cs | 17 +++ .../Views/SettingsView.axaml | 1 + 21 files changed, 488 insertions(+), 128 deletions(-) delete mode 100644 src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs create mode 100644 src/ModularToolManager/Services/DepedencyInjection.cs create mode 100644 src/ModularToolManager/Strategies/DependencyInjection.cs create mode 100644 src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs create mode 100644 src/ModularToolManager/Strategies/Filters/FunctionButtonFuzzyFilter.cs create mode 100644 src/ModularToolManager/Strategies/Filters/IFilterStrategy.cs create mode 100644 src/ModularToolManager/Strategies/Filters/IFunctionFilter.cs create mode 100644 src/ModularToolManager/ViewModels/DepedencyInjection.cs create mode 100644 src/ModularToolManager/ViewModels/FunctionSearchFilterViewModel.cs create mode 100644 src/ModularToolManager/Views/DependencyInjection.cs create mode 100644 src/ModularToolManager/Views/FunctionSearchFilterView.axaml create mode 100644 src/ModularToolManager/Views/FunctionSearchFilterView.axaml.cs diff --git a/src/ModularToolManager/App.axaml.cs b/src/ModularToolManager/App.axaml.cs index 1614debd..0bf836f6 100644 --- a/src/ModularToolManager/App.axaml.cs +++ b/src/ModularToolManager/App.axaml.cs @@ -4,9 +4,10 @@ using Avalonia.Markup.Xaml; using CommunityToolkit.Mvvm.Messaging; using Microsoft.Extensions.DependencyInjection; -using ModularToolManager.DependencyInjection; using ModularToolManager.Models.Messages; +using ModularToolManager.Services; using ModularToolManager.Services.Settings; +using ModularToolManager.Strategies; using ModularToolManager.ViewModels; using ModularToolManager.Views; using ModularToolManagerModel.Services.IO; @@ -37,12 +38,13 @@ private IServiceCollection BuildServiceCollection() { IServiceCollection collection = new ServiceCollection(); return collection.AddServices() - .AddViewModels() - .AddViews() - .AddLogging(config => - { - config.AddSerilog(CreateLoggerConfig(collection)); - }); + .AddViewModels() + .AddViews() + .AddStrategies() + .AddLogging(config => + { + config.AddSerilog(CreateLoggerConfig(collection)); + }); } /// diff --git a/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs b/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs deleted file mode 100644 index 1c28a223..00000000 --- a/src/ModularToolManager/DependencyInjection/DependencyInjectionExtension.cs +++ /dev/null @@ -1,107 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using ModularToolManager.Services.Dependencies; -using ModularToolManager.Services.IO; -using ModularToolManager.Services.Language; -using ModularToolManager.Services.Serialization; -using ModularToolManager.Services.Settings; -using ModularToolManager.Services.Styling; -using ModularToolManager.Services.Ui; -using ModularToolManager.ViewModels; -using ModularToolManager.Views; -using ModularToolManagerModel.DependencyInjection; -using ModularToolManagerModel.Services.Dependency; -using ModularToolManagerModel.Services.Functions; -using ModularToolManagerModel.Services.IO; -using ModularToolManagerModel.Services.Language; -using ModularToolManagerModel.Services.Logging; -using ModularToolManagerModel.Services.Plugin; -using ModularToolManagerModel.Services.Serialization; -using ModularToolManagerPlugin.Services; -using System; -using System.Text.Json; - -namespace ModularToolManager.DependencyInjection; - -/// -/// Static class to add services to depdency injeciton -/// Class will provide extensions methods for this use case -/// -internal static class DependencyInjectionExtension -{ - /// - /// Add all the avalonia default requirements - /// - /// The collection to extend - /// The extended collection - [Obsolete] - public static IServiceCollection AddAvaloniaDefault(this IServiceCollection collection) - { - return collection; - } - - /// - /// Add all the view model - /// - /// The collection to extend - /// The extended collection - public static IServiceCollection AddViewModels(this IServiceCollection collection) - { - return collection.AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient(); - } - - /// - /// Add all the views - /// - /// The collection to extend - /// The extended collection - public static IServiceCollection AddViews(this IServiceCollection collection) - { - return collection.AddTransient(resolver => new MainWindow( - resolver.GetRequiredService(), - resolver.GetRequiredService(), - resolver.GetRequiredService()) - { - DataContext = resolver?.GetService(), - }) - .AddTransient(); - } - - /// - /// Add all the services - /// - /// The collection to extend - /// The extended collection - public static IServiceCollection AddServices(this IServiceCollection collection) - { - return collection.AddAllModelDependencies() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton, JsonSerializationOptionFactory>() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddTransient() - .AddTransient() - .AddTransient() - .AddTransient(); - } -} diff --git a/src/ModularToolManager/Models/ApplicationSettings.cs b/src/ModularToolManager/Models/ApplicationSettings.cs index 6e7ad36e..8bd49940 100644 --- a/src/ModularToolManager/Models/ApplicationSettings.cs +++ b/src/ModularToolManager/Models/ApplicationSettings.cs @@ -1,8 +1,9 @@ -using System.Collections.Generic; +using ModularToolManager.Enums; +using ModularToolManager.Strategies.Filters; +using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text.Json.Serialization; -using ModularToolManager.Enums; namespace ModularToolManager.Models; @@ -62,6 +63,12 @@ public class ApplicationSettings [JsonPropertyName("search_autocomplete")] public bool EnableAutocompleteForFunctionSearch { get; set; } + /// + /// Setting to get the search filter name to use as a default + /// + [JsonPropertyName("search_filter")] + public string SearchFilterTypeName { get; set; } = nameof(FunctionButtonFuzzyFilter); + /// /// The window position to use by the application. Set to bottom right by default /// diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index f7c62b81..70a2efb4 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -32,6 +32,7 @@ + @@ -55,6 +56,9 @@ AllPluginsView.axaml + + FunctionSearchFilterView.axaml + HotkeysView.axaml diff --git a/src/ModularToolManager/Properties/Resources.Designer.cs b/src/ModularToolManager/Properties/Resources.Designer.cs index b597e2c5..854fdb14 100644 --- a/src/ModularToolManager/Properties/Resources.Designer.cs +++ b/src/ModularToolManager/Properties/Resources.Designer.cs @@ -402,6 +402,42 @@ public static string FunctionButton_Sort_Watermark { } } + /// + /// Looks up a localized string similar to A filter checking if the item does contain the search string as a whole. + /// + public static string FunctionButtonContainsNeedleFilter_description { + get { + return ResourceManager.GetString("FunctionButtonContainsNeedleFilter_description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contains Filter. + /// + public static string FunctionButtonContainsNeedleFilter_name { + get { + return ResourceManager.GetString("FunctionButtonContainsNeedleFilter_name", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A filter using fuzzy search to check if an item is valid. + /// + public static string FunctionButtonFuzzyFilter_description { + get { + return ResourceManager.GetString("FunctionButtonFuzzyFilter_description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fuzzy Filter. + /// + public static string FunctionButtonFuzzyFilter_name { + get { + return ResourceManager.GetString("FunctionButtonFuzzyFilter_name", resourceCulture); + } + } + /// /// Looks up a localized string similar to Search for function. /// diff --git a/src/ModularToolManager/Properties/Resources.de.resx b/src/ModularToolManager/Properties/Resources.de.resx index f7f1e220..12bc7ad9 100644 --- a/src/ModularToolManager/Properties/Resources.de.resx +++ b/src/ModularToolManager/Properties/Resources.de.resx @@ -213,6 +213,18 @@ Editieren + + Ein Filter welcher prüft ob das komplette Wort innerhalb des Namens vorkommt + + + Beinhaltet Filter + + + Ein FIlter welcher eine Fuzzy search auf die Einträge durchführt + + + Fuzzy Filter + Entweder der Dateipfad ist falsch, die Dateiendung entspricht nicht der erwarteten oder das entsprechend Plugin wurde entfernt. Bitte editieren Sie die Funktion um den Fehler zu beheben. diff --git a/src/ModularToolManager/Properties/Resources.resx b/src/ModularToolManager/Properties/Resources.resx index 067aa295..188e5b66 100644 --- a/src/ModularToolManager/Properties/Resources.resx +++ b/src/ModularToolManager/Properties/Resources.resx @@ -225,6 +225,18 @@ Project + + A filter checking if the item does contain the search string as a whole + + + Contains Filter + + + A filter using fuzzy search to check if an item is valid + + + Fuzzy Filter + Either the path saved on this function is missing, the extension is wrong or the plugin for execution was removed. Please edit the function to fix the error. diff --git a/src/ModularToolManager/Services/DepedencyInjection.cs b/src/ModularToolManager/Services/DepedencyInjection.cs new file mode 100644 index 00000000..035afeac --- /dev/null +++ b/src/ModularToolManager/Services/DepedencyInjection.cs @@ -0,0 +1,49 @@ +using Microsoft.Extensions.DependencyInjection; +using ModularToolManager.Services.Dependencies; +using ModularToolManager.Services.IO; +using ModularToolManager.Services.Language; +using ModularToolManager.Services.Settings; +using ModularToolManager.Services.Styling; +using ModularToolManager.Services.Ui; +using ModularToolManagerModel.DependencyInjection; +using ModularToolManagerModel.Services.Dependency; +using ModularToolManagerModel.Services.IO; +using ModularToolManagerModel.Services.Language; +using ModularToolManagerModel.Services.Serialization; +using ModularToolManagerPlugin.Services; +using System.Text.Json; + +namespace ModularToolManager.Services; + +/// +/// Dependency Injection for services +/// +public static class DependencyInjection +{ + /// + /// Add all the services + /// + /// The collection to extend + /// The extended collection + public static IServiceCollection AddServices(this IServiceCollection collection) + { + return collection.AddAllModelDependencies() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton, JsonSerializationOptionFactory>() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient(); + } +} \ No newline at end of file diff --git a/src/ModularToolManager/Strategies/DependencyInjection.cs b/src/ModularToolManager/Strategies/DependencyInjection.cs new file mode 100644 index 00000000..3721291d --- /dev/null +++ b/src/ModularToolManager/Strategies/DependencyInjection.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.DependencyInjection; +using ModularToolManager.Strategies.Filters; + +namespace ModularToolManager.Strategies; + +/// +/// Dependency Injection for strategies +/// +public static class DependencyInjection +{ + /// + /// Add all the strategies + /// + /// The collection to extend + /// The extended collection + public static IServiceCollection AddStrategies(this IServiceCollection collection) + { + return collection.AddSingleton() + .AddSingleton(); + } +} diff --git a/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs b/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs new file mode 100644 index 00000000..7bf9cc64 --- /dev/null +++ b/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using System.Linq; +using ModularToolManager.ViewModels; + + +namespace ModularToolManager.Strategies.Filters; + +/// +/// A function button filter which does a contains filter on the function name +/// +internal class FunctionButtonContainsNeedleFilter : IFunctionFilter +{ + public IEnumerable GetFiltered(IEnumerable items, string? needle) + { + if (string.IsNullOrEmpty(needle)) + { + return items; + } + return items.Where(function => (function.DisplayName ?? string.Empty).ToLower().Contains(needle.ToLower())); + } + + public IEnumerable GetFiltered(IEnumerable items, params string[] needles) + { + if (!needles.Any()) + { + return items; + } + List returnItems = new List(); + foreach (var item in items) + { + bool containsAll = true; + foreach (var needle in needles) + { + string displayName = item.DisplayName ?? string.Empty; + if (!displayName.ToLower().Contains(needle.ToLower())) + { + containsAll = false; + break; + } + } + if (containsAll) + { + returnItems.Add(item); + } + } + return returnItems; + } +} \ No newline at end of file diff --git a/src/ModularToolManager/Strategies/Filters/FunctionButtonFuzzyFilter.cs b/src/ModularToolManager/Strategies/Filters/FunctionButtonFuzzyFilter.cs new file mode 100644 index 00000000..75cd938e --- /dev/null +++ b/src/ModularToolManager/Strategies/Filters/FunctionButtonFuzzyFilter.cs @@ -0,0 +1,60 @@ +using FuzzySharp; +using ModularToolManager.ViewModels; +using System.Collections.Generic; +using System.Linq; + +namespace ModularToolManager.Strategies.Filters; + +/// +/// A function button filter which does fuzzy matching on the function name +/// +internal class FunctionButtonFuzzyFilter : IFunctionFilter +{ + /// + public IEnumerable GetFiltered(IEnumerable items, string? needle) + { + if (string.IsNullOrEmpty(needle)) + { + return items; + } + return needle.Length < 3 ? DoContainsMatch(items, needle) : DoFuzzyMatch(items, needle); + } + + /// + /// Method to do a simple contains match + /// + /// The items to search through + /// The needle to search for + /// The filtered data + private IEnumerable DoContainsMatch(IEnumerable items, string needle) + { + return items.Where(function => (function.DisplayName ?? string.Empty).ToLower().Contains(needle.ToLower())); + } + + /// + /// The fuzzy search algorithm + /// + /// The items to search through + /// The needle to search for + /// + private IEnumerable DoFuzzyMatch(IEnumerable items, string needle) + { + var results = Process.ExtractAll(needle, items.Select(item => item.DisplayName), null, null, 60); + if (results is null) + { + return items; + } + List returnList = new List(); + foreach (var result in results) + { + returnList.Add(items.ElementAt(result.Index)); + } + return returnList.OfType(); + } + + /// + public IEnumerable GetFiltered(IEnumerable items, params string[] needles) + { + return GetFiltered(items, string.Join(string.Empty, needles)); + } +} \ No newline at end of file diff --git a/src/ModularToolManager/Strategies/Filters/IFilterStrategy.cs b/src/ModularToolManager/Strategies/Filters/IFilterStrategy.cs new file mode 100644 index 00000000..02289e18 --- /dev/null +++ b/src/ModularToolManager/Strategies/Filters/IFilterStrategy.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace ModularToolManager.Strategies.Filters; + +/// +/// An interface to define a filter for different situations +/// +/// The type of data which should be filtered +/// The type of the needle for filtering +public interface IFilterStrategy +{ + /// + /// Get the filtered items from the provided dataset based on the provided needle + /// + /// The items to filter + /// The needle to search in the data set + /// A list with items matching this filter instance + IEnumerable GetFiltered(IEnumerable items, N? needle); + + /// + /// Get the filtered items from the provided dataset based on the provided needles + /// + /// The items to filter + /// The needles to search in the data set + /// A list with items matching this filter instance + IEnumerable GetFiltered(IEnumerable items, params N[] needles); +} \ No newline at end of file diff --git a/src/ModularToolManager/Strategies/Filters/IFunctionFilter.cs b/src/ModularToolManager/Strategies/Filters/IFunctionFilter.cs new file mode 100644 index 00000000..f50b7f1a --- /dev/null +++ b/src/ModularToolManager/Strategies/Filters/IFunctionFilter.cs @@ -0,0 +1,10 @@ +using ModularToolManager.ViewModels; + +namespace ModularToolManager.Strategies.Filters; + +/// +/// A filter strategy for filtering s. +/// +public interface IFunctionFilter : IFilterStrategy +{ +} \ No newline at end of file diff --git a/src/ModularToolManager/ViewModels/DepedencyInjection.cs b/src/ModularToolManager/ViewModels/DepedencyInjection.cs new file mode 100644 index 00000000..e2cd1d7b --- /dev/null +++ b/src/ModularToolManager/ViewModels/DepedencyInjection.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace ModularToolManager.ViewModels; + +/// +/// Dependency Injection for view models +/// +public static class DependencyInjection +{ + /// + /// Add all the view model + /// + /// The collection to extend + /// The extended collection + public static IServiceCollection AddViewModels(this IServiceCollection collection) + { + return collection.AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient() + .AddTransient(); + } +} diff --git a/src/ModularToolManager/ViewModels/FunctionSearchFilterViewModel.cs b/src/ModularToolManager/ViewModels/FunctionSearchFilterViewModel.cs new file mode 100644 index 00000000..5e3b309e --- /dev/null +++ b/src/ModularToolManager/ViewModels/FunctionSearchFilterViewModel.cs @@ -0,0 +1,46 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using ModularToolManager.Strategies.Filters; + +namespace ModularToolManager.ViewModels; + +/// +/// View model to display a function search filter +/// +public partial class FunctionSearchFilterViewModel : ObservableObject +{ + /// + /// The name for this entry + /// + [ObservableProperty] + private string name; + + /// + /// The description for this entry + /// + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(TooltipShowTime))] + private string description; + + /// + /// Time until the tooltip is getting shwon + /// + public int TooltipShowTime => string.IsNullOrEmpty(Description) ? int.MaxValue : 500; + + /// + /// The key of this entry + /// + public string Key { get; } + + /// + /// Create a new instance of this class + /// + /// The name of the search filter + /// The description of the search filter + /// The filter which is represented by this data set + public FunctionSearchFilterViewModel(string name, string? description, IFunctionFilter filter) + { + this.name = name; + this.description = description ?? string.Empty; + Key = filter.GetType().Name; ; + } +} diff --git a/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs b/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs index 4318e24b..b1c3d06e 100644 --- a/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs +++ b/src/ModularToolManager/ViewModels/FunctionSelectionViewModel.cs @@ -3,6 +3,7 @@ using ModularToolManager.Models; using ModularToolManager.Models.Messages; using ModularToolManager.Services.Settings; +using ModularToolManager.Strategies.Filters; using ModularToolManagerModel.Services.Dependency; using ModularToolManagerModel.Services.Functions; using System; @@ -33,6 +34,11 @@ public partial class FunctionSelectionViewModel : ObservableObject, IDisposable /// private readonly ISettingsService settingsService; + /// + /// All the filters available for this application + /// + private readonly IEnumerable filters; + /// /// Private all the possible functions currently available /// @@ -70,11 +76,15 @@ public partial class FunctionSelectionViewModel : ObservableObject, IDisposable /// /// Create a new instance of this class /// - public FunctionSelectionViewModel(IFunctionService? functionService, IDependencyResolverService dependencyResolverService, ISettingsService settingsService) + public FunctionSelectionViewModel(IFunctionService? functionService, + IDependencyResolverService dependencyResolverService, + ISettingsService settingsService, + IEnumerable filters) { this.functionService = functionService; this.dependencyResolverService = dependencyResolverService; this.settingsService = settingsService; + this.filters = filters; functions = new List(); filteredFunctions = new ObservableCollection(); functionNames = new ObservableCollection(); @@ -137,7 +147,8 @@ protected override void OnPropertyChanged(PropertyChangedEventArgs e) /// private void FilterFunctionList() { - IEnumerable tempFiltered = functions.Where(function => string.IsNullOrEmpty(SearchText) || (function.DisplayName ?? string.Empty).ToLower().Contains(SearchText.ToLower())) + IFunctionFilter filter = GetFunctionFilter(); + IEnumerable tempFiltered = filter.GetFiltered(functions, SearchText) .OrderBy(function => function.SortId) .ThenBy(function => function.DisplayName); FilteredFunctions.Clear(); @@ -147,6 +158,12 @@ private void FilterFunctionList() } } + private IFunctionFilter GetFunctionFilter() + { + var applicationSettings = settingsService.GetApplicationSettings(); + return filters.Where(filter => filter.GetType().Name == applicationSettings.SearchFilterTypeName).FirstOrDefault() ?? filters.First(); + } + /// /// Reload the functions of the application /// diff --git a/src/ModularToolManager/ViewModels/SettingsViewModel.cs b/src/ModularToolManager/ViewModels/SettingsViewModel.cs index a42359f6..c7578d2b 100644 --- a/src/ModularToolManager/ViewModels/SettingsViewModel.cs +++ b/src/ModularToolManager/ViewModels/SettingsViewModel.cs @@ -7,6 +7,7 @@ using ModularToolManager.Models.Messages; using ModularToolManager.Services.Settings; using ModularToolManager.Services.Ui; +using ModularToolManager.Strategies.Filters; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -76,22 +77,38 @@ internal partial class SettingsViewModel : ObservableObject /// All the available window positions for the application /// [ObservableProperty] - private ObservableCollection availableWindowPositions; + private ObservableCollection availableWindowPositions; /// /// The currently selected window position /// [ObservableProperty] - private WindowPositionStrategyViewModel? selectedWindowPosition; + private WindowPositionStrategyViewModel? selectedWindowPosition; + + /// + /// All the search filters which are available for this application + /// + [ObservableProperty] + private List availableSearchFilters; + + /// + /// The currently selected search filter + /// + [ObservableProperty] + private FunctionSearchFilterViewModel? selectedSearchFilter; /// /// Create a new instance of this class /// /// The settings service to use - public SettingsViewModel(ISettingsService settingsService, IThemeService themeService) + public SettingsViewModel(ISettingsService settingsService, IThemeService themeService, IEnumerable availableSearchFilters) { this.settingsService = settingsService; + this.availableSearchFilters = availableSearchFilters.Select(BuildViewModelForFunctionSearch) + .Where(filter => !string.IsNullOrEmpty(filter.Name)) + .ToList(); ApplicationSettings appSettings = settingsService.GetApplicationSettings(); + selectedSearchFilter = this.availableSearchFilters.Where(filter => filter.Key == appSettings.SearchFilterTypeName).FirstOrDefault(); TopMost = appSettings.AlwaysOnTop; CloseOnFunctionExecute = appSettings.MinimizeOnFunctionExecute; StartMinimized = appSettings.StartMinimized; @@ -102,16 +119,16 @@ public SettingsViewModel(ISettingsService settingsService, IThemeService themeSe .Where(style => !string.IsNullOrEmpty(style.Name)) .Select(style => new ApplicationStyleViewModel(style)) .ToList(); - - AvailableWindowPositions = new ObservableCollection(); - foreach(var windowPosition in Enum.GetValues(typeof(WindowPositionEnum)) + + AvailableWindowPositions = new ObservableCollection(); + foreach (var windowPosition in Enum.GetValues(typeof(WindowPositionEnum)) .Cast() .Select(positionEntry => new WindowPositionStrategyViewModel(positionEntry)) .ToList()) - { - AvailableWindowPositions.Add(windowPosition); - } + { + AvailableWindowPositions.Add(windowPosition); + } SelectedWindowPosition = AvailableWindowPositions.FirstOrDefault(position => position.WindowPosition == appSettings.WindowPosition) ?? AvailableWindowPositions.FirstOrDefault(entry => entry.WindowPosition == WindowPositionEnum.BottomRight); SelectedTheme = AvailableThemes.Where(theme => theme.Id == appSettings.SelectedThemeId).FirstOrDefault() ?? AvailableThemes.FirstOrDefault(); EnableAutocompleteForFunctionSearch = appSettings.EnableAutocompleteForFunctionSearch; @@ -125,6 +142,18 @@ public SettingsViewModel(ISettingsService settingsService, IThemeService themeSe }; } + /// + /// Method t obuild the view model for a function search filter + /// + /// The filter to build the view model for + /// A function search filter view model + private FunctionSearchFilterViewModel BuildViewModelForFunctionSearch(IFunctionFilter filter) + { + string name = Properties.Resources.ResourceManager.GetString($"{filter.GetType().Name}_name") ?? string.Empty; + string description = Properties.Resources.ResourceManager.GetString($"{filter.GetType().Name}_description") ?? string.Empty; + return new FunctionSearchFilterViewModel(name, description, filter); + } + /// /// The ok button to save and confirm the changes /// @@ -133,6 +162,7 @@ private void Ok() { var changeResult = settingsService.ChangeSettings(settings => { + settings.SearchFilterTypeName = SelectedSearchFilter?.Key ?? settings.SearchFilterTypeName; settings.StartMinimized = StartMinimized; settings.ShowInTaskbar = ShowInTaskbar; settings.AlwaysOnTop = TopMost; @@ -140,7 +170,7 @@ private void Ok() settings.ClearSearchAfterFunctionExecute = ClearSearchAfterFunctionExecute; settings.SelectedThemeId = SelectedTheme?.Id ?? 0; settings.EnableAutocompleteForFunctionSearch = EnableAutocompleteForFunctionSearch; - settings.WindowPosition = SelectedWindowPosition?.WindowPosition ?? WindowPositionEnum.BottomRight; + settings.WindowPosition = SelectedWindowPosition?.WindowPosition ?? WindowPositionEnum.BottomRight; }); if (changeResult) { diff --git a/src/ModularToolManager/Views/DependencyInjection.cs b/src/ModularToolManager/Views/DependencyInjection.cs new file mode 100644 index 00000000..86a4b0bc --- /dev/null +++ b/src/ModularToolManager/Views/DependencyInjection.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.DependencyInjection; +using ModularToolManager.Services.Settings; +using ModularToolManager.Services.Ui; +using ModularToolManager.ViewModels; + +namespace ModularToolManager.Views; + +/// +/// Dependency Injection for views +/// +public static class DependencyInjection +{ + /// + /// Add all the views + /// + /// The collection to extend + /// The extended collection + public static IServiceCollection AddViews(this IServiceCollection collection) + { + return collection.AddTransient(resolver => new MainWindow( + resolver.GetRequiredService(), + resolver.GetRequiredService(), + resolver.GetRequiredService()) + { + DataContext = resolver?.GetService(), + }) + .AddTransient() + .AddTransient(); + } +} diff --git a/src/ModularToolManager/Views/FunctionSearchFilterView.axaml b/src/ModularToolManager/Views/FunctionSearchFilterView.axaml new file mode 100644 index 00000000..ee14607d --- /dev/null +++ b/src/ModularToolManager/Views/FunctionSearchFilterView.axaml @@ -0,0 +1,8 @@ + + + diff --git a/src/ModularToolManager/Views/FunctionSearchFilterView.axaml.cs b/src/ModularToolManager/Views/FunctionSearchFilterView.axaml.cs new file mode 100644 index 00000000..612f429e --- /dev/null +++ b/src/ModularToolManager/Views/FunctionSearchFilterView.axaml.cs @@ -0,0 +1,17 @@ +using Avalonia.Controls; + + +namespace ModularToolManager.Views; + +/// +/// Class for the function plugin view +/// +public partial class FunctionSearchFilterView : UserControl +{ + + /// + public FunctionSearchFilterView() + { + InitializeComponent(); + } +} diff --git a/src/ModularToolManager/Views/SettingsView.axaml b/src/ModularToolManager/Views/SettingsView.axaml index e3a5030a..e3d8a487 100644 --- a/src/ModularToolManager/Views/SettingsView.axaml +++ b/src/ModularToolManager/Views/SettingsView.axaml @@ -30,6 +30,7 @@ /> + From 513bb2c4586c9571add8ad173276e216669900d5 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:07:06 +0100 Subject: [PATCH 12/29] Add missing summary blocks --- .../Strategies/Filters/FunctionButtonContainsNeedleFilter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs b/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs index 7bf9cc64..306b6f92 100644 --- a/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs +++ b/src/ModularToolManager/Strategies/Filters/FunctionButtonContainsNeedleFilter.cs @@ -2,7 +2,6 @@ using System.Linq; using ModularToolManager.ViewModels; - namespace ModularToolManager.Strategies.Filters; /// @@ -10,6 +9,7 @@ namespace ModularToolManager.Strategies.Filters; /// internal class FunctionButtonContainsNeedleFilter : IFunctionFilter { + /// public IEnumerable GetFiltered(IEnumerable items, string? needle) { if (string.IsNullOrEmpty(needle)) @@ -19,6 +19,7 @@ public IEnumerable GetFiltered(IEnumerable (function.DisplayName ?? string.Empty).ToLower().Contains(needle.ToLower())); } + /// public IEnumerable GetFiltered(IEnumerable items, params string[] needles) { if (!needles.Any()) From 9ab045fa2a95207262506082459991daed848fb2 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:01:41 +0200 Subject: [PATCH 13/29] Update Crowdin configuration file --- crowdin.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 crowdin.yml diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..fa172a29 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: src/ModularToolManager/Properties/Resources.resx + translation: /src/ModularToolManager/Properties/%file_name%.%two_letters_code%.%file_extension% From ddb5dc727950cba3b1e4f37f494c302e0ca7cba4 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:02:10 +0200 Subject: [PATCH 14/29] New translations resources.resx (German) --- .../Properties/Resources.de.resx | 77 ++++++++++++++----- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/src/ModularToolManager/Properties/Resources.de.resx b/src/ModularToolManager/Properties/Resources.de.resx index 12bc7ad9..41ee36f1 100644 --- a/src/ModularToolManager/Properties/Resources.de.resx +++ b/src/ModularToolManager/Properties/Resources.de.resx @@ -59,46 +59,46 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - - + + - + - - - - + + + + - - + + - - + + - - - - + + + + - + - + @@ -120,8 +120,8 @@ Abhängigkeiten - - Benutzerhandbuch + + User Manual Lizenz @@ -159,6 +159,9 @@ Einstellungen + + Modular Tool Manager + Blaues Thema @@ -204,6 +207,9 @@ Ok + + ... + Speichern @@ -213,6 +219,12 @@ Editieren + + License + + + Project + Ein Filter welcher prüft ob das komplette Wort innerhalb des Namens vorkommt @@ -228,6 +240,9 @@ Entweder der Dateipfad ist falsch, die Dateiendung entspricht nicht der erwarteten oder das entsprechend Plugin wurde entfernt. Bitte editieren Sie die Funktion um den Fehler zu beheben. + + Sorting Order + Nach Funktion suchen @@ -276,6 +291,27 @@ Fehler melden + + ctrl + + + Esc + + + F1 + + + F12 + + + h + + + l + + + n + Datei @@ -357,6 +393,9 @@ Neue Funktion + + Plugins + Fehler Melden From 23988bcc2023af2c2d6df73c73c436ea1f9257a1 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:42:55 +0200 Subject: [PATCH 15/29] New translations resources.resx (German) --- .../Properties/Resources.de.resx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/ModularToolManager/Properties/Resources.de.resx b/src/ModularToolManager/Properties/Resources.de.resx index 41ee36f1..cd80fe14 100644 --- a/src/ModularToolManager/Properties/Resources.de.resx +++ b/src/ModularToolManager/Properties/Resources.de.resx @@ -121,7 +121,7 @@ Abhängigkeiten - User Manual + Benutzerhandbuch Lizenz @@ -145,16 +145,16 @@ Den Funktionen Sortiermodus aktivieren, dieser Modus erlaubt es eine Sortiernummer an den Funktionen zu hinterlegen. Diese Nummer wird für die Sortierung genutzt - Neue Funktions Sortierung verwerfen + Neue Funktionssortierung verwerfen - Den Funktionen Sortiermodus verlassen ohne die Änderungen zu speichern + Den Funktionen Sortiermodus verlassen, ohne die Änderungen zu speichern Neue Sortierung speichern - Speichern der neuen Funktionen sortierung + Speichern der neuen Sortierung Einstellungen @@ -166,7 +166,7 @@ Blaues Thema - Ein Theme welches um die Farbe Blau aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus. + Ein Theme welches um die Farbe Blau aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus Dunkler Modus @@ -178,7 +178,7 @@ Grünes Thema - Ein Theme welches um die Farbe Grün aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus. + Ein Theme welches um die Farbe Grün aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus Heller Modus @@ -190,13 +190,13 @@ Orangenes Thema - Ein Theme welches um die Farbe Orange aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus. + Ein Theme welches um die Farbe Orange aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus Rotes Thema - Ein Theme welches um die Farbe Rot aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus. + Ein Theme welches um die Farbe Rot aufgebaut ist. Diese wirkt sich hauptsächlich auf den Hintergrund aus Projekt Website im Browser öffnen @@ -220,10 +220,10 @@ Editieren - License + Lizenz - Project + Projekt Ein Filter welcher prüft ob das komplette Wort innerhalb des Namens vorkommt @@ -232,7 +232,7 @@ Beinhaltet Filter - Ein FIlter welcher eine Fuzzy search auf die Einträge durchführt + Ein Filter welcher eine "Fuzzy search" auf die Einträge durchführt Fuzzy Filter @@ -241,19 +241,19 @@ Entweder der Dateipfad ist falsch, die Dateiendung entspricht nicht der erwarteten oder das entsprechend Plugin wurde entfernt. Bitte editieren Sie die Funktion um den Fehler zu beheben. - Sorting Order + Sortieranordnung Nach Funktion suchen - Aktuelle aktion abbrechen + Aktuelle Aktion abbrechen - Abbrechen des aktuellen vorgangs + Abbrechen des aktuellen Vorgangs - Sprache ändern, Funktion hinzufügen/Ändern, Einstellungs Fenster + Sprache ändern, Funktion hinzufügen/Ändern, Einstellungsfenster Funktioniert an folgenden Stellen: @@ -286,13 +286,13 @@ Neuer Funktion - Report a bug found within the application + Fehler innerhalb der Anwendung melden Fehler melden - ctrl + strg Esc @@ -325,7 +325,7 @@ Funktionsanzeigename - Funktions Parameter + Funktionsparameter Autoren: @@ -346,13 +346,13 @@ Läuft mit Avalonia UI - Automatische vervollständigung für Funktionsfilter aktivieren + Automatische Vervollständigung für Funktionsfilter aktivieren - Suche löschen nachdem eine Funktion ausgeführt wurde + Suche löschen, nachdem eine Funktion ausgeführt wurde - Applikation schließen nachdem Funktion ausgeführt wurde + Applikation schließen, nachdem Funktion ausgeführt wurde Immer über anderen Fenstern @@ -403,10 +403,10 @@ Einstellungen - Application minimieren + Applikation minimieren - Application anzeigen + Applikation anzeigen Funktion anpassen From 9bf420e9f7a5bd59c4bfe6fe369bfc2e0f5cc167 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:08:47 +0200 Subject: [PATCH 16/29] Rework translation for plugins Allowing translation for crowdin --- src/DefaultPlugins/Translations/de-DE.json | 64 ++++--------------- src/DefaultPlugins/Translations/en-EN.json | 64 ++++--------------- .../Language/PluginTranslationService.cs | 15 ++++- 3 files changed, 42 insertions(+), 101 deletions(-) diff --git a/src/DefaultPlugins/Translations/de-DE.json b/src/DefaultPlugins/Translations/de-DE.json index ed21ae1d..b2cd352a 100644 --- a/src/DefaultPlugins/Translations/de-DE.json +++ b/src/DefaultPlugins/Translations/de-DE.json @@ -1,50 +1,14 @@ -[ - { - "key": "script-displayname", - "value": "Skript ausführung" - }, - { - "key": "script-description", - "value": "Diese Plugin erlaubt Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen" - }, - { - "key": "binary-displayname", - "value": "Ausführbare Datei starten" - }, - { - "key": "binary-description", - "value": "Diese Plugin erlaubt es Ihnen Binäre Dateien mit dem Modular Tool Manager auszuführen" - }, - { - "key": "batch", - "value": "Batch-Skript" - }, - { - "key": "cmd", - "value": "CMD-Skript" - }, - { - "key": "powershell", - "value": "PowerShell-Skript" - }, - { - "key": "executable", - "value": "Ausführbare-Datei" - }, - { - "key": "error_cant_find_script_file", - "value": "Konnte das auszuführende Skript '{0}' nicht finden" - }, - { - "key": "error_cant_find_binary_file", - "value": "Konnte ausführbare datei '{0}' nicht finden" - }, - { - "key": "hide", - "value": "Terminal verstecken" - }, - { - "key": "adminRequired", - "value": "Als Administrator ausführen" - } -] \ No newline at end of file +{ + "script-displayname": "Skript ausführung", + "script-description": "Diese Plugin erlaubt Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen", + "binary-displayname": "Ausführbare Datei starten", + "binary-description": "Diese Plugin erlaubt es Ihnen Binäre Dateien mit dem Modular Tool Manager auszuführen", + "batch": "Batch-Skript", + "cmd": "CMD-Skript", + "powershell": "PowerShell-Skript", + "executable": "Ausführbare-Datei", + "error_cant_find_script_file": "Konnte das auszuführende Skript '{0}' nicht finden", + "error_cant_find_binary_file": "Konnte ausführbare datei '{0}' nicht finden", + "hide": "Terminal verstecken", + "adminRequired": "Als Administrator ausführen" +} \ No newline at end of file diff --git a/src/DefaultPlugins/Translations/en-EN.json b/src/DefaultPlugins/Translations/en-EN.json index 373bef08..45649428 100644 --- a/src/DefaultPlugins/Translations/en-EN.json +++ b/src/DefaultPlugins/Translations/en-EN.json @@ -1,50 +1,14 @@ -[ - { - "key": "script-displayname", - "value": "Script execution" - }, - { - "key": "script-description", - "value": "This plugin will allow you to run scrip files with the modular tool manager" - }, - { - "key": "binary-displayname", - "value": "Start executable binary file" - }, - { - "key": "binary-description", - "value": "This plugin will allow you to run binary executable with the modular tool manager" - }, - { - "key": "batch", - "value": "Batch-Script" - }, - { - "key": "cmd", - "value": "CMD-Script" - }, - { - "key": "powershell", - "value": "PowerShell-Script" - }, - { - "key": "executable", - "value": "Executable-File" - }, - { - "key": "error_cant_find_script_file", - "value": "Could not find script '{0}' to execute" - }, - { - "key": "error_cant_find_binary_file", - "value": "Could not find binary file '{0}' to run" - }, - { - "key": "hide", - "value": "Hide command line" - }, - { - "key": "adminRequired", - "value": "Run as Administrator" - } -] \ No newline at end of file +{ + "script-displayname": "Script execution", + "script-description": "This plugin will allow you to run scrip files with the modular tool manager", + "binary-displayname": "Start executable binary file", + "binary-description": "This plugin will allow you to run binary executable with the modular tool manager", + "batch": "Batch-Script", + "cmd": "CMD-Script", + "powershell": "PowerShell-Script", + "executable": "Executable-File", + "error_cant_find_script_file": "Could not find script '{0}' to execute", + "error_cant_find_binary_file": "Could not find binary file '{0}' to run", + "hide": "Hide command line", + "adminRequired": "Run as Administrator" +} \ No newline at end of file diff --git a/src/ModularToolManager/Services/Language/PluginTranslationService.cs b/src/ModularToolManager/Services/Language/PluginTranslationService.cs index 0e3e239f..8ce27f63 100644 --- a/src/ModularToolManager/Services/Language/PluginTranslationService.cs +++ b/src/ModularToolManager/Services/Language/PluginTranslationService.cs @@ -167,7 +167,20 @@ private string GetLanguageFromPath(string path) /// A list with all possible translations private List GetTranslationsFromFile(Assembly assembly, string cultureFile) { - return JsonSerializer.Deserialize>(LoadResourceData(assembly, cultureFile)) ?? new(); + List translations = new(); + try + { + var data = JsonSerializer.Deserialize>(LoadResourceData(assembly, cultureFile)); + foreach (var item in data) + { + translations.Add(new TranslationModel { Key = item.Key, Value = item.Value }); + } + } + catch (System.Exception e) + { + logger.LogError(e, "Error trying to parse translation file"); + } + return translations; } /// From cd66ef88a78015c3a22b85a9a796d228e3030faf Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:13:19 +0200 Subject: [PATCH 17/29] Update Crowdin configuration file --- crowdin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crowdin.yml b/crowdin.yml index fa172a29..67ab96ec 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,5 @@ files: - source: src/ModularToolManager/Properties/Resources.resx translation: /src/ModularToolManager/Properties/%file_name%.%two_letters_code%.%file_extension% + - source: src/DefaultPlugins/Translations/en-EN.json + translation: /src/DefaultPlugins/Translation/%locale%.%file_extension% From 98b1e96932d5b26851dfe447ee497ae5ee57d307 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:13:29 +0200 Subject: [PATCH 18/29] New translations en-en.json (German) --- src/DefaultPlugins/Translation/de-DE.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/DefaultPlugins/Translation/de-DE.json diff --git a/src/DefaultPlugins/Translation/de-DE.json b/src/DefaultPlugins/Translation/de-DE.json new file mode 100644 index 00000000..45649428 --- /dev/null +++ b/src/DefaultPlugins/Translation/de-DE.json @@ -0,0 +1,14 @@ +{ + "script-displayname": "Script execution", + "script-description": "This plugin will allow you to run scrip files with the modular tool manager", + "binary-displayname": "Start executable binary file", + "binary-description": "This plugin will allow you to run binary executable with the modular tool manager", + "batch": "Batch-Script", + "cmd": "CMD-Script", + "powershell": "PowerShell-Script", + "executable": "Executable-File", + "error_cant_find_script_file": "Could not find script '{0}' to execute", + "error_cant_find_binary_file": "Could not find binary file '{0}' to run", + "hide": "Hide command line", + "adminRequired": "Run as Administrator" +} \ No newline at end of file From 6fd6a8885aeb36f1977de14dde5e628919e3df97 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:14:30 +0200 Subject: [PATCH 19/29] Update Crowdin configuration file --- crowdin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdin.yml b/crowdin.yml index 67ab96ec..16aecbae 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -2,4 +2,4 @@ files: - source: src/ModularToolManager/Properties/Resources.resx translation: /src/ModularToolManager/Properties/%file_name%.%two_letters_code%.%file_extension% - source: src/DefaultPlugins/Translations/en-EN.json - translation: /src/DefaultPlugins/Translation/%locale%.%file_extension% + translation: /src/DefaultPlugins/Translations/%locale%.%file_extension% From 05cc0757bb1783fbe80216ee990bf2adb0818620 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:14:37 +0200 Subject: [PATCH 20/29] New translations en-en.json (German) --- src/DefaultPlugins/Translations/de-DE.json | 64 +++++----------------- 1 file changed, 14 insertions(+), 50 deletions(-) diff --git a/src/DefaultPlugins/Translations/de-DE.json b/src/DefaultPlugins/Translations/de-DE.json index ed21ae1d..b2cd352a 100644 --- a/src/DefaultPlugins/Translations/de-DE.json +++ b/src/DefaultPlugins/Translations/de-DE.json @@ -1,50 +1,14 @@ -[ - { - "key": "script-displayname", - "value": "Skript ausführung" - }, - { - "key": "script-description", - "value": "Diese Plugin erlaubt Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen" - }, - { - "key": "binary-displayname", - "value": "Ausführbare Datei starten" - }, - { - "key": "binary-description", - "value": "Diese Plugin erlaubt es Ihnen Binäre Dateien mit dem Modular Tool Manager auszuführen" - }, - { - "key": "batch", - "value": "Batch-Skript" - }, - { - "key": "cmd", - "value": "CMD-Skript" - }, - { - "key": "powershell", - "value": "PowerShell-Skript" - }, - { - "key": "executable", - "value": "Ausführbare-Datei" - }, - { - "key": "error_cant_find_script_file", - "value": "Konnte das auszuführende Skript '{0}' nicht finden" - }, - { - "key": "error_cant_find_binary_file", - "value": "Konnte ausführbare datei '{0}' nicht finden" - }, - { - "key": "hide", - "value": "Terminal verstecken" - }, - { - "key": "adminRequired", - "value": "Als Administrator ausführen" - } -] \ No newline at end of file +{ + "script-displayname": "Skript ausführung", + "script-description": "Diese Plugin erlaubt Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen", + "binary-displayname": "Ausführbare Datei starten", + "binary-description": "Diese Plugin erlaubt es Ihnen Binäre Dateien mit dem Modular Tool Manager auszuführen", + "batch": "Batch-Skript", + "cmd": "CMD-Skript", + "powershell": "PowerShell-Skript", + "executable": "Ausführbare-Datei", + "error_cant_find_script_file": "Konnte das auszuführende Skript '{0}' nicht finden", + "error_cant_find_binary_file": "Konnte ausführbare datei '{0}' nicht finden", + "hide": "Terminal verstecken", + "adminRequired": "Als Administrator ausführen" +} \ No newline at end of file From 886e05fc9f6eadd966faf292344ce91437c47bc9 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:14:54 +0200 Subject: [PATCH 21/29] Delete src/DefaultPlugins/Translation/de-DE.json --- src/DefaultPlugins/Translation/de-DE.json | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/DefaultPlugins/Translation/de-DE.json diff --git a/src/DefaultPlugins/Translation/de-DE.json b/src/DefaultPlugins/Translation/de-DE.json deleted file mode 100644 index 45649428..00000000 --- a/src/DefaultPlugins/Translation/de-DE.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "script-displayname": "Script execution", - "script-description": "This plugin will allow you to run scrip files with the modular tool manager", - "binary-displayname": "Start executable binary file", - "binary-description": "This plugin will allow you to run binary executable with the modular tool manager", - "batch": "Batch-Script", - "cmd": "CMD-Script", - "powershell": "PowerShell-Script", - "executable": "Executable-File", - "error_cant_find_script_file": "Could not find script '{0}' to execute", - "error_cant_find_binary_file": "Could not find binary file '{0}' to run", - "hide": "Hide command line", - "adminRequired": "Run as Administrator" -} \ No newline at end of file From 64cc1c5e42767b1588980fca7d535be9c3733af2 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:16:49 +0200 Subject: [PATCH 22/29] New translations en-en.json (German) --- src/DefaultPlugins/Translations/de-DE.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DefaultPlugins/Translations/de-DE.json b/src/DefaultPlugins/Translations/de-DE.json index b2cd352a..f0c05fe5 100644 --- a/src/DefaultPlugins/Translations/de-DE.json +++ b/src/DefaultPlugins/Translations/de-DE.json @@ -1,14 +1,14 @@ { - "script-displayname": "Skript ausführung", - "script-description": "Diese Plugin erlaubt Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen", + "script-displayname": "Skriptausführung", + "script-description": "Dieses Plugin erlaubt es Ihnen Skript-Dateien mit dem Modular Tool Manager auszuführen", "binary-displayname": "Ausführbare Datei starten", - "binary-description": "Diese Plugin erlaubt es Ihnen Binäre Dateien mit dem Modular Tool Manager auszuführen", + "binary-description": "Dieses Plugin erlaubt es Ihnen binäre Dateien mit dem Modular Tool Manager auszuführen", "batch": "Batch-Skript", "cmd": "CMD-Skript", "powershell": "PowerShell-Skript", "executable": "Ausführbare-Datei", "error_cant_find_script_file": "Konnte das auszuführende Skript '{0}' nicht finden", - "error_cant_find_binary_file": "Konnte ausführbare datei '{0}' nicht finden", + "error_cant_find_binary_file": "Konnte ausführbare Datei '{0}' nicht finden", "hide": "Terminal verstecken", "adminRequired": "Als Administrator ausführen" } \ No newline at end of file From 38c6a31d337508614cbc6fffb78c1a35084235b5 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Sun, 21 Apr 2024 00:42:44 +0200 Subject: [PATCH 23/29] Add first suggestions --- .../ModularToolManager.csproj | 13 + .../Properties/Resources.Designer.cs | 945 ------------------ 2 files changed, 13 insertions(+), 945 deletions(-) delete mode 100644 src/ModularToolManager/Properties/Resources.Designer.cs diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 70a2efb4..8aba27c3 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -4,6 +4,7 @@ net7.0 enable Assets\application-logo.ico + PrepareResources;$(CompileDependsOn) @@ -15,6 +16,18 @@ + + + + MSBuild:Compile + Resources.Designer.cs + $(IntermediateOutputPath)\Resources.Designer.cs + CSharp + ModularToolManager.Properties + Resources + + + diff --git a/src/ModularToolManager/Properties/Resources.Designer.cs b/src/ModularToolManager/Properties/Resources.Designer.cs deleted file mode 100644 index 854fdb14..00000000 --- a/src/ModularToolManager/Properties/Resources.Designer.cs +++ /dev/null @@ -1,945 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ModularToolManager.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModularToolManager.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// 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 User Manual. - /// - public static string About_GitHubUserManual { - get { - return ResourceManager.GetString("About_GitHubUserManual", resourceCulture); - } - } - - /// - /// 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 Repository:. - /// - public static string About_Repository_Colon { - get { - return ResourceManager.GetString("About_Repository_Colon", resourceCulture); - } - } - - /// - /// 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. - /// - public static string AddFunction_FunctionPathWatermark { - get { - return ResourceManager.GetString("AddFunction_FunctionPathWatermark", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Information. - /// - public static string AllPlugins_Header_Information { - get { - return ResourceManager.GetString("AllPlugins_Header_Information", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter function order mode. - /// - public static string AllPlugins_Header_OrderModeEnter { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeEnter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Does enter the order mode, this allows you to sort the functions as you like based on a number value. - /// - public static string AllPlugins_Header_OrderModeEnter_Tooltip { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeEnter_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Leave function order mode. - /// - public static string AllPlugins_Header_OrderModeLeave { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeLeave", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Does leave the order mode, without saving it. - /// - public static string AllPlugins_Header_OrderModeLeave_Tooltip { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeLeave_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save new function order. - /// - public static string AllPlugins_Header_OrderModeSave { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeSave", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Does leave the order mode and does save the changes. - /// - public static string AllPlugins_Header_OrderModeSave_Tooltip { - get { - return ResourceManager.GetString("AllPlugins_Header_OrderModeSave_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Settings. - /// - public static string AllPlugins_Header_Settings { - get { - return ResourceManager.GetString("AllPlugins_Header_Settings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Blue Theme. - /// - public static string App_Blue_Theme { - get { - return ResourceManager.GetString("App_Blue_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A Theme which mainly uses the color blue as a background. - /// - public static string App_Blue_Theme_Description { - get { - return ResourceManager.GetString("App_Blue_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dark mode. - /// - public static string App_Dark_Theme { - get { - return ResourceManager.GetString("App_Dark_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dark theme for the application. - /// - public static string App_Dark_Theme_Description { - get { - return ResourceManager.GetString("App_Dark_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Green Theme. - /// - public static string App_Green_Theme { - get { - return ResourceManager.GetString("App_Green_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A Theme which mainly uses the color green as a background. - /// - public static string App_Green_Theme_Description { - get { - return ResourceManager.GetString("App_Green_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Light mode. - /// - public static string App_Light_Theme { - get { - return ResourceManager.GetString("App_Light_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Light theme for the application. - /// - public static string App_Light_Theme_Description { - get { - return ResourceManager.GetString("App_Light_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Orange Theme. - /// - public static string App_Orange_Theme { - get { - return ResourceManager.GetString("App_Orange_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A Theme which mainly uses the color orange as a background. - /// - public static string App_Orange_Theme_Description { - get { - return ResourceManager.GetString("App_Orange_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Red Theme. - /// - public static string App_Red_Theme { - get { - return ResourceManager.GetString("App_Red_Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A Theme which mainly uses the color red as a background. - /// - public static string App_Red_Theme_Description { - get { - return ResourceManager.GetString("App_Red_Theme_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Modular Tool Manager. - /// - public static string Application_Name { - get { - return ResourceManager.GetString("Application_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open project website. - /// - public static string Button_Open_Project { - get { - return ResourceManager.GetString("Button_Open_Project", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete. - /// - public static string Default_Delete { - get { - return ResourceManager.GetString("Default_Delete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit. - /// - public static string Default_Edit { - get { - return ResourceManager.GetString("Default_Edit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Abort. - /// - public static string DefaultButton_Abort { - get { - return ResourceManager.GetString("DefaultButton_Abort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ok. - /// - public static string DefaultButton_Ok { - get { - return ResourceManager.GetString("DefaultButton_Ok", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to .... - /// - public static string DefaultButton_OpenFile { - get { - return ResourceManager.GetString("DefaultButton_OpenFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save. - /// - public static string DefaultButton_Save { - get { - return ResourceManager.GetString("DefaultButton_Save", resourceCulture); - } - } - - /// - /// 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 Either the path saved on this function is missing, the extension is wrong or the plugin for execution was removed. Please edit the function to fix the error.. - /// - public static string FunctionButton_Method_Error { - get { - return ResourceManager.GetString("FunctionButton_Method_Error", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sorting Order. - /// - public static string FunctionButton_Sort_Watermark { - get { - return ResourceManager.GetString("FunctionButton_Sort_Watermark", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A filter checking if the item does contain the search string as a whole. - /// - public static string FunctionButtonContainsNeedleFilter_description { - get { - return ResourceManager.GetString("FunctionButtonContainsNeedleFilter_description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Contains Filter. - /// - public static string FunctionButtonContainsNeedleFilter_name { - get { - return ResourceManager.GetString("FunctionButtonContainsNeedleFilter_name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A filter using fuzzy search to check if an item is valid. - /// - public static string FunctionButtonFuzzyFilter_description { - get { - return ResourceManager.GetString("FunctionButtonFuzzyFilter_description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Fuzzy Filter. - /// - public static string FunctionButtonFuzzyFilter_name { - get { - return ResourceManager.GetString("FunctionButtonFuzzyFilter_name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Search for function. - /// - public static string FunctionSelection_SearchForFunction { - get { - return ResourceManager.GetString("FunctionSelection_SearchForFunction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Abort the current action or close the current modal. - /// - public static string Hotkey_Abort_Description { - get { - return ResourceManager.GetString("Hotkey_Abort_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Abort. - /// - public static string Hotkey_Abort_Name { - get { - return ResourceManager.GetString("Hotkey_Abort_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Change Language, Add/Edit Function, Settings. - /// - public static string Hotkey_Abort_WorkingOn { - get { - return ResourceManager.GetString("Hotkey_Abort_WorkingOn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Working at the following places:. - /// - public static string Hotkey_Abort_WorkingOn_Prefix_Colon { - get { - return ResourceManager.GetString("Hotkey_Abort_WorkingOn_Prefix_Colon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open the about page of the application. - /// - public static string Hotkey_About_Description { - get { - return ResourceManager.GetString("Hotkey_About_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to About page. - /// - public static string Hotkey_About_Name { - get { - return ResourceManager.GetString("Hotkey_About_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hide the application into the system tray. - /// - public static string Hotkey_Hide_Description { - get { - return ResourceManager.GetString("Hotkey_Hide_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hide Application. - /// - public static string Hotkey_Hide_Name { - get { - return ResourceManager.GetString("Hotkey_Hide_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open the change language dialog. - /// - public static string Hotkey_Language_Description { - get { - return ResourceManager.GetString("Hotkey_Language_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Change Application language. - /// - public static string Hotkey_Language_Name { - get { - return ResourceManager.GetString("Hotkey_Language_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Main Window. - /// - public static string Hotkey_Main_Window_WorkinOn { - get { - return ResourceManager.GetString("Hotkey_Main_Window_WorkinOn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Create a new function. - /// - public static string Hotkey_New_Description { - get { - return ResourceManager.GetString("Hotkey_New_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Function. - /// - public static string Hotkey_New_Name { - get { - return ResourceManager.GetString("Hotkey_New_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Report a bug found within the application. - /// - public static string Hotkey_Report_Bug_Description { - get { - return ResourceManager.GetString("Hotkey_Report_Bug_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Report bug. - /// - public static string Hotkey_Report_Bug_Name { - get { - return ResourceManager.GetString("Hotkey_Report_Bug_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ctrl. - /// - public static string Key_Ctrl { - get { - return ResourceManager.GetString("Key_Ctrl", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Esc. - /// - public static string Key_Esc { - get { - return ResourceManager.GetString("Key_Esc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to F1. - /// - public static string Key_F1 { - get { - return ResourceManager.GetString("Key_F1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to F12. - /// - public static string Key_F12 { - get { - return ResourceManager.GetString("Key_F12", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to h. - /// - public static string Key_H { - get { - return ResourceManager.GetString("Key_H", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to l. - /// - public static string Key_L { - get { - return ResourceManager.GetString("Key_L", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to n. - /// - public static string Key_N { - get { - return ResourceManager.GetString("Key_N", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to File. - /// - public static string Menu_File { - get { - return ResourceManager.GetString("Menu_File", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Help. - /// - public static string Menu_Help { - get { - return ResourceManager.GetString("Menu_Help", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Function Description. - /// - public static string NewFunction_Description { - get { - return ResourceManager.GetString("NewFunction_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Function Display Name. - /// - public static string NewFunction_Name { - get { - return ResourceManager.GetString("NewFunction_Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Function Parameters. - /// - public static string NewFunction_Parameters { - get { - return ResourceManager.GetString("NewFunction_Parameters", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Authors:. - /// - public static string Plugin_Authors_Colon { - get { - return ResourceManager.GetString("Plugin_Authors_Colon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Description:. - /// - public static string Plugin_Description_Colon { - get { - return ResourceManager.GetString("Plugin_Description_Colon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Name:. - /// - public static string Plugin_DisplayName_Colon { - get { - return ResourceManager.GetString("Plugin_DisplayName_Colon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to License:. - /// - public static string Plugin_License_Colon { - get { - return ResourceManager.GetString("Plugin_License_Colon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Project url:. - /// - public static string Plugin_Url_Colon { - get { - return ResourceManager.GetString("Plugin_Url_Colon", resourceCulture); - } - } - - /// - /// 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 Enable Autocomplete for function search. - /// - public static string Settings_AllowAutocompleteForFunctionSearch { - get { - return ResourceManager.GetString("Settings_AllowAutocompleteForFunctionSearch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Clear function search if function was executed. - /// - public static string Settings_ClearSearchAfterFunctionExecute { - get { - return ResourceManager.GetString("Settings_ClearSearchAfterFunctionExecute", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Close if a function was executed. - /// - public static string Settings_CloseOnFunctionExecute { - get { - return ResourceManager.GetString("Settings_CloseOnFunctionExecute", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Keep on Top. - /// - public static string Settings_KeepOnTop { - get { - return ResourceManager.GetString("Settings_KeepOnTop", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show in Taskbar. - /// - public static string Settings_ShowInTaskbar { - get { - return ResourceManager.GetString("Settings_ShowInTaskbar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Start minimized. - /// - public static string Settings_StartMinimized { - get { - return ResourceManager.GetString("Settings_StartMinimized", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bottom Left. - /// - public static string Settings_WindowPosition_Bottom_Left { - get { - return ResourceManager.GetString("Settings_WindowPosition_Bottom_Left", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bottom Right. - /// - public static string Settings_WindowPosition_Bottom_Right { - get { - return ResourceManager.GetString("Settings_WindowPosition_Bottom_Right", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Top Left. - /// - public static string Settings_WindowPosition_Top_Left { - get { - return ResourceManager.GetString("Settings_WindowPosition_Top_Left", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Top Right. - /// - public static string Settings_WindowPosition_Top_Right { - get { - return ResourceManager.GetString("Settings_WindowPosition_Top_Right", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to About. - /// - public static string SubMenu_About { - get { - return ResourceManager.GetString("SubMenu_About", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Exit. - /// - public static string SubMenu_Exit { - get { - return ResourceManager.GetString("SubMenu_Exit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hide. - /// - public static string SubMenu_Hide { - get { - return ResourceManager.GetString("SubMenu_Hide", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hotkeys. - /// - public static string SubMenu_Hotkeys { - get { - return ResourceManager.GetString("SubMenu_Hotkeys", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Language. - /// - public static string SubMenu_Language { - get { - return ResourceManager.GetString("SubMenu_Language", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Function. - /// - public static string SubMenu_NewFunction { - get { - return ResourceManager.GetString("SubMenu_NewFunction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Plugins. - /// - public static string SubMenu_Plugins { - get { - return ResourceManager.GetString("SubMenu_Plugins", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Report Bug. - /// - public static string SubMenu_ReportBug { - get { - return ResourceManager.GetString("SubMenu_ReportBug", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Settings. - /// - public static string SubMenu_Settings { - get { - return ResourceManager.GetString("SubMenu_Settings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hide the application. - /// - public static string Tooltip_Hide { - get { - return ResourceManager.GetString("Tooltip_Hide", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show the application. - /// - public static string Tooltip_Show { - get { - return ResourceManager.GetString("Tooltip_Show", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit function. - /// - public static string Window_EditFunction { - get { - return ResourceManager.GetString("Window_EditFunction", resourceCulture); - } - } - } -} From e43c34233429e33a505248a765041b0d8b3b27e5 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Sun, 21 Apr 2024 00:51:14 +0200 Subject: [PATCH 24/29] Extend readme --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 03538b47..724467d0 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,11 @@ Click [here][downloadPage] to get to the download section of this project on Git ## Found a bug or got a question? -Please head over to the [issue page][issuePage]. +Please head over to the [issue page][issuePage]. + +## Want to contribute? + +Either search for Tickets marked with help wanted or improve the translation on [crowdin] ## Plugins @@ -98,6 +102,7 @@ Technically the plugin will run with the user rights you did start the applicati [image-main-view-light]: https://i.imgur.com/lqmlo5U.png [downloadPage]: https://bitbucket.org/XanatosX/modulartoolmanager/downloads/ [issuePage]: https://bitbucket.org/XanatosX/modulartoolmanager/issues +[crowdin]: https://crowdin.com/project/modular-tool-manager [screenshot-1-dark]: https://imgur.com/mr3Folx.png [screenshot-1-light]: https://i.imgur.com/Fxgu18M.png [screenshot-2-dark]: https://i.imgur.com/LhMGcEx.png From 75dc0c642f2bfca2f9787bbd05bb55ba6abe9a1d Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:22:52 +0200 Subject: [PATCH 25/29] Fix file generation --- src/ModularToolManager/ModularToolManager.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 8aba27c3..6bf2f8dc 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -20,6 +20,7 @@ MSBuild:Compile + true Resources.Designer.cs $(IntermediateOutputPath)\Resources.Designer.cs CSharp From 725dd7b19e0bfe4fa56ff74a17b46eed42822984 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:25:45 +0200 Subject: [PATCH 26/29] Ignore designer.cs files --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 55b656d2..22d3a9c3 100644 --- a/.gitignore +++ b/.gitignore @@ -458,4 +458,6 @@ $RECYCLE.BIN/ ## Custom ### Packages -nupkg/* \ No newline at end of file +nupkg/* + +**/*.Designer.cs \ No newline at end of file From 0f48379d4e1b56e23757fb93449226ac37e6fbd5 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:25:55 +0200 Subject: [PATCH 27/29] Add build for properties --- src/ModularToolManager/ModularToolManager.csproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 6bf2f8dc..76585b6a 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -29,6 +29,18 @@ + + + MSBuild:Compile + true + Properties.Designer.cs + $(IntermediateOutputPath)\Properties.Designer.cs + CSharp + ModularToolManager.Properties + Resources + + + From 1a9730373b694f5433503bb655d5d1a42cc73585 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:26:18 +0200 Subject: [PATCH 28/29] Remove designer file --- .../Properties/Properties.Designer.cs | 198 ------------------ 1 file changed, 198 deletions(-) delete mode 100644 src/ModularToolManager/Properties/Properties.Designer.cs diff --git a/src/ModularToolManager/Properties/Properties.Designer.cs b/src/ModularToolManager/Properties/Properties.Designer.cs deleted file mode 100644 index 3b465487..00000000 --- a/src/ModularToolManager/Properties/Properties.Designer.cs +++ /dev/null @@ -1,198 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ModularToolManager.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Properties { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Properties() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModularToolManager.Properties.Properties", typeof(Properties).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Modular Tool Manager. - /// - internal static string ApplicationName { - get { - return ResourceManager.GetString("ApplicationName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to https://avaloniaui.net/. - /// - internal static string AvaloniaProjectUrl { - get { - return ResourceManager.GetString("AvaloniaProjectUrl", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to eng. - /// - internal static string FallbackLanguage { - get { - return ResourceManager.GetString("FallbackLanguage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to functions.dat. - /// - internal static string FunctionsFile { - get { - return ResourceManager.GetString("FunctionsFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to https://github.com/XanatosX/ModularToolManager/issues. - /// - internal static string GitHubIssueUrl { - get { - return ResourceManager.GetString("GitHubIssueUrl", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to https://github.com/XanatosX/ModularToolManager/. - /// - internal static string GitHubUrl { - get { - return ResourceManager.GetString("GitHubUrl", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to https://xanatosx.github.io/ModularToolManager/user/user-manual.html. - /// - internal static string GitHubUserManual { - get { - return ResourceManager.GetString("GitHubUserManual", resourceCulture); - } - } - - /// - /// 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. - /// - internal static string Icon_edit_function { - get { - return ResourceManager.GetString("Icon_edit_function", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to eye_hide_regular. - /// - internal static string Icon_hide { - get { - return ResourceManager.GetString("Icon_hide", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to keyboard_regular. - /// - internal static string Icon_Keyboard { - get { - return ResourceManager.GetString("Icon_Keyboard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to flag_regular. - /// - internal static string Icon_language { - get { - return ResourceManager.GetString("Icon_language", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to add_circle_regular. - /// - internal static string Icon_new_function { - get { - return ResourceManager.GetString("Icon_new_function", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to settings_regular. - /// - internal static string Icon_settings { - get { - return ResourceManager.GetString("Icon_settings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to settings.set. - /// - internal static string SettingsFile { - get { - return ResourceManager.GetString("SettingsFile", resourceCulture); - } - } - } -} From 1c9eec66b0a08fa37298954da3be90c4b66f4bf7 Mon Sep 17 00:00:00 2001 From: Xanatos <10531466+XanatosX@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:27:10 +0200 Subject: [PATCH 29/29] Fix properties build --- src/ModularToolManager/ModularToolManager.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ModularToolManager/ModularToolManager.csproj b/src/ModularToolManager/ModularToolManager.csproj index 76585b6a..a6022233 100644 --- a/src/ModularToolManager/ModularToolManager.csproj +++ b/src/ModularToolManager/ModularToolManager.csproj @@ -37,7 +37,7 @@ $(IntermediateOutputPath)\Properties.Designer.cs CSharp ModularToolManager.Properties - Resources + Properties