From 0404699b70cdd3c7be8e6aa620e8830fcdb4a4ff Mon Sep 17 00:00:00 2001 From: AlexanderDotH Date: Wed, 26 Apr 2023 15:21:24 +0200 Subject: [PATCH] Profile --- .../Settings/SettingsUserPageViewModel.cs | 26 ++++ .../Pages/Settings/SettingsUserPage.axaml | 134 ++++++++++++++++++ .../Pages/Settings/SettingsUserPage.axaml.cs | 18 +++ 3 files changed, 178 insertions(+) create mode 100644 OpenLyricsClient/Frontend/Models/Pages/Settings/SettingsUserPageViewModel.cs create mode 100644 OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml create mode 100644 OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml.cs diff --git a/OpenLyricsClient/Frontend/Models/Pages/Settings/SettingsUserPageViewModel.cs b/OpenLyricsClient/Frontend/Models/Pages/Settings/SettingsUserPageViewModel.cs new file mode 100644 index 0000000..49374bc --- /dev/null +++ b/OpenLyricsClient/Frontend/Models/Pages/Settings/SettingsUserPageViewModel.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Reactive; +using System.Runtime.CompilerServices; +using OpenLyricsClient.Backend; +using ReactiveUI; + +namespace OpenLyricsClient.Frontend.Models.Pages.Settings; + +public class SettingsUserPageViewModel : ViewModelBase, INotifyPropertyChanged +{ + public event PropertyChangedEventHandler? PropertyChanged; + + protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + protected bool SetField(ref T field, T value, [CallerMemberName] string? propertyName = null) + { + if (EqualityComparer.Default.Equals(field, value)) return false; + field = value; + OnPropertyChanged(propertyName); + return true; + } +} \ No newline at end of file diff --git a/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml b/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml new file mode 100644 index 0000000..f6ba3e7 --- /dev/null +++ b/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml.cs b/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml.cs new file mode 100644 index 0000000..55fc47b --- /dev/null +++ b/OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml.cs @@ -0,0 +1,18 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace OpenLyricsClient.Frontend.View.Pages.Settings; + +public partial class SettingsUserPage : UserControl +{ + public SettingsUserPage() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file