示例#1
0
        public void LockWorkstation()
        {
            if (DateTime.Now - _mouseService.LastDeviceActivityTime < _applicationConfiguration.CommandDelayInterval ||
                DateTime.Now - _keyboardService.LastDeviceActivityTime < _applicationConfiguration.CommandDelayInterval)
            {
                return;
            }

            _notificationService.CloseMessage();

            NativeMethodsHelper.LockWorkStation();
            _mediator.SendMessageAsync(this, ApplicationStateEvent.LockScreen);
        }
 public void LockWorkstation()
 {
     NativeMethodsHelper.LockWorkStation();
 }