PowerState 枚举


定义指示挂起系统电源活动模式的标识符。Defines identifiers that indicate a suspended system power activity mode.

public enum class PowerState
public enum PowerState
type PowerState = 
Public Enum PowerState


Hibernate 1

指示系统休眠电源模式。Indicates a system hibernation power mode. 当系统进入休眠时,内存中的内容将会在计算机关闭前存入磁盘。When a system enters hibernation, the contents of its memory are saved to disk before the computer is turned off. 在系统重新启动后,桌面以及以前的活动程序将会被恢复。When the system is restarted, the desktop and previously active programs are restored.

Suspend 0

指示系统挂起了电源模式。Indicates a system suspended power mode. 当系统被挂起时,计算机会切换到低功耗的待机状态。When a system is suspended, the computer switches to a low-power state called standby. 当系统处于待机模式时,一些设备将被关闭,计算机可消耗更少的功率。When a computer is in standby mode, some devices are turned off and the computer uses less power. 系统恢复的速度比从休眠状态中恢复更快。The system can restore itself more quickly than returning from hibernation. 因为待机时内存数据不存入磁盘,所以待机时的电源故障会导致信息丢失。Because standby does not save the memory state to disk, a power failure while in standby can cause loss of information.


此枚举由SetSuspendState Application类的方法使用。This enumeration is used by the SetSuspendState method of the Application class.