PowerManager.EnergySaverStatusChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生 于 EnergySaverStatus 變更時。
// Register
static event_token EnergySaverStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void EnergySaverStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::EnergySaverStatusChanged_revoker EnergySaverStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> EnergySaverStatusChanged;
function onEnergySaverStatusChanged(eventArgs) { /* Your code */ }
Windows.System.Power.PowerManager.addEventListener("energysaverstatuschanged", onEnergySaverStatusChanged);
Windows.System.Power.PowerManager.removeEventListener("energysaverstatuschanged", onEnergySaverStatusChanged);
- or -
Windows.System.Power.PowerManager.onenergysaverstatuschanged = onEnergySaverStatusChanged;
Public Shared Custom Event EnergySaverStatusChanged As EventHandler(Of Object)