C# Class PoEWhisperNotifier.IdleManager

Manages actions and calculations for a user's idle status. A user is considered idle if they have not entered any input (in any application) for over a certain period of time.
显示文件 Open project: Kapps/PoEWhisperNotifier Class Usage Examples

Public Methods

Method Description
AddIdleAction ( System.Action Act ) : void

Calls the given action if the user does not enter any input (hence acknowledging the action) before being considered idle. For example, a user may wish to only be notified of PushBullet notifications when idle, however after leaving the computer they may receive a message prior to being considered idle, which would cause them to miss it. This method would invoke that notification if they go idle before acknowledging it (by providing any user input anywhere). If the user is currently idle, the action is invoked immediately.

BeginMonitoring ( ) : void

Begins monitoring for any idle activity.

StopMonitoring ( ) : void

Stops monitoring for idle activity.

Private Methods

Method Description
GetLastInputInfo ( LASTINPUTINFO &plii ) : bool
RunIdleLoop ( ) : void

Method Details

AddIdleAction() public static method

Calls the given action if the user does not enter any input (hence acknowledging the action) before being considered idle. For example, a user may wish to only be notified of PushBullet notifications when idle, however after leaving the computer they may receive a message prior to being considered idle, which would cause them to miss it. This method would invoke that notification if they go idle before acknowledging it (by providing any user input anywhere). If the user is currently idle, the action is invoked immediately.
public static AddIdleAction ( System.Action Act ) : void
Act System.Action
return void

BeginMonitoring() public static method

Begins monitoring for any idle activity.
public static BeginMonitoring ( ) : void
return void

StopMonitoring() public static method

Stops monitoring for idle activity.
public static StopMonitoring ( ) : void
return void