public static extern ExecutionState SetThreadExecutionState(PowerThreadRequirements state);
/// <summary>Set the power requirements for the current application, e.g. Hold display and system from suspend.</summary> /// <param name="threadReq">Flag stating suspend mode, or release.</param> public void SetPowerReq(PowerThreadRequirements threadReq) { if (Bootstrapper.GetInstance<IBrowserConfiguration>().Config.DisablePowerManagement) { return; } // Set application power requirments NativeMethods.SetThreadExecutionState(threadReq); }