ForegroundEnergyManager 類別

定義

提供應用程式前景能源使用量的相關資訊。

public ref class ForegroundEnergyManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ForegroundEnergyManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("Foreground Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
class ForegroundEnergyManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class ForegroundEnergyManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("Foreground Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
public static class ForegroundEnergyManager
Public Class ForegroundEnergyManager
繼承
Object Platform::Object IInspectable ForegroundEnergyManager
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

前景應用程式的能源使用量分類為下列其中一個預先定義的層級,從最低到最高的耗電量:LowUsageLevelNearMaxAcceptableUsageLevel、MaxAcceptableUsageLevelExcessiveUsageLevel

屬性

ExcessiveUsageLevel

取得過多的使用等級,以一般能源使用量的百分比表示。

LowUsageLevel

取得低使用量等級,以一般能源耗用量的百分比表示。

MaxAcceptableUsageLevel

取得可接受的使用量上限,以一般能源耗用量的百分比表示。

NearMaxAcceptableUsageLevel

取得近乎可接受的使用量等級,以一般能源使用量的百分比表示。

RecentEnergyUsage

取得目前 30 分鐘期間前景應用程式最接近的預先定義能源等級,等於LowUsageLevelNearMaxAcceptableUsageLevel、MaxAcceptableUsageLevelExcessiveUsageLevel

RecentEnergyUsageLevel

取得目前 30 分鐘期間前景應用程式最接近的預先定義能源等級,等於LowUsageLevelNearMaxAcceptableUsageLevel、MaxAcceptableUsageLevelExcessiveUsageLevel

事件

RecentEnergyUsageIncreased

發生于應用程式的前景能源使用量大幅增加時。

RecentEnergyUsageReturnedToLow

發生于應用程式能源使用量降低為低使用量等級時。

適用於