void Update(object state) { this._batteryInfo = BatteryInfo.GetBatteryInformation(); if (this._last_batteryInfo.CurrentCapacity != this._batteryInfo.CurrentCapacity) { this._last_batteryInfo = this._batteryInfo; this.BatteryStatusUpdate?.Invoke(this, this._batteryInfo); } }
public BatteryStatus() { this._last_batteryInfo = new BatteryInformation(); }