mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Fix Wox restart
1. refactoring restart 2. delte some windows forms methods 3. using string inteperlation and delete hard coeded new line char should fix #322
This commit is contained in:
@@ -171,14 +171,8 @@ namespace Wox.Plugin.Sys
|
||||
IcoPath = "Images\\restart.png",
|
||||
Action = (c) =>
|
||||
{
|
||||
ProcessStartInfo Info = new ProcessStartInfo();
|
||||
Info.Arguments = "/C ping 127.0.0.1 -n 1 && \"" + FormsApplication.ExecutablePath + "\"";
|
||||
Info.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
Info.CreateNoWindow = true;
|
||||
Info.FileName = "cmd.exe";
|
||||
Process.Start(Info);
|
||||
context.API.CloseApp();
|
||||
return true;
|
||||
context.API.RestarApp();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
new Result
|
||||
|
||||
Reference in New Issue
Block a user