From d3bc8dbd339fa5f2568be91c623c8e35705dbb39 Mon Sep 17 00:00:00 2001 From: rmbgame Date: Tue, 15 Dec 2020 12:39:30 +0800 Subject: [PATCH] bug fix --- SteamTool.Core/SteamToolService.cs | 6 ++-- SteamTools/App.xaml.cs | 5 ++- SteamTools/Properties/AssemblyInfo.cs | Bin 1528 -> 2110 bytes SteamTools/Services/ProxyService.cs | 20 ++++++------ SteamTools/Services/SteamConnectService.cs | 6 ++++ SteamTools/SteamTools.csproj | 6 ++-- .../Page/CommunityProxyPageViewModel.cs | 3 +- .../Page/SteamAccountPageViewModel.cs | 11 +++++-- .../Views/Content/About/AboutDonate.xaml | 7 ++-- SteamTools/Views/Controls/StatusBar.xaml | 15 ++------- .../Views/Pages/CommunityProxyPage.xaml | 6 ++++ SteamTools/Views/Pages/WelcomePage.xaml | 30 ++++++++---------- SteamTools/Views/Window/AddAuthWindow.xaml | 15 ++++----- 13 files changed, 68 insertions(+), 62 deletions(-) diff --git a/SteamTool.Core/SteamToolService.cs b/SteamTool.Core/SteamToolService.cs index 90adbd4a7..165a98a5b 100644 --- a/SteamTool.Core/SteamToolService.cs +++ b/SteamTool.Core/SteamToolService.cs @@ -43,8 +43,8 @@ namespace SteamTool.Core { var steamExePath = registryKeyService.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamExe"); var steamPath = registryKeyService.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamPath"); - steamExePath = Path.GetFullPath(steamExePath); - steamPath = Path.GetFullPath(steamPath); + //steamExePath = Path.GetFullPath(steamExePath); + //steamPath = Path.GetFullPath(steamPath); if (File.Exists(steamExePath)) { SteamExePath = steamExePath; @@ -91,7 +91,7 @@ namespace SteamTool.Core public List GetAllUser() { var users = new List(); - if (SteamPath != null) + if (File.Exists(SteamPath + UserVdfPath)) { var v = vdfService.GetVdfModelByPath(SteamPath + UserVdfPath); diff --git a/SteamTools/App.xaml.cs b/SteamTools/App.xaml.cs index 05eaf542a..27ac3c153 100644 --- a/SteamTools/App.xaml.cs +++ b/SteamTools/App.xaml.cs @@ -68,12 +68,11 @@ namespace SteamTools } Logger.EnableTextLog = true; #endif - + this.DispatcherUnhandledException += App_DispatcherUnhandledException; + DispatcherHelper.UIDispatcher = this.Dispatcher; if (e.Args.ContainsArg("-log")) { Logger.EnableTextLog = true; - this.DispatcherUnhandledException += App_DispatcherUnhandledException; - DispatcherHelper.UIDispatcher = this.Dispatcher; } if (e.Args.ContainsArg("-safe")) { diff --git a/SteamTools/Properties/AssemblyInfo.cs b/SteamTools/Properties/AssemblyInfo.cs index 8772d9bf7ce0cf2333ad023f3edfe708424a884f..55c7cab63d7fee0bebb81c6174e80bde6aa09b96 100644 GIT binary patch delta 579 zcmaKp%}T>S6h=RhZWO_tOG8(R#5QfE)}2&wt0;nqLeq>j(3+CeMM3ZpM0|=a1XqF^ zpUb5uL!delxlHEf{+#*d&e!ti>f1wQv8LL~V`Z(guM9I9Db!F?ohjA?&uBwco#Gqy z$Zla(ZR$!ZT2j${;&vZUovE)B%9!3*iSGU&d7P7AL#j*ELzmj6as;mjYien!)jP1t zjJAmzPAieRF6kI$i6Y&japLIuN0D(kxuP*z@_P<+Td>MePcwOHsIEY}cz*GhM?57@ z9~TSPv+VuSDt~@mH%CZ|5tt7@RFiA9XpGe1>+1$o8}o@q@9LlqHXQ4 e_vsF>`B;8D-JW};bE;FGWBz0TgRR^3oA3=gWn<+4 delta 101 zcmdld@Pm6p4eP{BQjjXAa~U0O?d9odSeP44MqF47?0nU{"steamcdn-a.akamaihd.net" }, - ToDomain = "steamstore-a.akamaihd.net", - Hosts = new List{ "steamcdn-a.akamaihd.net"}, - DomainTag = DomainTag.SteamImage, - IsEnable= false, - }, + //new ProxyDomainModel{ + // Index=2, + // Name=Resources.SteamImage, + // Domains = new List{"steamcdn-a.akamaihd.net" }, + // ToDomain = "steamuserimages-a.akamaihd.net", + // Hosts = new List{ "steamcdn-a.akamaihd.net"}, + // DomainTag = DomainTag.SteamImage, + // IsEnable= false, + //}, new ProxyDomainModel{ Index=3, Name=Resources.SteamChat, Domains = new List{"steam-chat.com" }, - ToDomain = "steamstore-a.akamaihd.net", + ToDomain = "s.team", Hosts = new List{ "steam-chat.com"}, DomainTag = DomainTag.SteamChat, IsEnable= false, diff --git a/SteamTools/Services/SteamConnectService.cs b/SteamTools/Services/SteamConnectService.cs index c51f5547e..0897df295 100644 --- a/SteamTools/Services/SteamConnectService.cs +++ b/SteamTools/Services/SteamConnectService.cs @@ -106,6 +106,12 @@ namespace SteamTools.Services if (IsConnectToSteam) { var id = ApiService.GetSteamId64(); + if (id == 76561197960265728) + { + //该64位id的steamID3等于0,是steam未获取到当前登录用户的默认返回值,所以直接重新获取 + IsConnectToSteam = false; + continue; + } CurrentSteamUser = await steamDbApiService.GetUserInfo(id); var mainViewModel = (WindowService.Current.MainWindow as MainWindowViewModel); mainViewModel.SteamAppPage.Initialize(); diff --git a/SteamTools/SteamTools.csproj b/SteamTools/SteamTools.csproj index 33bcbf823..14853d148 100644 --- a/SteamTools/SteamTools.csproj +++ b/SteamTools/SteamTools.csproj @@ -35,6 +35,8 @@ AnyCPU;x86 SteamTools + + @@ -316,9 +318,7 @@ ..\Lib\MetroTrilithon.Desktop.dll - - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Windows.Forms.dll - + diff --git a/SteamTools/ViewModels/Page/CommunityProxyPageViewModel.cs b/SteamTools/ViewModels/Page/CommunityProxyPageViewModel.cs index 236ed91af..7b467d574 100644 --- a/SteamTools/ViewModels/Page/CommunityProxyPageViewModel.cs +++ b/SteamTools/ViewModels/Page/CommunityProxyPageViewModel.cs @@ -88,7 +88,8 @@ namespace SteamTools.ViewModels if (ProxySettings.SupportProxyServicesStatus.Value.ContainsKey(proxyDomain.Index)) { dic.Remove(proxyDomain.Index); - dic.Add(proxyDomain.Index, proxyDomain.IsEnable); + if (proxyDomain.IsEnable) + dic.Add(proxyDomain.Index, proxyDomain.IsEnable); } else { diff --git a/SteamTools/ViewModels/Page/SteamAccountPageViewModel.cs b/SteamTools/ViewModels/Page/SteamAccountPageViewModel.cs index 0d3c85369..27d5dfbc5 100644 --- a/SteamTools/ViewModels/Page/SteamAccountPageViewModel.cs +++ b/SteamTools/ViewModels/Page/SteamAccountPageViewModel.cs @@ -62,8 +62,15 @@ namespace SteamTools.ViewModels users[i].Timestamp = temp.Timestamp; users[i].LastLoginTime = temp.LastLoginTime; } - SteamUsers = users.OrderByDescending(o=>o.MostRecent).ThenByDescending(o=>o.RememberPassword).ThenByDescending(o=>o.LastLoginTime).ToList(); - StatusService.Current.Notify("加载本地Steam用户数据完成"); + if (SteamUsers.Count > 0) + { + SteamUsers = users.OrderByDescending(o => o.MostRecent).ThenByDescending(o => o.RememberPassword).ThenByDescending(o => o.LastLoginTime).ToList(); + StatusService.Current.Notify("加载本地Steam用户数据完成"); + } + else + { + StatusService.Current.Notify("没有检测到Steam用户数据"); + } }).ContinueWith(s => s.Dispose()); } diff --git a/SteamTools/Views/Content/About/AboutDonate.xaml b/SteamTools/Views/Content/About/AboutDonate.xaml index 503b8ee36..06b5facd7 100644 --- a/SteamTools/Views/Content/About/AboutDonate.xaml +++ b/SteamTools/Views/Content/About/AboutDonate.xaml @@ -35,7 +35,7 @@ TextAlignment="Left" MaxPageWidth="900"> - + @@ -51,11 +51,12 @@ - + + - + diff --git a/SteamTools/Views/Controls/StatusBar.xaml b/SteamTools/Views/Controls/StatusBar.xaml index 65b47262e..2ab11ddeb 100644 --- a/SteamTools/Views/Controls/StatusBar.xaml +++ b/SteamTools/Views/Controls/StatusBar.xaml @@ -44,19 +44,8 @@ Value="Center" /> - - - - + + + + - + + + + + + + + + - - + + - + - + - - - - - - - - - - - + - +