public FillupView(Fillup Single) { ItemBackground = null; ID = Single.ID; Miles = "-"; Date = Format.Date(Single.Date); Gallons = Format.Gallons(Single.Volume); Cost = Format.Currency(Single.Cost); }
public FillupView(Fillup Item, Fillup Previous) { ItemBackground = null; ID = Item.ID; double mileage = Item.Odometer - Previous.Odometer; Date = Format.Date(Item.Date); Gallons = Format.Gallons(Item.Volume); Miles = Format.Miles(mileage); Cost = Format.Currency(Item.Cost); if (Settings.PreferGPM) Efficiency = Format.GPM(mileage, Item.Volume); else Efficiency = Format.MPG(mileage, Item.Volume); }