From efb7170ae2dce86f785ea962ed088665b4a1ee83 Mon Sep 17 00:00:00 2001 From: RMBGAME Date: Mon, 22 May 2023 03:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20GameAccount=20Plugin=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/AssemblyInfo.Xaml.cs | 1 + .../UI/App.TrayIcon.cs | 3 +- .../UI/Styling/Controls/TabView.axaml | 1 - .../BD.WTTS.Client.Plugins.Accelerator.csproj | 11 ----- .../Properties/AssemblyInfo.Xaml.cs | 1 + .../UI/ViewModels/GameAccountPageViewModel.cs | 19 ++++++++- .../UI/Views/Controls/AccountItems.axaml | 2 +- .../UI/Views/GameAccountPage.axaml | 42 ++++++++++++------- .../UI/Views/GameAccountPage.axaml.cs | 1 + 9 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/BD.WTTS.Client.Avalonia/Properties/AssemblyInfo.Xaml.cs b/src/BD.WTTS.Client.Avalonia/Properties/AssemblyInfo.Xaml.cs index a3bba93a9..5d75be58a 100644 --- a/src/BD.WTTS.Client.Avalonia/Properties/AssemblyInfo.Xaml.cs +++ b/src/BD.WTTS.Client.Avalonia/Properties/AssemblyInfo.Xaml.cs @@ -7,6 +7,7 @@ [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Converters")] [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.UI.ViewModels")] [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Markup")] +[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Models")] [assembly: XmlnsDefinition("https://steampp.net/services", "BD.WTTS.Services")] // FluentAvaloniaUI diff --git a/src/BD.WTTS.Client.Avalonia/UI/App.TrayIcon.cs b/src/BD.WTTS.Client.Avalonia/UI/App.TrayIcon.cs index f6c2479f1..bfe375de0 100644 --- a/src/BD.WTTS.Client.Avalonia/UI/App.TrayIcon.cs +++ b/src/BD.WTTS.Client.Avalonia/UI/App.TrayIcon.cs @@ -1,3 +1,4 @@ +using BD.WTTS.Client.Resources; using static BD.WTTS.Services.INotificationService; namespace BD.WTTS.UI; @@ -38,7 +39,7 @@ partial class App new NativeMenuItemSeparator(), new NativeMenuItem { - Header = "Exit", + [!NativeMenuItem.HeaderProperty] = new Binding { Path = "Res.Exit", Source = ResourceService.Current, Mode = BindingMode.OneWay }, Command = ReactiveCommand.Create(() => { Shutdown(); }) } } diff --git a/src/BD.WTTS.Client.Avalonia/UI/Styling/Controls/TabView.axaml b/src/BD.WTTS.Client.Avalonia/UI/Styling/Controls/TabView.axaml index 98ba93199..c302699db 100644 --- a/src/BD.WTTS.Client.Avalonia/UI/Styling/Controls/TabView.axaml +++ b/src/BD.WTTS.Client.Avalonia/UI/Styling/Controls/TabView.axaml @@ -21,6 +21,5 @@ diff --git a/src/BD.WTTS.Client.Plugins.Accelerator/BD.WTTS.Client.Plugins.Accelerator.csproj b/src/BD.WTTS.Client.Plugins.Accelerator/BD.WTTS.Client.Plugins.Accelerator.csproj index e30041fba..eb29f0519 100644 --- a/src/BD.WTTS.Client.Plugins.Accelerator/BD.WTTS.Client.Plugins.Accelerator.csproj +++ b/src/BD.WTTS.Client.Plugins.Accelerator/BD.WTTS.Client.Plugins.Accelerator.csproj @@ -7,17 +7,6 @@ - - - - - - - - - - - diff --git a/src/BD.WTTS.Client.Plugins.GameAccount/Properties/AssemblyInfo.Xaml.cs b/src/BD.WTTS.Client.Plugins.GameAccount/Properties/AssemblyInfo.Xaml.cs index f21960408..54433e13d 100644 --- a/src/BD.WTTS.Client.Plugins.GameAccount/Properties/AssemblyInfo.Xaml.cs +++ b/src/BD.WTTS.Client.Plugins.GameAccount/Properties/AssemblyInfo.Xaml.cs @@ -9,4 +9,5 @@ using Avalonia.Metadata; [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Converters")] [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.UI.ViewModels")] [assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Markup")] +[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Models")] [assembly: XmlnsDefinition("https://steampp.net/services", "BD.WTTS.Services")] \ No newline at end of file diff --git a/src/BD.WTTS.Client.Plugins.GameAccount/UI/ViewModels/GameAccountPageViewModel.cs b/src/BD.WTTS.Client.Plugins.GameAccount/UI/ViewModels/GameAccountPageViewModel.cs index 0e8fb6a0d..1ffe5b990 100644 --- a/src/BD.WTTS.Client.Plugins.GameAccount/UI/ViewModels/GameAccountPageViewModel.cs +++ b/src/BD.WTTS.Client.Plugins.GameAccount/UI/ViewModels/GameAccountPageViewModel.cs @@ -6,6 +6,23 @@ public sealed partial class GameAccountPageViewModel { public GameAccountPageViewModel() { - + GamePlatforms = new ObservableCollection + { + new PlatformAccount + { + FullName = "Steam", + Icon = "Steam", + }, + new PlatformAccount + { + FullName = "Epic Games", + Icon = "EpicGames", + }, + new PlatformAccount + { + FullName = "Ubisoft", + Icon = "Ubisoft", + }, + }; } } diff --git a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/Controls/AccountItems.axaml b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/Controls/AccountItems.axaml index 7046b23af..5fc29cfe6 100644 --- a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/Controls/AccountItems.axaml +++ b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/Controls/AccountItems.axaml @@ -4,5 +4,5 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="BD.WTTS.UI.Views.AccountItems"> - Welcome to Avalonia! + Welcome to Avalonia! diff --git a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml index d6d98483a..2a980f57b 100644 --- a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml +++ b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml @@ -9,6 +9,7 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="BD.WTTS.UI.Views.GameAccountPage"> - - - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml.cs b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml.cs index 8d1697cfe..249bc27eb 100644 --- a/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml.cs +++ b/src/BD.WTTS.Client.Plugins.GameAccount/UI/Views/GameAccountPage.axaml.cs @@ -7,5 +7,6 @@ public partial class GameAccountPage : ReactiveUserControl