소스 검색

Update Utilities.cs

deadmoon 3 년 전
부모
커밋
718d3fd19c
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      Optimizer/Utilities.cs

+ 12 - 0
Optimizer/Utilities.cs

@@ -242,6 +242,18 @@ namespace Optimizer
             Utilities.RunCommand("shutdown /r /t 0");
         }
 
+        internal static void DisableHibernation()
+        {
+            Utilities.RunCommand("powercfg -h off");
+            Utilities.RunCommand("powercfg -h off");
+        }
+
+        internal static void EnableHibernation()
+        {
+            Utilities.RunCommand("powercfg -h on");
+            Utilities.RunCommand("powercfg -h on");
+        }
+
         internal static void ActivateMainForm()
         {
             Program._MainForm.Activate();