PowerManager.SystemIdleStatusChanged イベント
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
システムがビジー状態のときに発生します。 これは、システムが近い将来アイドル状態に移行しないこと、および現在の時刻が、コンピューターがアイドル状態になるのを妨げるバックグラウンドまたはアイドル状態のタスクをコンポーネントが実行するのに適したタイミングであることを示します。
// Register
static event_token SystemIdleStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void SystemIdleStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::SystemIdleStatusChanged_revoker SystemIdleStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> SystemIdleStatusChanged;
function onSystemIdleStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("systemidlestatuschanged", onSystemIdleStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("systemidlestatuschanged", onSystemIdleStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onsystemidlestatuschanged = onSystemIdleStatusChanged;
Public Shared Custom Event SystemIdleStatusChanged As EventHandler(Of Object)
イベントの種類
注釈
システムがアイドル状態に移行できる場合、通知はありません。 アイドル状態のバックグラウンド タスク通知では、ユーザーがコンピューターに存在するかどうかは示されません。
このイベントは、GUID_IDLE_BACKGROUND_TASK電源設定 GUIDに対応します。
適用対象
こちらもご覧ください
- アプリ ライフサイクル API を使用して Power Management を
する