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.
Afficher le fichier Open project: Kapps/PoEWhisperNotifier Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
GetLastInputInfo ( LASTINPUTINFO &plii ) : bool
RunIdleLoop ( ) : void

Method Details

AddIdleAction() public static méthode

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
Résultat void

BeginMonitoring() public static méthode

Begins monitoring for any idle activity.
public static BeginMonitoring ( ) : void
Résultat void

StopMonitoring() public static méthode

Stops monitoring for idle activity.
public static StopMonitoring ( ) : void
Résultat void