Esempio n. 1
0
        private void addPlaceToMap(string i_City, string i_Country, string i_ImageURL, string i_Post, DateTime i_Time, Dictionary <Place, int> i_PlacesIveBeenMap)
        {
            string           fullPlaceName           = Place.PlaceToString(i_Country, i_City);
            PlaceRelatedInfo placeRelatedInformation = new PlaceRelatedInfo(i_ImageURL, i_Post, i_Time);
            bool             isPlaceExist            = false;
            string           currentPlaceName;

            foreach (Place place in i_PlacesIveBeenMap.Keys)
            {
                currentPlaceName = Place.PlaceToString(place.CountryName, place.CityName);

                if (currentPlaceName.Equals(fullPlaceName))
                {
                    place.AddRelatedInformation(placeRelatedInformation);
                    i_PlacesIveBeenMap[place]++;
                    isPlaceExist = !isPlaceExist;
                }
            }

            if (!isPlaceExist)
            {
                Place newPlace = new Place(i_Country, i_City);

                newPlace.AddRelatedInformation(placeRelatedInformation);
                i_PlacesIveBeenMap.Add(newPlace, 1);
            }
        }
Esempio n. 2
0
 public void AddRelatedInformation(PlaceRelatedInfo i_PlaceInformation)
 {
     PlaceRelatedInformationList.Add(i_PlaceInformation);
 }