public string storeLocationForecast(string cityName) { if (!isCityStored(cityName)) { LocationForecast lf = mapper.getLocationForecast(cityName); cityName = lf.Name.ToLower(); locationForecast.Add(cityName, lf); } return(cityName); }
public List <LocationDailyWeather> getFirstFivePrognosis(string cityName) { int cnt = 0; List <LocationDailyWeather> firstFive = new List <LocationDailyWeather>(); currentCityForecast = mapper.getLocationForecast(cityName); foreach (LocationDailyWeather ldw in currentCityForecast.ForecastDict.Values) { if (cnt == 5) { break; } ldw.loadIcon(); firstFive.Add(ldw); cnt++; } return(firstFive); }