public CheckRecentChargePageViewModel(params MonthCharge[] mcs) { foreach (MonthCharge mc in mcs) { ChargeData.Add(mc); } }
/// <summary> /// Gets the aggregate battery status /// </summary> private void GetAggregateBatteryStatus(BatteryReport report) { // Check if the aggregate report object is null if (report == null) { return; } // Set properties DesignCap = report.DesignCapacityInMilliwattHours; FullChargeCap = report.FullChargeCapacityInMilliwattHours; RemainingCap = report.RemainingCapacityInMilliwattHours; ChargeRate = report.ChargeRateInMilliwatts; BatteryStatus = report.Status; // Add to charge data ChargeData.Add(new ChargeDetail() { Time = DateTime.Now, Value = report.ChargeRateInMilliwatts }); }