Replace hiberate with PInvoke

This commit is contained in:
Jack251970 2025-02-18 11:17:45 +08:00
parent a065179d53
commit 3bd4ca4105

View file

@ -269,12 +269,7 @@ namespace Flow.Launcher.Plugin.Sys
IcoPath = "Images\\hibernate.png",
Action= c =>
{
var info = ShellCommand.SetProcessStartInfo("shutdown", arguments:"/h");
info.WindowStyle = ProcessWindowStyle.Hidden;
info.UseShellExecute = true;
ShellCommand.Execute(info);
PInvoke.SetSuspendState(true, false, false);
return true;
}
},