Ejemplo n.º 1
0
 public async void SearchLocation()
 {
     if (IsInternetAvailable())
     {
         try
         {
             IsLoading = true;
             if (!string.IsNullOrEmpty(QueryString))
             {
                 QueryWeather = new List <OpenWeatherObj>()
                 {
                     await OpenWeatherService.GetWeatherByCityNameAsync(QueryString)
                 };
             }
         }
         catch (COMException) { Status = 2; }
         catch (Exception) { Status = 3; }
         finally
         {
             IsLoading = false;
         }
     }
     else
     {
         Status = 3;
     }
 }
Ejemplo n.º 2
0
        public async void SearchLocation()
        {
            try
            {
                IsLoading = true;
                var obj = await OpenWeatherService.GetWeatherByCityNameAsync(QueryString, "");

                QueryWeather = new List <OpenWeatherObj>()
                {
                    obj
                };
            }
            catch { }
            finally
            {
                IsLoading = false;
            }
        }
Ejemplo n.º 3
0
        public async void SearchLocation()
        {
            try
            {
                IsLoading = true;
                var obj = await OpenWeatherService.GetWeatherByCityNameAsync(SearchKeyword, "");

                SearchResult = new List <OpenWeatherObj>()
                {
                    obj
                };
            }
            catch { }
            finally
            {
                IsLoading = false;
            }
        }