Beispiel #1
0
        private async void GetCities()
        {
            var items = await AccuWeatherViewModel.GetAccuWeatherLocationInfoAsync(this.query);

            Cities.Clear();
            foreach (var item in items)
            {
                Cities.Add(item);
            }
        }
Beispiel #2
0
        public async void GetWeather()
        {
            //this.accuweatherlocation.Key = "307297";
            if (!string.IsNullOrEmpty(this.accuweatherlocation.Key))
            {
                var varAccuWeatherCurrent = await AccuWeatherViewModel.GetAccuWeatherCurrentInfoAsync(this.accuweatherlocation.Key);

                this.accuWeatherCurrent.LocalObservationDateTime = varAccuWeatherCurrent.LocalObservationDateTime;
                this.accuWeatherCurrent.Temperature = varAccuWeatherCurrent.Temperature;
                this.accuWeatherCurrent.WeatherText = varAccuWeatherCurrent.WeatherText;

                var varAccuWeather5Day = await AccuWeatherViewModel.GetAccuWeather5DayInfoAsync(this.accuweatherlocation.Key);

                this.accuWeather5Day.DailyForecasts = varAccuWeather5Day.DailyForecasts;
            }
        }