PowerManager.BatteryStatusChanged 이벤트

정의

장치의 배터리 상태 변경되었을 때 발생합니다.

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

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

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

이벤트 유형

설명

이 이벤트에 대한 응답으로 배터리의 현재 상태 얻으려면 BatteryStatus 속성을 사용합니다.

적용 대상

추가 정보