Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        public List <DayTemperature> GetWeather()
        {
            WeatherAPIService dataAPI = new WeatherAPIService(City);

            return(dataAPI.GetTemp());
        }