示例#1
0
 //public Settings(int parkingSpace, Dictionary<CarType, double> prices, int timeOut, float fine)
 //{
 //	TimeOut = timeOut;
 //	Prices = prices;
 //	ParkingSpace = parkingSpace;
 //	Fine = fine;
 //}
 public static void SetSettings(IPark parking)
 {
     parking.TimeOut      = TimeOut;
     parking.Fine         = Fine;
     parking.ParkingSpace = ParkingSpace;
     parking.Prices       = Prices;
 }
        public void ShowCostForm()
        {
            string nameZone = map.GetCurrentZone();

            if (nameZone != null)
            {
                dialog.SetTitle("Precios");
                IPark  park     = (IPark)parkSystem.GetZone(nameZone);
                string lineInfo = park.GetCosts();
                if (!lineInfo.Equals(""))
                {
                    dialog.SetChartMode(false);
                    string[] info = lineInfo.Split(',');
                    dialog.SetInfo(info);
                    dialog.Enabled = true;
                    dialog.ShowDialog();
                }
                else
                {
                    MessageBox.Show("No se posee este tipo de información de: " + park.GetName());
                }
            }
            else
            {
                MessageBox.Show("Con ayuda del marcador (doble click) seleccione un parque y presione de nuevo");
            }
        }
示例#3
0
 public CapstoneCLI(ICampground campgroundDAO, IReservation reservationDAO, IPark parkDAO, ISite siteDAO)
 {
     this.campgroundDAO  = campgroundDAO;
     this.reservationDAO = reservationDAO;
     this.parkDAO        = parkDAO;
     this.siteDAO        = siteDAO;
 }
示例#4
0
 public Engine(ISetupPark setupPark, IPark park, IExit exit, IFindVehicle findVehicle, IVehiclesByOwner vehiclesByOwner, IStatus status)
 {
     this.setupPark = setupPark;
     this.park = park;
     this.exit = exit;
     this.findVehicle = findVehicle;
     this.vehiclesByOwner = vehiclesByOwner;
     this.status = status;
 }
示例#5
0
 private void CreateCost(string[] infoCosts, IPark park)
 {
     park.AddCost("Adulto Nacional o Extranjero Residente", infoCosts[2]);
     park.AddCost("Niños de 5 a 12 años", infoCosts[3]);
     park.AddCost("Estudiantes con carnet", infoCosts[4]);
     park.AddCost("Adulto Extranjero", infoCosts[5]);
     park.AddCost("Entada automovil", infoCosts[12]);
     park.AddCost("Entrada Collectivo", infoCosts[13]);
     park.AddCost("Entrada bus", infoCosts[14]);
     park.AddCost("Entada moto", infoCosts[15]);
     park.AddCost("Camping(TempBaja)", infoCosts[18]);
     park.AddCost("Camping(TempAlta)", infoCosts[19]);
 }
示例#6
0
        public void ReadCostsFile(string path)
        {
            StreamReader reader = new StreamReader(path: path);

            reader.ReadLine();
            string line = null;

            while ((line = reader.ReadLine()) != null)
            {
                string[] infoCosts = line.Split(',');
                string   nameZone  = infoCosts[1].Trim();
                IPark    park      = (IPark)GetZone(nameZone);
                CreateCost(infoCosts, park);
            }
        }
示例#7
0
        public static int ComparyByCost(IZone zone1, IZone zone2)
        {
            IPark z1 = (IPark)zone1;
            IPark z2 = (IPark)zone2;

            if (z1.GetCost() < z2.GetCost())
            {
                return(1);
            }
            else if (z1.GetCost() > z2.GetCost())
            {
                return(-1);
            }

            return(0);
        }
        internal string GetInfoZone(string zoneName)
        {
            bool[] filters = filterControl.GetFiltersInformation();

            IZone zone = parkSystem.GetZone(zoneName);

            string infoZone = GetDefaultInfoZone(zone);
            IPark  park     = (IPark)zone;

            if (filters[FilterControl.COST])
            {
                infoZone += "Precio total: " + "\n" + park.GetCost() + "\n";
            }

            if (filters[FilterControl.SCHEDULE])
            {
                infoZone += "Horario de apertura: " + park.GetSchedule() + "\n";
            }

            if (filters[FilterControl.VISITS])
            {
                infoZone += "Visitas Ultimos dos años: " + (park.GetVisits().GetTotalVisits((DateTime.Now.Year - 6) + "") + park.GetVisits().GetTotalVisits((DateTime.Now.Year - 7) + ""))
                            + "\n";
            }

            if (filters[FilterControl.FORECAST])
            {
                infoZone += "Pronostico de visitas: " + park.GetVisits().GetForecastVisits("2018") + "\n";
            }


            infoZone += GetDefaultInfoPolygon(zone.GetPolygonArea());



            return(infoZone);
        }
 public ParkController(IPark parkDAO)
 {
     this.parkDAO = parkDAO;
 }
示例#10
0
 public HomeController(IPark parkDAO)
 {
     this.parkDAO = parkDAO;
 }
示例#11
0
 public HomeController(IPark dao, IWeather weatherDao)
 {
     this.dao        = dao;
     this.WeatherDao = weatherDao;
 }
示例#12
0
 public HomeController(IPark dal)
 {
     _dal = dal;
 }
示例#13
0
 public SurveyController(ISurvey surveyDAO, IPark parkDAO)
 {
     this.surveyDAO = surveyDAO;
     this.parkDAO   = parkDAO;
 }