PowerManager.PowerSourceKindChanged Evento
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Generato quando la fonte di alimentazione del dispositivo è cambiata.
// Register
static event_token PowerSourceKindChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void PowerSourceKindChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::PowerSourceKindChanged_revoker PowerSourceKindChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> PowerSourceKindChanged;
function onPowerSourceKindChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("powersourcekindchanged", onPowerSourceKindChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("powersourcekindchanged", onPowerSourceKindChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onpowersourcekindchanged = onPowerSourceKindChanged;
Public Shared Custom Event PowerSourceKindChanged As EventHandler(Of Object)
Tipo evento
Commenti
Per ottenere la fonte di alimentazione corrente del dispositivo in risposta a questo evento, utilizzare la proprietà PowerSourceKind . Questo evento corrisponde al GUID dell'impostazione di alimentazioneGUID_ACDC_POWER_SOURCE.
Si applica a
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per