public static UserIdleDetect StartDetection(int secondsForIdleIndication) { var idleDetect = new UserIdleDetect(); idleDetect.SetIdleIndicator(secondsForIdleIndication); return idleDetect; }
public static UserIdleDetect StartDetection(int secondsForIdleIndication) { var idleDetect = new UserIdleDetect(); idleDetect.SetIdleIndicator(secondsForIdleIndication); return(idleDetect); }
// contrutor public frmPrincipal() { InitializeComponent(); timerBloqueio.Enabled = true; var userIdleDetect = UserIdleDetect.StartDetection(10000); //10 segundos userIdleDetect.UserIdleDetected += userIdleDetect_UserIdleDetected; userIdleDetect.UserIdleInterrupted += userIdleDetect_UserIdleInterrupted; }