Exemple #1
0
 /// <summary>
 /// Updates the result for Fuel
 /// </summary>
 private void UpdateGUIFuel()
 {
     lblFuelResultKmPerLit.Text         = _carMileage.CalcConsumptionKilometerPerLiter().ToString("0.00");
     lblFuelResultLitPerKm.Text         = _carMileage.CalcFuelConsumptionPerKm().ToString("0.00");
     lblFuelResultLitPerMetricMile.Text = _carMileage.CalcConsumptionPerMetricMile().ToString("0.00");
     lblFuelResultLitPerSweMil.Text     = _carMileage.CalcFuelConsumptionPerSweMil().ToString("0.00");
     lblFuelResultCostPerKm.Text        = _carMileage.CalcCostPerKm().ToString("0.00");
 }
Exemple #2
0
 /// <summary>
 /// Updates the text of the fuel labels to the result calcualted and returned from the fuel object
 /// </summary>
 private void UpdateFuelGUI()
 {
     fuelKmPerLitLabel.Text         = fuel.CalcConsumptionKmPerLit().ToString();
     fuelLitPerKmLabel.Text         = fuel.CalcConsumptionLitPerKm().ToString();
     fuelLitPerMetricMileLabel.Text = fuel.CalcConsumptionLitPerMetricMile().ToString();
     fuelLitPerSweMilLabel.Text     = fuel.CalcConsumptionLitPerSwedishMil().ToString();
     FuelCostLabel.Text             = fuel.CalcCostPerKm().ToString();
 }
Exemple #3
0
 private void UpdateGUIFuel()
 {
     textBoxKmLit.Text     = fuelCalculator.CalcConsumptionKmPerLiter().ToString("0.00");
     textBoxLitKm.Text     = fuelCalculator.CalcFuelConsumptionPerKm().ToString("0.00");
     textBoxLitMi.Text     = fuelCalculator.CalcFuelConsumptionperMetricMile().ToString("0.00");
     textBoxLitSweMil.Text = fuelCalculator.CalcFuelConsumptionPerSweMil().ToString("0.00");
     textBoxCostKm.Text    = fuelCalculator.CalcCostPerKm().ToString("0.00");
 }