private void ConnectCar([NotNull] CalcChargingStation station) { if (_lastChargingStation != null) { _lastChargingStation.DisconnectCar(); } _lastChargingStation = station; _lastChargingStation.SetConnectedCar(this); }
public void AddChargingStation([NotNull] CalcLoadType gridchargingLoadType, [NotNull] CalcTransportationDeviceCategory cat, double chargingDeviceMaxChargingPower, [NotNull] CalcLoadType carChargingLoadType, CalcRepo calcRepo) { string name = Name + " - Charging station " + (ChargingDevices.Count + 1); CalcChargingStation station = new CalcChargingStation(cat, gridchargingLoadType, chargingDeviceMaxChargingPower, name, System.Guid.NewGuid().ToStrGuid(), _householdKey, carChargingLoadType, calcRepo); ChargingDevices.Add(station); }
private void DisconnectCar() { _lastChargingStation?.DisconnectCar(); _lastChargingStation = null; }