Compartilhar via


PowerManager.RemainingChargePercentChanged Evento

Definição

Gerado quando o percentual de carga restante da bateria no dispositivo for alterado.

// Register
static event_token RemainingChargePercentChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void RemainingChargePercentChanged(event_token const* cookie) const;

// Revoke with event_revoker
static PowerManager::RemainingChargePercentChanged_revoker RemainingChargePercentChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> RemainingChargePercentChanged;
function onRemainingChargePercentChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("remainingchargepercentchanged", onRemainingChargePercentChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("remainingchargepercentchanged", onRemainingChargePercentChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onremainingchargepercentchanged = onRemainingChargePercentChanged;
Public Shared Custom Event RemainingChargePercentChanged As EventHandler(Of Object) 

Tipo de evento

Comentários

Para obter o percentual de carga restante da bateria em resposta a esse evento, use a propriedade RemainingChargePercent. Esse evento corresponde ao GUID de configuração de energia GUID_BATTERY_PERCENTAGE_REMAINING.

Aplica-se a

Confira também