Enum PowerState
Represents the system's power supply state or a battery state
public enum PowerState
Fields
Charged = 4The PowerState for "the device is plugged in, and the battery is fully charged"
Charging = 3The PowerState for "the device is plugged in, and is charging the battery"
Error = -1A representative for an erroneous PowerState
If the resulting value of a call to GetInfo(out int, out int) is equal to the value of this property, it means that determining the power state failed. You can check TryGet(out string?) for more information.
NoBattery = 2The PowerState for "the device is plugged in, and no battery is available"
OnBattery = 1The PowerState for "the device is running on battery, and is not plugged in"
Unknown = 0A representative for an unknown PowerState
If the resulting value of a call to GetInfo(out int, out int) is equal to the value of this property, it means that the power state couldn't be determined.