示例#1
0
        public async void GetCities()
        {
            var cities = await WeatherApi.GetAutoCompleteAsync(Query);

            Cities.Clear();
            cities.ForEach(city => Cities.Add(city));
        }
示例#2
0
        public async void GetWeather()
        {
            if (SelectedCity == null)
            {
                return;
            }

            var weather = await WeatherApi.GetWeatherInformationAsync(SelectedCity.Key);

            if (weather == null)
            {
                return;
            }

            //Weather = weather;
            Weather.DailyForecasts = weather.DailyForecasts;
        }