PowerManager 클래스

정의

현재 전원 상태 정보에 대한 액세스를 제공하는 디바이스 전원 상태 및 정적 속성에 대한 변경 내용을 앱에 알리는 정적 이벤트를 제공합니다.

public ref class PowerManager abstract sealed
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class PowerManager final
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.System.Power.PowerNotificationsContract, 65536)]
class PowerManager final
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public static class PowerManager
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.System.Power.PowerNotificationsContract), 65536)]
public static class PowerManager
Public Class PowerManager
상속
Object Platform::Object IInspectable PowerManager
특성

예제

이 클래스를 사용하는 방법을 입증하는 코드 예제는 앱 수명 주기 API를 사용한 전원 관리를 참조하세요.

설명

이 클래스를 사용하는 방법에 대한 자세한 내용은 앱 수명 주기 API를 사용한 전원 관리를 참조하세요.

속성

BatteryStatus

디바이스에서 배터리의 현재 상태 가져옵니다.

DisplayStatus

앱 세션과 연결된 디스플레이의 현재 상태 가져옵니다.

EffectivePowerMode

디바이스의 현재 유효 전원 모드를 가져옵니다.

EffectivePowerMode2

디바이스의 현재 유효 전원 모드를 가져옵니다.

EnergySaverStatus

디바이스의 배터리 절약 모드의 현재 상태를 가져옵니다.

PowerSourceKind

디바이스의 현재 전원을 가져옵니다.

PowerSupplyStatus

디바이스의 현재 전원 공급 장치 상태 가져옵니다.

RemainingChargePercent

디바이스에서 배터리의 남은 충전 비율을 가져옵니다.

RemainingDischargeTime

디바이스에서 배터리의 남은 방전 시간을 가져옵니다.

SystemSuspendStatus

디바이스의 현재 일시 중단 상태 가져옵니다.

UserPresenceStatus

앱 세션과 연결된 현재 사용자 상태 가져옵니다.

이벤트

BatteryStatusChanged

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

DisplayStatusChanged

앱 세션과 연결된 디스플레이의 상태 변경되었을 때 발생합니다.

EffectivePowerModeChanged

디바이스의 유효 전원 모드가 변경되었을 때 발생합니다.

EnergySaverStatusChanged

전원 상태 변화에 대응하여 배터리 절약 모드가 꺼져 있거나 켜져 있을 때 발생합니다.

PowerSourceKindChanged

디바이스의 전원이 변경되었을 때 발생합니다.

PowerSupplyStatusChanged

디바이스의 전원 공급 장치 상태 변경되었을 때 발생합니다.

RemainingChargePercentChanged

장치의 배터리 잔여 충전 비율이 변경되었을 때 발생합니다.

RemainingDischargeTimeChanged

디바이스에서 배터리의 남은 방전 시간이 변경되었을 때 발생합니다.

SystemIdleStatusChanged

시스템이 사용 중일 때 발생합니다. 이는 시스템이 가까운 장래에 유휴 상태로 전환되지 않으며, 현재 시간이 컴퓨터가 유휴 상태로 전환되지 않도록 하는 백그라운드 또는 유휴 작업을 구성 요소에서 수행하기에 좋은 시간임을 나타냅니다.

SystemSuspendStatusChanged

디바이스의 일시 중단 상태 변경되었을 때 발생합니다.

UserPresenceStatusChanged

앱 세션과 연결된 사용자 상태 변경되었을 때 발생합니다.

적용 대상

추가 정보