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; }
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; }
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; }