PowerManager.UserPresenceStatusChanged イベント
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アプリのセッションに関連付けられているユーザーの状態が変更されたときに発生します。
// Register
static event_token UserPresenceStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void UserPresenceStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::UserPresenceStatusChanged_revoker UserPresenceStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> UserPresenceStatusChanged;
function onUserPresenceStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onuserpresencestatuschanged = onUserPresenceStatusChanged;
Public Shared Custom Event UserPresenceStatusChanged As EventHandler(Of Object)
イベントの種類
注釈
このイベントに応答して現在のユーザー状態を取得するには、UserPresenceStatus プロパティを使用します。 このイベントは、GUID_SESSION_USER_PRESENCE電源設定 GUIDに対応します。
適用対象
こちらもご覧ください
- UserPresenceStatus
- UserPresenceStatus
- アプリ ライフサイクル API を使用して Power Management を
する