PowerManager.PowerSourceKindChanged イベント
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
デバイスの電源が変更されたときに発生します。
// 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)
イベントの種類
注釈
このイベントに応答してデバイスの現在の電源を取得するには、PowerSourceKind プロパティを使用します。 このイベントは、GUID_ACDC_POWER_SOURCE電源設定 GUIDに対応します。
適用対象
こちらもご覧ください
- PowerSourceKind
- PowerSourceKind
- アプリ ライフサイクル API を使用して Power Management を
する