This commit is contained in:
2025-07-28 17:44:15 +08:00
parent 1b92ed66b7
commit f8e4732dcd
3 changed files with 16 additions and 11 deletions
@@ -1643,10 +1643,14 @@ namespace Ink_Canvas {
}
public void BtnRestart_Click(object sender, RoutedEventArgs e) {
Process.Start(System.Windows.Forms.Application.ExecutablePath, "-m");
App.IsAppExitByUser = true;
CloseIsFromButton = true;
Application.Current.Shutdown();
try {
Process.Start(System.Windows.Forms.Application.ExecutablePath, "-m");
App.IsAppExitByUser = true;
CloseIsFromButton = true;
Application.Current.Shutdown();
} catch (Exception ex) {
LogHelper.NewLog($"重启程序时出错: {ex.Message}");
}
}
private void SettingsOverlayClick(object sender, MouseButtonEventArgs e) {