xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::power_status Class Reference
Inheritance diagram for xtd::forms::power_status:
xtd::object

Definition

Indicates current system power status information.

Header
#include <xtd/forms/power_status>
Namespace
xtd::forms
Library
xtd.forms
Remarks
The xtd::forms::power_status class represents information about the current AC line power status, battery charging status, and battery charge status.
This class is used by the xtd::forms::system_information::power_status property of the xtd::forms::system_information class to indicate current system power information.

Peorperties

xtd::forms::battery_charge_status battery_charge_status () const noexcept
 Gets the current battery charge status.
 
int32 battery_full_life_time () const noexcept
 Gets the reported full charge lifetime of the primary battery power source in seconds.
 
float battery_life_percent () const noexcept
 Gets the approximate amount of full battery charge remaining.
 
int32 battery_life_remaining () const noexcept
 Gets the approximate number of seconds of battery time remaining.
 
xtd::forms::power_line_status power_line_status () const noexcept
 Gets the current system power status.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Member Function Documentation

◆ battery_charge_status()

xtd::forms::battery_charge_status xtd::forms::power_status::battery_charge_status ( ) const
noexcept

Gets the current battery charge status.

Returns
One of the xtd::forms::battery_charge_status values indicating the current battery charge level or charging status.
Remarks
This property indicates the current battery charge level or battery charging status.

◆ battery_full_life_time()

int32 xtd::forms::power_status::battery_full_life_time ( ) const
noexcept

Gets the reported full charge lifetime of the primary battery power source in seconds.

Returns
The reported number of seconds of battery life available when the battery is fully charged, or -1 if the battery life is unknown.

◆ battery_life_percent()

float xtd::forms::power_status::battery_life_percent ( ) const
noexcept

Gets the approximate amount of full battery charge remaining.

Returns
The approximate amount, from 0.0 to 1.0, of full battery charge remaining.

◆ battery_life_remaining()

int32 xtd::forms::power_status::battery_life_remaining ( ) const
noexcept

Gets the approximate number of seconds of battery time remaining.

Returns
The approximate number of seconds of battery life remaining, or -1 if the approximate remaining battery life is unknown.

◆ power_line_status()

xtd::forms::power_line_status xtd::forms::power_status::power_line_status ( ) const
noexcept

Gets the current system power status.

Returns
One of the xtd::forms::power_line_status values indicating the current system power status.
Remarks
This property indicates whether the system power is online, or that the system power status is unknown.

The documentation for this class was generated from the following file: