Ejemplo n.º 1
0
 public CityWeather(OpenWeatherMapService.CityCurrentWeatherInfo cityWeatherInfo) {
     this.cityWeatherInfo = cityWeatherInfo;
     this.weather = new Weather(cityWeatherInfo.main);
     this.weatherDescriptions = new List<WeatherDescription>();
     foreach(OpenWeatherMapService.WeatherDescriptionInfo weatherDescription in cityWeatherInfo.weather)
         weatherDescriptions.Add(new WeatherDescription(weatherDescription));
 }
Ejemplo n.º 2
0
 public CityWeather(OpenWeatherMapService.ForecastInfo forecast, int index) {
     OpenWeatherMapService.CityForecastWeatherInfo info = forecast.list[index];
     OpenWeatherMapService.CityInfo cityInfo = forecast.city;
     this.cityWeatherInfo = new OpenWeatherMapService.CityCurrentWeatherInfo() {
         clouds = info.clouds, dt = info.dt, main = info.main, weather = info.weather, wind = info.wind, coord = cityInfo.coord, id = cityInfo.id, name = cityInfo.name
     };
     this.weather = new Weather(cityWeatherInfo.main);
     this.weatherDescriptions = new List<WeatherDescription>();
     foreach(OpenWeatherMapService.WeatherDescriptionInfo weatherDescription in cityWeatherInfo.weather)
         weatherDescriptions.Add(new WeatherDescription(weatherDescription));
 }