帐户切换功能进度推进

This commit is contained in:
rmbgame
2021-03-05 11:07:26 +08:00
parent b303f7dfa8
commit ea2b1941f6
7 changed files with 96 additions and 23 deletions
@@ -96,6 +96,15 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 制作人员名单 的本地化字符串。
/// </summary>
public static string About_ProductionStaff {
get {
return ResourceManager.GetString("About_ProductionStaff", resourceCulture);
}
}
/// <summary>
/// 查找类似 此软件 的本地化字符串。
/// </summary>
@@ -196,7 +205,7 @@ namespace System.Application.UI.Resx {
}
/// <summary>
/// 查找类似 自动挂卡 的本地化字符串。
/// 查找类似 自动集卡 的本地化字符串。
/// </summary>
public static string IdleCard {
get {
@@ -204,15 +213,6 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 语言 的本地化字符串。
/// </summary>
public static string Language {
get {
return ResourceManager.GetString("Language", resourceCulture);
}
}
/// <summary>
/// 查找类似 其它平台 的本地化字符串。
/// </summary>
@@ -249,6 +249,15 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 语言 的本地化字符串。
/// </summary>
public static string Settings_Language {
get {
return ResourceManager.GetString("Settings_Language", resourceCulture);
}
}
/// <summary>
/// 查找类似 主题 的本地化字符串。
/// </summary>
@@ -276,6 +285,15 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 以该账号登录Steam 的本地化字符串。
/// </summary>
public static string UserChange_BtnTootlip {
get {
return ResourceManager.GetString("UserChange_BtnTootlip", resourceCulture);
}
}
/// <summary>
/// 查找类似 账号切换 的本地化字符串。
/// </summary>
@@ -129,6 +129,9 @@
<data name="About_OpenSource" xml:space="preserve">
<value>开放源代码许可</value>
</data>
<data name="About_ProductionStaff" xml:space="preserve">
<value>制作人员名单</value>
</data>
<data name="About_ThisSoft" xml:space="preserve">
<value>此软件</value>
</data>
@@ -163,10 +166,7 @@
<value>写入 hosts 时发生错误</value>
</data>
<data name="IdleCard" xml:space="preserve">
<value>自动挂卡</value>
</data>
<data name="Language" xml:space="preserve">
<value>语言</value>
<value>自动集卡</value>
</data>
<data name="OtherGamePlaform" xml:space="preserve">
<value>其它平台</value>
@@ -180,6 +180,9 @@
<data name="Settings_General" xml:space="preserve">
<value>基本设置</value>
</data>
<data name="Settings_Language" xml:space="preserve">
<value>语言</value>
</data>
<data name="Settings_Theme" xml:space="preserve">
<value>主题</value>
</data>
@@ -189,6 +192,9 @@
<data name="SteamAuth" xml:space="preserve">
<value>本地令牌</value>
</data>
<data name="UserChange_BtnTootlip" xml:space="preserve">
<value>以该账号登录Steam</value>
</data>
<data name="UserFastChange" xml:space="preserve">
<value>账号切换</value>
</data>
@@ -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");
@@ -11,6 +11,9 @@ namespace System.Application.UI.ViewModels
{
public class SteamAccountPageViewModel : TabItemViewModel
{
readonly ISteamService steamService = DI.Get<ISteamService>();
readonly IHttpService httpService = DI.Get<IHttpService>();
readonly ISteamworksWebApiService webApiService = DI.Get<ISteamworksWebApiService>();
public override string Name
{
@@ -30,9 +33,6 @@ namespace System.Application.UI.ViewModels
internal async override Task Initialize()
{
ISteamService steamService = DI.Get<ISteamService>();
IHttpService httpService = DI.Get<IHttpService>();
ISteamworksWebApiService webApiService = DI.Get<ISteamworksWebApiService>();
SteamUsers = new ObservableCollection<SteamUser>(steamService.GetRememberUserList());
if (!SteamUsers.Any_Nullable())
@@ -58,5 +58,14 @@ namespace System.Application.UI.ViewModels
}
SteamUsers = new ObservableCollection<SteamUser>(users.OrderByDescending(o => o.RememberPassword).ThenByDescending(o => o.LastLoginTime).ToList());
}
public void SteamId_Click(string accountName)
{
//steamService.SetCurrentUser(accountName);
steamService.TryKillSteamProcess();
steamService.StartSteam();
}
}
}