C# Class Hourglass.Managers.KeepAwakeManager

Manages the thread-state of the main user interface thread to keep the computer from sleeping while a timer is running in any window.
Inheritance: Hourglass.Managers.Manager
显示文件 Open project: Dziemborowicz/Hourglass

Public Properties

Property Type Description
Instance KeepAwakeManager

Public Methods

Method Description
StartKeepAwakeFor ( object obj ) : void

Adds the specified object to the set of objects that require that the system be kept awake and starts keeping the system awake if it was not already being kept awake.

StopKeepAwakeFor ( object obj ) : void

Removes the specified object from the set of objects that require that the system be kept awake and stops keeping the system awake if it was being kept awake.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the manager.

Private Methods

Method Description
KeepAwakeManager ( ) : System.Collections.Generic

Prevents a default instance of the KeepAwakeManager class from being created.

StartKeepAwake ( ) : void

Start keeping the system awake. If the system is already being kept awake, this method does nothing.

StopKeepAwake ( ) : void

Stops keeping the system awake. If the system is not being kept awake, this method does nothing.

UpdateKeepAwake ( ) : void

Starts or stops keeping the system awake as required.

Method Details

Dispose() protected method

Disposes the manager.
protected Dispose ( bool disposing ) : void
disposing bool A value indicating whether this method was invoked by an explicit call to .
return void

StartKeepAwakeFor() public method

Adds the specified object to the set of objects that require that the system be kept awake and starts keeping the system awake if it was not already being kept awake.
public StartKeepAwakeFor ( object obj ) : void
obj object An .
return void

StopKeepAwakeFor() public method

Removes the specified object from the set of objects that require that the system be kept awake and stops keeping the system awake if it was being kept awake.
public StopKeepAwakeFor ( object obj ) : void
obj object An .
return void

Property Details

Instance public_oe static_oe property

Singleton instance of the KeepAwakeManager class.
public static KeepAwakeManager,Hourglass.Managers Instance
return KeepAwakeManager