fix:进程崩溃判定错误 improve:重新配置了自动更新

This commit is contained in:
CJK_mkp
2025-06-18 18:16:48 +08:00
parent 10629b253c
commit e7c723de46
9 changed files with 1125 additions and 119 deletions
+15 -1
View File
@@ -65,8 +65,22 @@ namespace Ink_Canvas
var mainWin = (MainWindow)Application.Current.MainWindow;
if (mainWin.IsLoaded) {
App.IsAppExitByUser = true;
try {
// 启动新实例
string exePath = Process.GetCurrentProcess().MainModule.FileName;
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = exePath;
startInfo.UseShellExecute = true;
// 启动进程但不等待
Process.Start(startInfo);
} catch (Exception ex) {
LogHelper.NewLog($"重启程序时出错: {ex.Message}");
}
// 退出当前实例
Application.Current.Shutdown();
// mainWin.BtnExit_Click(null,null);
}
}