修复未完全关闭进程的bug

This commit is contained in:
liufei
2021-12-13 13:03:50 +08:00
parent f96a76e6fb
commit 3483bf88c2
3 changed files with 17 additions and 4 deletions

View File

@@ -426,6 +426,7 @@ namespace GeekDesk
/// <param name="e"></param>
private void ExitApp(object sender, RoutedEventArgs e)
{
MouseHookThread.Dispose();
Application.Current.Shutdown();
}
@@ -506,10 +507,13 @@ namespace GeekDesk
/// <param name="e"></param>
private void ReStartApp(object sender, RoutedEventArgs e)
{
MouseHookThread.Dispose();
Process p = new Process();
p.StartInfo.FileName = Constants.APP_DIR + Constants.MY_NAME + ".exe";
p.StartInfo.WorkingDirectory = Constants.APP_DIR;
p.Start();
Application.Current.Shutdown();
}