diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/Settings/Settings_UI.axaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/Settings/Settings_UI.axaml index 91871fe01..7916d038c 100644 --- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/Settings/Settings_UI.axaml +++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/Settings/Settings_UI.axaml @@ -12,7 +12,7 @@ HorizontalAlignment="Stretch" Spacing="16"> - + @@ -24,7 +24,7 @@ - + Light Dark diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/SteamAccountPage.axaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/SteamAccountPage.axaml index 9da7dd1fa..a8df6f4df 100644 --- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/SteamAccountPage.axaml +++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Pages/SteamAccountPage.axaml @@ -7,6 +7,7 @@ xmlns:controls="clr-namespace:System.Application.UI.Views.Controls" xmlns:i="using:Avalonia.Xaml.Interactivity" xmlns:ia="using:Avalonia.Xaml.Interactions.Core" + x:Name="u" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="System.Application.UI.Views.Pages.SteamAccountPage"> @@ -21,16 +22,40 @@ - + - + + + + + + + + + - + + + + - + + + + + + + + + + diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Controls/Border.xaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Controls/Border.xaml index 04c7a08a9..a2aad8aff 100644 --- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Controls/Border.xaml +++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Controls/Border.xaml @@ -20,4 +20,15 @@ + + + + diff --git a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs index f4884e279..03fd76a36 100644 --- a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs +++ b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs @@ -96,6 +96,15 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 制作人员名单 的本地化字符串。 + /// + public static string About_ProductionStaff { + get { + return ResourceManager.GetString("About_ProductionStaff", resourceCulture); + } + } + /// /// 查找类似 此软件 的本地化字符串。 /// @@ -196,7 +205,7 @@ namespace System.Application.UI.Resx { } /// - /// 查找类似 自动挂卡 的本地化字符串。 + /// 查找类似 自动集卡 的本地化字符串。 /// public static string IdleCard { get { @@ -204,15 +213,6 @@ namespace System.Application.UI.Resx { } } - /// - /// 查找类似 语言 的本地化字符串。 - /// - public static string Language { - get { - return ResourceManager.GetString("Language", resourceCulture); - } - } - /// /// 查找类似 其它平台 的本地化字符串。 /// @@ -249,6 +249,15 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 语言 的本地化字符串。 + /// + public static string Settings_Language { + get { + return ResourceManager.GetString("Settings_Language", resourceCulture); + } + } + /// /// 查找类似 主题 的本地化字符串。 /// @@ -276,6 +285,15 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 以该账号登录Steam 的本地化字符串。 + /// + public static string UserChange_BtnTootlip { + get { + return ResourceManager.GetString("UserChange_BtnTootlip", resourceCulture); + } + } + /// /// 查找类似 账号切换 的本地化字符串。 /// diff --git a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx index 3dca9a0e8..c9761f6fa 100644 --- a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx +++ b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx @@ -129,6 +129,9 @@ 开放源代码许可 + + 制作人员名单 + 此软件 @@ -163,10 +166,7 @@ 写入 hosts 时发生错误 - 自动挂卡 - - - 语言 + 自动集卡 其它平台 @@ -180,6 +180,9 @@ 基本设置 + + 语言 + 主题 @@ -189,6 +192,9 @@ 本地令牌 + + 以该账号登录Steam + 账号切换 diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs index 65acbf5bd..81ec30657 100644 --- a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs +++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs @@ -72,6 +72,10 @@ namespace System.Application.UI.ViewModels this.SelectedItem = this.TabItems.First(); + if (ViewModelBase.IsInDesignMode) + { + return; + } Task.Run(Initialize).ContinueWith(s => { Log.Error(nameof(MainWindowViewModel), s.Exception, nameof(Initialize) + "Action Error"); diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs index 29969dcc6..c2bc3743b 100644 --- a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs +++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs @@ -11,6 +11,9 @@ namespace System.Application.UI.ViewModels { public class SteamAccountPageViewModel : TabItemViewModel { + readonly ISteamService steamService = DI.Get(); + readonly IHttpService httpService = DI.Get(); + readonly ISteamworksWebApiService webApiService = DI.Get(); public override string Name { @@ -30,9 +33,6 @@ namespace System.Application.UI.ViewModels internal async override Task Initialize() { - ISteamService steamService = DI.Get(); - IHttpService httpService = DI.Get(); - ISteamworksWebApiService webApiService = DI.Get(); SteamUsers = new ObservableCollection(steamService.GetRememberUserList()); if (!SteamUsers.Any_Nullable()) @@ -58,5 +58,14 @@ namespace System.Application.UI.ViewModels } SteamUsers = new ObservableCollection(users.OrderByDescending(o => o.RememberPassword).ThenByDescending(o => o.LastLoginTime).ToList()); } + + + public void SteamId_Click(string accountName) + { + //steamService.SetCurrentUser(accountName); + steamService.TryKillSteamProcess(); + steamService.StartSteam(); + } + } } \ No newline at end of file