PowerManager.EffectivePowerModeChanged É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 le mode d’alimentation effectif de l’appareil a changé.
// Register
static event_token EffectivePowerModeChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void EffectivePowerModeChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::EffectivePowerModeChanged_revoker EffectivePowerModeChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> EffectivePowerModeChanged;
function onEffectivePowerModeChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("effectivepowermodechanged", onEffectivePowerModeChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("effectivepowermodechanged", onEffectivePowerModeChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.oneffectivepowermodechanged = onEffectivePowerModeChanged;
Public Shared Custom Event EffectivePowerModeChanged As EventHandler(Of Object)
Type d'événement
Remarques
Pour obtenir le mode d’alimentation effectif actuel en réponse à cet événement, utilisez la propriété EffectivePowerMode .