improve:优化进程崩溃检测机制
This commit is contained in:
@@ -1577,8 +1577,10 @@ namespace Ink_Canvas {
|
||||
public static bool CloseIsFromButton = false;
|
||||
|
||||
public void BtnExit_Click(object sender, RoutedEventArgs e) {
|
||||
CloseIsFromButton = true;
|
||||
Close();
|
||||
App.IsAppExitByUser = true;
|
||||
Application.Current.Shutdown();
|
||||
// CloseIsFromButton = true;
|
||||
// Close();
|
||||
}
|
||||
|
||||
public void BtnRestart_Click(object sender, RoutedEventArgs e) {
|
||||
|
||||
@@ -54,7 +54,11 @@ namespace Ink_Canvas
|
||||
|
||||
private void CloseAppTrayIconMenuItem_Clicked(object sender, RoutedEventArgs e) {
|
||||
var mainWin = (MainWindow)Application.Current.MainWindow;
|
||||
if (mainWin.IsLoaded) mainWin.BtnExit_Click(null,null);
|
||||
if (mainWin.IsLoaded) {
|
||||
App.IsAppExitByUser = true;
|
||||
Application.Current.Shutdown();
|
||||
// mainWin.BtnExit_Click(null,null);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestartAppTrayIconMenuItem_Clicked(object sender, RoutedEventArgs e) {
|
||||
|
||||
Reference in New Issue
Block a user