Exemplo n.º 1
0
        private void ConnectCar([NotNull] CalcChargingStation station)
        {
            if (_lastChargingStation != null)
            {
                _lastChargingStation.DisconnectCar();
            }

            _lastChargingStation = station;
            _lastChargingStation.SetConnectedCar(this);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 private void DisconnectCar()
 {
     _lastChargingStation?.DisconnectCar();
     _lastChargingStation = null;
 }