PowerManager.RemainingDischargeTimeChanged 事件

定义

当设备上电池的剩余放电时间更改时引发。

// Register
static event_token RemainingDischargeTimeChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void RemainingDischargeTimeChanged(event_token const* cookie) const;

// Revoke with event_revoker
static PowerManager::RemainingDischargeTimeChanged_revoker RemainingDischargeTimeChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> RemainingDischargeTimeChanged;
function onRemainingDischargeTimeChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("remainingdischargetimechanged", onRemainingDischargeTimeChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("remainingdischargetimechanged", onRemainingDischargeTimeChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onremainingdischargetimechanged = onRemainingDischargeTimeChanged;
Public Shared Custom Event RemainingDischargeTimeChanged As EventHandler(Of Object) 

事件类型

注解

若要获取电池的剩余放电时间以响应此事件,请使用 RemainingDischargeTime 属性。

适用于

另请参阅