Example #1
0
        private async void BtnSubmit_Clicked(object sender, EventArgs e)
        {
            clsCity objCity = pkrCity.SelectedItem as clsCity;

            OpenWeatherObj obj = await MgrHTTP.HTTPGet <OpenWeatherObj>("weather", objCity.id.ToString());

            DisplayWeather(obj);
        }
        private async void BtnSubmit_Click(object sender, EventArgs e)
        {
            if (!ValidateSubmitData())
            {
                return;
            }

            clsCity objCity = cboCity.SelectedItem as clsCity;

            OpenWeatherObj obj = await MgrHTTP.HTTPGet <OpenWeatherObj>("weather", objCity.id.ToString());

            DisplayWeather(obj);
        }
 private void DisplayWeather(OpenWeatherObj obj)
 {
     lblCurrentTemp.Text = Math.Round(obj.main.temp) + "° " + mgrMeasurementUnits.g_MeasurementUnit;
     lblCurrentWeatherDescription.Text = obj.weather[0].description;
 }