finished coursework

This commit is contained in:
2024-04-21 02:51:22 +01:00
parent 7fd9f6998d
commit ca7c68898e
14 changed files with 293 additions and 167 deletions

View File

@@ -25,7 +25,7 @@ namespace HCI_Coursework_EVCHARGE
var details = new ChargingDetails(Convert.ToInt16(bay)).getCarInfo(vehicle);
label1.Text = $"{System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(vehicle)} Charging...";
chargeRateLabel.Text = $"Charging Rate: {details[0]} kW";
chargeCapacityLabel.Text = $" Total Charge: {Convert.ToString(decimal.Round( (Convert.ToDecimal(details[0]) / Convert.ToInt16(duration)), 2, MidpointRounding.ToEven))} kWh";
chargeCapacityLabel.Text = $" Total Charge: {Convert.ToString(decimal.Round( (Convert.ToDecimal(details[0]) * Convert.ToInt16(duration)), 2, MidpointRounding.ToEven))} kWh";
}
private void Charging_Load(object sender, EventArgs e)