Exemplo n.º 1
0
        private async Task GetCitiesAsync()
        {
            var cities = await WeatherUndergroundAPI.GetAutocompliteAsync(Query);

            Cities.Clear();
            foreach (var city in cities)
            {
                Cities.Add(city);
            }
        }
Exemplo n.º 2
0
        public async void GetWeather()
        {
            if (SelectedResult.L != null)
            {
                var weather = await WeatherUndergroundAPI.GetWeatherInformationAsync(SelectedResult.L);

                Weather.current_observation.weather               = weather.current_observation.weather;
                Weather.current_observation.UV                    = weather.current_observation.UV;
                Weather.current_observation.wind_string           = weather.current_observation.wind_string;
                Weather.current_observation.precip_today_string   = weather.current_observation.precip_today_string;
                Weather.current_observation.temperature_string    = weather.current_observation.temperature_string;
                Weather.current_observation.display_location.city = weather.current_observation.display_location.city;
            }
        }