private void pb_BatteryStatusChanged(object sender, BatteryStatusEventArgs e) { int id = BatteryStatusChangedEventId + e.BatteryPercentageRemaining; string msg = "The remaining battery capacity has changed: " + e.BatteryPercentageRemaining + "%"; WriteLogEntry(msg, id); }
public void OnBatteryStatusChanged(object sender, BatteryStatusEventArgs e) { BatteryStatus = e.BatteryStatus; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("BatteryStatus")); }