Exemplo n.º 1
0
 /// <summary>
 /// function to get and updata elements of hourly weather
 /// </summary>
 protected void updateForecastHourly()
 {
     try
     {
         //gets user georeference
         string latitude  = this.latitude.Text;
         string longitude = this.longitude.Text;
         //gets OpenWeather hourly info
         OpenWeatherHourlyResponse weatherResponse = OpenWeather.GetOpenWeatherHourlyObjectAsync(latitude, longitude);
         //prepares info to draw the graph
         generateGraphMatrix(weatherResponse.List);
         //Generates hourly info grid data source
         var dt = generareWeatherGrid(weatherResponse.List);
         gridForecast.DataSource = dt;
         gridForecast.DataBind();
         ;
     }
     catch (Exception e)
     {
         throw e;
     }
 }