private void SetWeatherList(TempViewModel.RootObject jsonresult) { if (jsonresult != null) { _weatherArrayString.Add(jsonresult.name); } }
private void SetWeatherListEvent(TempViewModel.RootObject jsonresult) { if (jsonresult != null) { _weather = new WeatherViewModel() { City = jsonresult.name, Weather = jsonresult.weather[0].description, Temp = string.Format("{0} {1}", jsonresult.main.temp, "°C"), TempMax = string.Format("{0} {1}", jsonresult.main.temp_max, "°C"), TempMin = string.Format("{0} {1}", jsonresult.main.temp_min, "°C"), Url = $"http://openweathermap.org/img/w/" + jsonresult.weather[0].icon + ".png" }; } }