From 3210b1b14b07c4713aa8033a45c48f54706ea12a Mon Sep 17 00:00:00 2001 From: Mateusz Skoczek Date: Mon, 4 Mar 2024 02:00:50 +0100 Subject: [PATCH] settings - string resource init --- .../Strings/en-US/SettingsViewResources.resw | 123 ++++++++++++++++++ .../Settings/SettingsViewModel.cs | 5 +- .../Settings/SettingsView.xaml | 14 +- .../Settings/SettingsView.xaml.cs | 8 -- .../StringResourcesService.cs | 3 + 5 files changed, 140 insertions(+), 13 deletions(-) create mode 100644 VDownload.Core/VDownload.Core.Strings/Strings/en-US/SettingsViewResources.resw diff --git a/VDownload.Core/VDownload.Core.Strings/Strings/en-US/SettingsViewResources.resw b/VDownload.Core/VDownload.Core.Strings/Strings/en-US/SettingsViewResources.resw new file mode 100644 index 0000000..7773170 --- /dev/null +++ b/VDownload.Core/VDownload.Core.Strings/Strings/en-US/SettingsViewResources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Settings + + \ No newline at end of file diff --git a/VDownload.Core/VDownload.Core.ViewModels/Settings/SettingsViewModel.cs b/VDownload.Core/VDownload.Core.ViewModels/Settings/SettingsViewModel.cs index 3d57811..ab950b6 100644 --- a/VDownload.Core/VDownload.Core.ViewModels/Settings/SettingsViewModel.cs +++ b/VDownload.Core/VDownload.Core.ViewModels/Settings/SettingsViewModel.cs @@ -1,4 +1,5 @@ -using System; +using CommunityToolkit.Mvvm.ComponentModel; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +7,7 @@ using System.Threading.Tasks; namespace VDownload.Core.ViewModels.Settings { - public class SettingsViewModel + public class SettingsViewModel : ObservableObject { } } diff --git a/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml b/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml index 1b000e8..71c1613 100644 --- a/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml +++ b/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml @@ -7,9 +7,17 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - - + Background="{ThemeResource ViewBackgroundColor}"> + + + + + + diff --git a/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml.cs b/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml.cs index 9ad360f..5f5399f 100644 --- a/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml.cs +++ b/VDownload.Core/VDownload.Core.Views/Settings/SettingsView.xaml.cs @@ -5,14 +5,6 @@ namespace VDownload.Core.Views.Settings { public sealed partial class SettingsView : Page { - #region PROPERTIES - - public new SettingsViewModel DataContext { get; set; } - - #endregion - - - #region CONSTRUCTORS public SettingsView(SettingsViewModel viewModel) diff --git a/VDownload.Services/VDownload.Services.UI/VDownload.Services.UI.StringResources/StringResourcesService.cs b/VDownload.Services/VDownload.Services.UI/VDownload.Services.UI.StringResources/StringResourcesService.cs index 79d965f..c583cc2 100644 --- a/VDownload.Services/VDownload.Services.UI/VDownload.Services.UI.StringResources/StringResourcesService.cs +++ b/VDownload.Services/VDownload.Services.UI/VDownload.Services.UI.StringResources/StringResourcesService.cs @@ -15,6 +15,7 @@ namespace VDownload.Services.UI.StringResources StringResources SearchResources { get; } StringResources CommonResources { get; } StringResources DialogButtonsResources { get; } + StringResources SettingsViewResources { get; } } @@ -41,6 +42,7 @@ namespace VDownload.Services.UI.StringResources public StringResources SearchResources { get; protected set; } public StringResources CommonResources { get; protected set; } public StringResources DialogButtonsResources { get; protected set; } + public StringResources SettingsViewResources { get; protected set; } #endregion @@ -62,6 +64,7 @@ namespace VDownload.Services.UI.StringResources SearchResources = BuildResource("SearchResources"); CommonResources = BuildResource("CommonResources"); DialogButtonsResources = BuildResource("DialogButtonsResources"); + SettingsViewResources = BuildResource("SettingsViewResources"); } #endregion