Example #1
0
 public static extern ExecutionState SetThreadExecutionState(PowerThreadRequirements state);
Example #2
0
        /// <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);
        }