临时注释取消开发过程中的软件授权检测,需要配置文件中LicenseMode使用885

This commit is contained in:
QI Mingxuan
2026-06-04 16:24:05 +08:00
parent 0f4ceb8b3a
commit 80ef1df9da
+21 -22
View File
@@ -458,15 +458,15 @@ namespace XplorePlane
// 临时测试模式专属:订阅倒计时事件并提示 | Temporary test mode only: subscribe countdown events and notify
if (licenseService.LicenseMode == XP.Common.License.Enums.LicenseMode.TemporaryTest)
{
licenseService.TestModeWarning5Min += OnTestModeWarning5Min;
licenseService.TestModeWarning1Min += OnTestModeWarning1Min;
licenseService.TestModeTimeout += OnTestModeTimeout;
//licenseService.TestModeWarning5Min += OnTestModeWarning5Min;
//licenseService.TestModeWarning1Min += OnTestModeWarning1Min;
//licenseService.TestModeTimeout += OnTestModeTimeout;
MessageBox.Show(
"当前为临时测试模式,软件将在15分钟后自动关闭。\nCurrently in temporary test mode, the software will automatically shut down after 15 minutes.",
"临时测试模式 | Temporary Test Mode",
MessageBoxButton.OK,
MessageBoxImage.Information);
//MessageBox.Show(
// "当前为临时测试模式,软件将在15分钟后自动关闭。\nCurrently in temporary test mode, the software will automatically shut down after 15 minutes.",
// "临时测试模式 | Temporary Test Mode",
// MessageBoxButton.OK,
// MessageBoxImage.Information);
}
Log.Information("授权检查通过 | Authorization check passed, Mode={Mode}", licenseService.LicenseMode);
@@ -492,11 +492,11 @@ namespace XplorePlane
Application.Current.Dispatcher.Invoke(() =>
{
Log.Warning("临时测试模式剩余5分钟 | Temporary test mode: 5 minutes remaining");
//MessageBox.Show(
// "临时测试模式将在5分钟后到期,请尽快保存您的工作。\nTemporary test mode will expire in 5 minutes, please save your work.",
// "测试模式提醒 | Test Mode Reminder",
// MessageBoxButton.OK,
// MessageBoxImage.Information);
MessageBox.Show(
"临时测试模式将在5分钟后到期,请尽快保存您的工作。\nTemporary test mode will expire in 5 minutes, please save your work.",
"测试模式提醒 | Test Mode Reminder",
MessageBoxButton.OK,
MessageBoxImage.Information);
});
}
@@ -508,11 +508,11 @@ namespace XplorePlane
Application.Current.Dispatcher.Invoke(() =>
{
Log.Warning("临时测试模式剩余1分钟 | Temporary test mode: 1 minute remaining");
//MessageBox.Show(
// "临时测试模式将在1分钟后到期,软件即将关闭,请立即保存您的工作。\nTemporary test mode will expire in 1 minute, the software will shut down soon. Please save your work immediately.",
// "测试模式即将到期 | Test Mode Expiring",
// MessageBoxButton.OK,
// MessageBoxImage.Warning);
MessageBox.Show(
"临时测试模式将在1分钟后到期,软件即将关闭,请立即保存您的工作。\nTemporary test mode will expire in 1 minute, the software will shut down soon. Please save your work immediately.",
"测试模式即将到期 | Test Mode Expiring",
MessageBoxButton.OK,
MessageBoxImage.Warning);
});
}
@@ -523,10 +523,9 @@ namespace XplorePlane
{
Application.Current.Dispatcher.Invoke(() =>
{
Log.Warning("临时测试模式已超时,开发阶段不执行软件自动退出流程 | Temporary test mode timed out");
//Log.Warning("临时测试模式已超时,执行正常关闭流程 | Temporary test mode timed out, performing graceful shutdown");
// // 使用正常关闭流程,确保资源正确释放 | Use graceful shutdown to ensure proper resource release
// Application.Current.MainWindow?.Close();
Log.Warning("临时测试模式已超时,执行正常关闭流程 | Temporary test mode timed out, performing graceful shutdown");
// 使用正常关闭流程,确保资源正确释放 | Use graceful shutdown to ensure proper resource release
Application.Current.MainWindow?.Close();
});
}