PowerBroadcastStatus 枚举

定义

指示系统的电源状态。Indicates the system's power status.

public enum class PowerBroadcastStatus
public enum PowerBroadcastStatus
type PowerBroadcastStatus = 
Public Enum PowerBroadcastStatus
继承
PowerBroadcastStatus

字段

BatteryLow 9

电池电量不足。Battery power is low.

OemEvent 11

发出 APM OEM 事件信号的高级电源管理 (APM) BIOS。An Advanced Power Management (APM) BIOS signaled an APM OEM event.

PowerStatusChange 10

检测到计算机电源状态的更改,如从电池电源切换到交流电源。A change in the power status of the computer is detected, such as a switch from battery power to A/C. 系统还会在剩余电池电量降至用户指定的阈值以下时或电池电量变化了指定的百分比时广播该事件。The system also broadcasts this event when remaining battery power slips below the threshold specified by the user or if the battery power changes by a specified percentage.

QuerySuspend 0

系统已请求挂起计算机的权限。The system has requested permission to suspend the computer. 授予权限的应用程序应在返回之前执行挂起准备。An application that grants permission should carry out preparations for the suspension before returning.

QuerySuspendFailed 2

拒绝授予系统挂起计算机的权限。The system was denied permission to suspend the computer. 当任何应用程序或驱动程序拒绝了上一个 QuerySuspend 状态时将广播该状态。This status is broadcast if any application or driver denied a previous QuerySuspend status.

ResumeAutomatic 18

计算机已自动唤醒来处理事件。The computer has woken up automatically to handle an event. 如果系统在广播 ResumeAutomatic 后检测到任何用户活动,则会广播 ResumeSuspend 事件,使应用程序知道他们可以恢复与用户的完全交互。If the system detects any user activity after broadcasting ResumeAutomatic, it broadcasts a ResumeSuspend event to let applications know they can resume full interaction with the user.

ResumeCritical 6

系统在电池故障引起的严重挂起之后已恢复操作。The system has resumed operation after a critical suspension caused by a failing battery. 由于在没有事先通知的情况下发生了严重暂停,因此当应用程序收到此事件时,以前可用的资源和数据可能不存在。Because a critical suspension occurs without prior notification, resources and data previously available may not be present when the application receives this event. 应用程序应尝试尽其所能地恢复其状态。The application should attempt to restore its state to the best of its ability.

ResumeSuspend 7

系统在挂起之后已恢复操作。The system has resumed operation after being suspended.

Suspend 4

计算机将要进入挂起状态。The computer is about to enter a suspended state. 该事件通常在所有应用程序和可安装驱动程序已对上一个 true 状态返回 QuerySuspend 后广播。This event is typically broadcast when all applications and installable drivers have returned true to a previous QuerySuspend state.

注解

PowerBroadcastStatusServiceBase类用来指示系统电源状态的更改。PowerBroadcastStatus is used by the ServiceBase class to indicate a change in the system's power status. 你可以将应用程序设计为对任何电源状态更改做出反应。You can design your application to react to any power status change.

适用于

另请参阅