Example #1
0
 void DeviceReconnectManager_DeviceDisconnected(object sender, IDevice device)
 {
     lock (_deviceListsLock)
     {
         if (_deviceReconnectManager.IsEnabled && CanLock(device))
         {
             WriteLine($"Going to lock the workstation by 'DeviceConnectionLost' reason. Vault ID: {device.Id}");
             WorkstationLocking?.Invoke(this, new WorkstationLockingEventArgs(device, WorkstationLockingReason.DeviceConnectionLost));
             _workstationLocker.LockWorkstation();
             device.SetUserProperty(PROX_LOCK_ENABLED_PROP, false);
         }
     }
 }
Example #2
0
 void ProximityMonitorManager_DeviceProximityTimeout(object sender, IDevice device)
 {
     lock (_deviceListsLock)
     {
         if (CanLock(device))
         {
             WriteLine($"Going to lock the workstation by 'DeviceProximityTimeout' reason. Vault ID: {device.Id}");
             WorkstationLocking?.Invoke(this, new WorkstationLockingEventArgs(device, WorkstationLockingReason.ProximityTimeout));
             _workstationLocker.LockWorkstation();
             device.SetUserProperty(PROX_LOCK_ENABLED_PROP, false);
         }
     }
 }