mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
Merge branch 'dev' of https://github.com/MaaAssistantArknights/MaaAssistantArknights into dev
This commit is contained in:
@@ -153,7 +153,7 @@ namespace MeoAsstGui
|
||||
Execute.OnUIThread(() =>
|
||||
{
|
||||
_windowManager.ShowMessageBox("出现未知异常", "错误", icon: MessageBoxImage.Error);
|
||||
Environment.Exit(0);
|
||||
App.Current.Shutdown();
|
||||
});
|
||||
}
|
||||
var mainModel = _container.Get<TaskQueueViewModel>();
|
||||
@@ -217,7 +217,7 @@ namespace MeoAsstGui
|
||||
|
||||
case AsstMsg.InitFailed:
|
||||
_windowManager.ShowMessageBox("初始化错误!请检查是否使用了中文路径", "错误", icon: MessageBoxImage.Error);
|
||||
Environment.Exit(0);
|
||||
App.Current.Shutdown();
|
||||
break;
|
||||
|
||||
case AsstMsg.ConnectionInfo:
|
||||
|
||||
@@ -553,7 +553,7 @@ namespace MeoAsstGui
|
||||
{
|
||||
var fInfo = new FLASHWINFO();
|
||||
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
|
||||
fInfo.hwnd = hWnd != default ? hWnd : new WindowInteropHelper(Application.Current.MainWindow).Handle;
|
||||
fInfo.hwnd = hWnd != default ? hWnd : new WindowInteropHelper(App.Current.MainWindow).Handle;
|
||||
fInfo.dwFlags = (uint)type;
|
||||
fInfo.uCount = count;
|
||||
fInfo.dwTimeout = 0;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace MeoAsstGui
|
||||
|
||||
private void App_exit(object sender, EventArgs e)
|
||||
{
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
App.Current.Shutdown();
|
||||
}
|
||||
|
||||
private void App_show(object sender, EventArgs e)
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace MeoAsstGui
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
App.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -884,11 +884,9 @@ namespace MeoAsstGui
|
||||
break;
|
||||
|
||||
case ActionType.ExitSelf:
|
||||
if (new ToastNotification().CheckToastSystem())
|
||||
{
|
||||
ToastNotificationManagerCompat.History.Clear(); //exit似乎不会走bootstapper,单独清一下通知
|
||||
}
|
||||
Environment.Exit(0);
|
||||
// Shutdown 会调用 OnExit 但 Exit 不会
|
||||
App.Current.Shutdown();
|
||||
// Enviroment.Exit(0);
|
||||
break;
|
||||
|
||||
case ActionType.ExitEmulator:
|
||||
@@ -903,11 +901,9 @@ namespace MeoAsstGui
|
||||
{
|
||||
AddLog("模拟器关闭失败", "DarkRed");
|
||||
}
|
||||
if (new ToastNotification().CheckToastSystem())
|
||||
{
|
||||
ToastNotificationManagerCompat.History.Clear(); //exit似乎不会走bootstapper,单独清一下通知
|
||||
}
|
||||
Environment.Exit(0);
|
||||
// Shutdown 会调用 OnExit 但 Exit 不会
|
||||
App.Current.Shutdown();
|
||||
// Enviroment.Exit(0);
|
||||
break;
|
||||
|
||||
case ActionType.Shutdown:
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace MeoAsstGui
|
||||
newProcess.StartInfo.FileName = AppDomain.CurrentDomain.FriendlyName;
|
||||
newProcess.StartInfo.WorkingDirectory = Directory.GetCurrentDirectory();
|
||||
newProcess.Start();
|
||||
Application.Current.Shutdown();
|
||||
App.Current.Shutdown();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user