示例#1
0
        private void InitializationTaxopark(string[] Path)
        {
            Passenger      passenger      = new Passenger();
            SmallCargo     smallCargo     = new SmallCargo();
            BigCargo       bigCargo       = new BigCargo();
            FrozenBigCargo frozenBigCargo = new FrozenBigCargo();
            LiquidBigCargo liquidBigCargo = new LiquidBigCargo();

            InitializationPassenger(passenger, Path[0]);
            InitializationSmallCargo(smallCargo, Path[1]);
            InitializationBigCargo(bigCargo, Path[4]);
            InitializationLiquidBigCargo(liquidBigCargo, Path[2]);
            InitializationFrozenBigCargo(frozenBigCargo, Path[3]);
            //using (StreamReader stream = new StreamReader(Path[i], System.Text.Encoding.Default))
            //{
            //    while (!stream.EndOfStream)
            //    {
            //        string Buffer = stream.ReadLine();
            //        string[] CarInformation = Buffer.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            //        InitializationAbstractCarsInformation(passenger, CarInformation);
            //        InitializationPassenger(passenger, CarInformation);
            //        PassengerCars.Add(passenger);
            //        passenger = new Passenger();
            //    }
            //}
        }
示例#2
0
 private void InitializationFrozenBigCargo(FrozenBigCargo frozenBigCargo, string Path)
 {
     using (StreamReader stream = new StreamReader(Path, System.Text.Encoding.Default))
     {
         while (!stream.EndOfStream)
         {
             string   Buffer         = stream.ReadLine();
             string[] CarInformation = Buffer.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
             InitializationAbstractCarsInformation(frozenBigCargo, CarInformation);
             frozenBigCargo.PropLoadCapacity    = Convert.ToDouble(CarInformation[7]);
             frozenBigCargo.PropTotalVolum      = Convert.ToInt32(CarInformation[8]);
             frozenBigCargo.PropAmountTrailer   = Convert.ToInt32(CarInformation[9]);
             frozenBigCargo.PropAmountEuroPalet = Convert.ToInt32(CarInformation[10]);
             frozenBigCargo.PropTypeTrailer     = CarInformation[11];
             frozenBigCargo.PropTypeFridge      = CarInformation[12];
             frozenBigCargo.PropMinTemperature  = Convert.ToDouble(CarInformation[13]);
             FrozenBigCargoCars.Add(frozenBigCargo);
             Cars.Add(frozenBigCargo);
             frozenBigCargo = new FrozenBigCargo();
         }
     }
 }