Ejemplo n.º 1
0
 internal static void SleepAwake(ASCommands cmd)
 {
     using (var r = IOKit.IORegistryEntryFromPath("IOService:/IOResources/IODisplayWrangler")) {
         IOKit.IORegistryEntrySetCFProperty(r, "IORequestIdle", cmd == ASCommands.Sleep);
     }
 }
Ejemplo n.º 2
0
 internal static void SleepAwake(ASCommands cmd)
 {
     using (var r = IOKit.IORegistryEntryFromPath("IOService:/IOResources/IODisplayWrangler")) {
         IOKit.IORegistryEntrySetCFProperty(r, "IORequestIdle", cmd == ASCommands.Sleep);
     }
 }