Beispiel #1
0
 private void OnSearchNearbyLocationsCompleted(SearchLocationsCompletedEventArgs e)
 {
     if (SearchNearbyLocationsCompleted != null)
     {
         SearchNearbyLocationsCompleted(this, e);
     }
 }
 private void Request_SearchNearbyLocationsCompleted(object sender, SearchLocationsCompletedEventArgs e)
 {
     if (e.UserState.Equals("nearbyItems"))
     {
         NearbyProgressBarVisibility = Visibility.Collapsed;
         Utility.UIThread.Invoke(() =>
         {
             foreach (var station in e.Stations)
             {
                 Items.Add(station);
             }
         });
     }
 }
Beispiel #3
0
        private void Request_SearchNearbyLocationsCompleted(object sender, SearchLocationsCompletedEventArgs e)
        {
            if (e.UserState.Equals("nearbyItems"))
            {
                NearbyProgressBarVisibility = Visibility.Collapsed;
                Utility.UIThread.Invoke(() => 
                {
                    foreach (var station in e.Stations)
                    {
                        NearbyStations.Add(station);
                    }
                });
            }
            else
            {
                SearchProgressBarVisibility = Visibility.Collapsed;
                Utility.UIThread.Invoke(() =>
                {
                    IsNoResultMessageVisible = e.Stations.Count == 0;

                    foreach (var station in e.Stations)
                    {
                        FoundStations.Add(station);
                    }
                });
            }
        }