コード例 #1
0
        //Loads weather data of specific day depending on current pageState value
        private async void PageLoaded(object sender, RoutedEventArgs e)
        {
            string     city       = MainPage.cityName;
            RootObject dayWeather = await Proxy.GetWeather(city, MainPage.unit);

            FullDayWeather day = new FullDayWeather(MainPage.pageState, dayWeather);

            weatherDescription = day.Description;
            Set_Background();
            Control_Populator(day);
        }
コード例 #2
0
 //populates controls on this page with weather data
 private void Control_Populator(FullDayWeather day)
 {
     dailyWeatherDesc.Text = String.Format("'{0}'", ToTitleCase(day.Description));
     dailyIcon.Source      = day.IconSource;
     dailyDayName.Text     = day.Date;
     dailyHumidity.Text    = day.Humidity;
     dailyPressure.Text    = day.Pressure;
     dailyMaxTemp.Text     = day.Temp;
     dailyWindDir.Text     = day.WindDirection;
     dailyWindSpeed.Text   = day.WindSpeed;
     dailyClouds.Text      = day.Clouds;
 }