mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
fix: 尝试修复检查更新弹窗炸了的问题
This commit is contained in:
@@ -2150,10 +2150,11 @@ namespace MeoAsstGui
|
||||
|
||||
// var backup = _language;
|
||||
ViewStatusStorage.Set("GUI.Localization", value);
|
||||
System.Windows.Forms.MessageBoxManager.Unregister();
|
||||
System.Windows.Forms.MessageBoxManager.Yes = Localization.GetString("Ok", value);
|
||||
System.Windows.Forms.MessageBoxManager.No = Localization.GetString("ManualRestart", value);
|
||||
System.Windows.Forms.MessageBoxManager.Register();
|
||||
var result = MessageBox.Show(
|
||||
var result = _windowManager.ShowMessageBox(
|
||||
Localization.GetString("LanguageChangedTip", value),
|
||||
Localization.GetString("Tip", value),
|
||||
MessageBoxButton.YesNo,
|
||||
|
||||
@@ -1201,30 +1201,6 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public void CheckAndShutdown()
|
||||
{
|
||||
if (Shutdown)
|
||||
{
|
||||
System.Diagnostics.Process.Start("shutdown.exe", "-s -t 60");
|
||||
|
||||
var result = _windowManager.ShowMessageBox("已刷完,即将关机,是否取消?", "提示", MessageBoxButton.OK, MessageBoxImage.Question);
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
System.Diagnostics.Process.Start("shutdown.exe", "-a");
|
||||
}
|
||||
}
|
||||
if (Hibernate)
|
||||
{
|
||||
System.Diagnostics.Process.Start("shutdown.exe", "-h");
|
||||
}
|
||||
if (Suspend)
|
||||
{
|
||||
System.Diagnostics.Process.Start("rundll32.exe", "powrprof.dll,SetSuspendState 0,1,0");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether it is initialized.
|
||||
/// </summary>
|
||||
|
||||
@@ -452,10 +452,11 @@ namespace MeoAsstGui
|
||||
|
||||
public void AskToRestart()
|
||||
{
|
||||
System.Windows.Forms.MessageBoxManager.Unregister();
|
||||
System.Windows.Forms.MessageBoxManager.Yes = Localization.GetString("Ok");
|
||||
System.Windows.Forms.MessageBoxManager.No = Localization.GetString("ManualRestart");
|
||||
System.Windows.Forms.MessageBoxManager.Register();
|
||||
var result = MessageBox.Show(
|
||||
var result = _windowManager.ShowMessageBox(
|
||||
Localization.GetString("NewVersionDownloadCompletedDesc"),
|
||||
Localization.GetString("NewVersionDownloadCompletedTitle"),
|
||||
MessageBoxButton.YesNo,
|
||||
|
||||
Reference in New Issue
Block a user