From c62bb69fceb8784f1dfc7d0c4c26242fa9f2ead3 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Tue, 9 Sep 2025 18:59:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20cdk=20=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=B6=85=E8=BF=87=202038=20=E5=B9=B4=E4=BC=9A?= =?UTF-8?q?=E7=88=86=E7=82=B8=EF=BC=88=E4=BD=86=2010000=20=E5=B9=B4?= =?UTF-8?q?=E8=BF=98=E6=98=AF=E4=BC=9A=E7=88=86=E7=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Helper/ConfigurationHelper.cs | 12 ++++++++++++ .../VersionUpdateSettingsUserControlModel.cs | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/MaaWpfGui/Helper/ConfigurationHelper.cs b/src/MaaWpfGui/Helper/ConfigurationHelper.cs index c11812ff70..fd29c4d25c 100644 --- a/src/MaaWpfGui/Helper/ConfigurationHelper.cs +++ b/src/MaaWpfGui/Helper/ConfigurationHelper.cs @@ -79,6 +79,12 @@ namespace MaaWpfGui.Helper return int.TryParse(value, out var result) ? result : defaultValue; } + public static long GetValue(string key, long defaultValue) + { + var value = GetValue(key, defaultValue.ToString()); + return long.TryParse(value, out var result) ? result : defaultValue; + } + public static bool GetValue(string key, bool defaultValue) { var value = GetValue(key, defaultValue.ToString()); @@ -122,6 +128,12 @@ namespace MaaWpfGui.Helper return int.TryParse(value, out var result) ? result : defaultValue; } + public static long GetGlobalValue(string key, long defaultValue) + { + var value = GetGlobalValue(key, defaultValue.ToString()); + return long.TryParse(value, out var result) ? result : defaultValue; + } + public static bool GetGlobalValue(string key, bool defaultValue) { var value = GetGlobalValue(key, defaultValue.ToString()); diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs index 30c844b9a5..f66b6a798a 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs @@ -323,9 +323,9 @@ public class VersionUpdateSettingsUserControlModel : PropertyChangedBase } // 时间戳 - private int _mirrorChyanCdkExpiredTime = ConfigurationHelper.GetGlobalValue(ConfigurationKeys.MirrorChyanCdkExpiredTime, 0); + private long _mirrorChyanCdkExpiredTime = ConfigurationHelper.GetGlobalValue(ConfigurationKeys.MirrorChyanCdkExpiredTime, 0L); - public int MirrorChyanCdkExpiredTime + public long MirrorChyanCdkExpiredTime { get => _mirrorChyanCdkExpiredTime; set