Table of Contents

Enum PowerState

Namespace
Sdl3Sharp.Utilities
Assembly
Sdl3Sharp.dll

Represents the system's power supply state or a battery state

public enum PowerState

Fields

Charged = 4

The PowerState for "the device is plugged in, and the battery is fully charged"

Charging = 3

The PowerState for "the device is plugged in, and is charging the battery"

Error = -1

A 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 = 2

The PowerState for "the device is plugged in, and no battery is available"

OnBattery = 1

The PowerState for "the device is running on battery, and is not plugged in"

Unknown = 0

A 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.