private void Search() { string city = cityTextBox.Text; WeatherAPIService weatherAPI = new WeatherAPIService(city); if (weatherAPI.xmlDocument == null) { MessageBox.Show("Введен неверный город"); return; } WeatherData weather = new WeatherData(city); List <DayTemperature> dayTemperatures = weather.GetWeather(); listBox.ItemsSource = dayTemperatures; }
public List <DayTemperature> GetWeather() { WeatherAPIService dataAPI = new WeatherAPIService(City); return(dataAPI.GetTemp()); }