屏蔽待机功能

This commit is contained in:
cglcv
2022-06-19 22:56:48 +08:00
parent 5f95193551
commit d55f8a25a5

View File

@@ -110,7 +110,7 @@ namespace MeoAsstGui
new CombData { Display = "关闭模拟器", Value = "killemulator" },
new CombData { Display = "退出并关闭模拟器", Value = "exitwithkillemulator" },
new CombData{ Display="关机",Value="shutdown" },
new CombData { Display = "待机", Value = "suspend" },
//new CombData { Display = "待机", Value = "suspend" },
new CombData { Display = "休眠", Value = "hibernate" }
};
var temp_order_list = new List<DragItemViewModel>(new DragItemViewModel[task_list.Length]);
@@ -586,7 +586,9 @@ namespace MeoAsstGui
}
break;
case "suspend":
System.Diagnostics.Process.Start("powercfg", "-h off");
System.Diagnostics.Process.Start("rundll32.exe", "powrprof.dll,SetSuspendState 0,1,0");
System.Diagnostics.Process.Start("powercfg", "-h on");
break;
case "hibernate":
System.Diagnostics.Process.Start("shutdown.exe", "-h");