public virtual void Restore(BinaryReader inf)
        {
            BatterySwitch.Restore(inf);

            FrontElectricTrainSupplyCableConnected = inf.ReadBoolean();

            ElectricTrainSupplyState = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            BatteryState             = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());

            IsFirstUpdate = false;
        }
Esempio n. 2
0
        public virtual void Restore(BinaryReader inf)
        {
            BatterySwitch.Restore(inf);

            FrontElectricTrainSupplyCableConnected = inf.ReadBoolean();

            ElectricTrainSupplyState   = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            LowVoltagePowerSupplyState = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            BatteryState         = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            VentilationState     = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            HeatingState         = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            AirConditioningState = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());

            HeatFlowRateW = inf.ReadSingle();

            IsFirstUpdate = false;
        }
Esempio n. 3
0
        public virtual void Restore(BinaryReader inf)
        {
            BatterySwitch.Restore(inf);
            MasterKey.Restore(inf);
            ElectricTrainSupplySwitch.Restore(inf);

            FrontElectricTrainSupplyCableConnected = inf.ReadBoolean();

            MainPowerSupplyState       = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            AuxiliaryPowerSupplyState  = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            ElectricTrainSupplyState   = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            LowVoltagePowerSupplyState = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            BatteryState        = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());
            CabPowerSupplyState = (PowerSupplyState)Enum.Parse(typeof(PowerSupplyState), inf.ReadString());

            firstUpdate = false;
        }