PowerManager.UserPresenceStatusChanged Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Déclenché lorsque l’état utilisateur associé à la session de l’application a changé.
// Register
static event_token UserPresenceStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void UserPresenceStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::UserPresenceStatusChanged_revoker UserPresenceStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> UserPresenceStatusChanged;
function onUserPresenceStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onuserpresencestatuschanged = onUserPresenceStatusChanged;
Public Shared Custom Event UserPresenceStatusChanged As EventHandler(Of Object)
Type d'événement
Remarques
Pour obtenir l’état utilisateur actuel en réponse à cet événement, utilisez la propriété UserPresenceStatus. Cet événement correspond au GUID de paramètre d’alimentation GUID_SESSION_USER_PRESENCE.