Class UserActivityMonitor
Implements the functionality for watcher of user activity. User is not active if it in given time interval don't move a mouse or type any key on keyboard. The extern timer can check if the user was active using the method WasUserActive().
Inheritance
System.Object
UserActivityMonitor
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation
Assembly: Sartorius.SAF.Presentation.Application.dll
Syntax
public class UserActivityMonitor
Constructors
View SourceUserActivityMonitor(TimeSpan)
Create a new instance of UserActivityMonitor class and initialize it.
Declaration
public UserActivityMonitor(TimeSpan timeIntervalToLocking)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeIntervalToLocking | A value that determinate the time interval in [min] after the user is not as 'active' marked |
Properties
View SourceTimerInterval
Gets the tick interval for timer. It is depended from the TimeIntervalToLocking.
Declaration
public TimeSpan TimerInterval { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan | A tick interval for timer in [ms]. |
Methods
View SourceResume()
Set the last key and current position of mouse.
Declaration
public void Resume()
WasUserActive()
Gets a value that indicating whether the user was active during the last lock time interval.
Declaration
public bool WasUserActive()
Returns
Type | Description |
---|---|
System.Boolean | True if the user was active otherwise False. |