Example #1
0
 private void AllowMonitorPowerdown()
 {
     SafeNativeMethods.SetThreadExecutionState(SafeNativeMethods.EXECUTION_STATE.ES_CONTINUOUS);
 }
Example #2
0
 private void PreventMonitorPowerdown()
 {
     SafeNativeMethods.SetThreadExecutionState(SafeNativeMethods.EXECUTION_STATE.ES_DISPLAY_REQUIRED | SafeNativeMethods.EXECUTION_STATE.ES_CONTINUOUS);
 }