Esempio n. 1
0
        private bool DoPayment()
        {
            Parking parking = GetDestination();
            Payment payment = new Payment(parking);

            if (payment.MakeTransaction())
            {
                _isPaid = true;
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
 public void GetParkings()
 {
     using (StreamReader streamReader = new StreamReader(_dataBaseRef))
     {
         string data;
         for (int i = 0; (data = streamReader.ReadLine()) != null; i++)
         {
             string[] input   = data.Split(',');
             Random   rand    = new Random();
             Parking  parking = new Parking(i, input[0].Split(' ').Select(a => int.Parse(a)).ToArray(),
                                            int.Parse(input[1]), int.Parse(input[2]), int.Parse(input[3]));
             Parkings.Add(parking);
         }
     }
 }
Esempio n. 3
0
 public Payment(Parking parking)
 {
     _parking = parking;
 }