예제 #1
0
        private void Search_Click(object sender, RoutedEventArgs e)
        {
            ResultsListSelector.ItemsSource = null;

            if (String.IsNullOrEmpty(txtSearch.Text))
            {
                MessageBox.Show("Please enter a search term");
            }
            else
            {
                btnCancel.Visibility = Visibility.Visible;
                btnSearch.Visibility = Visibility.Collapsed;

                EmptyMessage.Visibility      = Visibility.Collapsed;
                _progressIndicator.IsVisible = true;
                //ProgressBar.IsIndeterminate = true;
                //GooglePlacesClient gpc = new GooglePlacesClient("AIzaSyBF9QNL1u5bGOvMngxDyAV4smnXi0jwdbw");
                //gpc.SearchForPlaceAync(new GooglePlaceSearchRequest(51.417054, 0.069158, 50000, false, txtSearch.Text));

                _gpc = new GooglePlacesTextSearchClient("AIzaSyBF9QNL1u5bGOvMngxDyAV4smnXi0jwdbw");
                _gpc.SearchForPlaceAync(new GooglePlaceSearchRequest(false, txtSearch.Text));

                _gpc.SearchForPlacesAsyncCompleted += GooglePlacesSearchForPlaceDelegate;
                _gpc.SearchForPlacesAsyncNotFound  += SearchForPlacesAsyncNotFound;
            }
        }
예제 #2
0
        private void Search_ActionIconTapped(object sender, EventArgs e)
        {
            GooglePlacesTextSearchClient gpc = new GooglePlacesTextSearchClient("AIzaSyBF9QNL1u5bGOvMngxDyAV4smnXi0jwdbw");

            gpc.SearchForPlaceAync(new GooglePlaceSearchRequest(false, txtSearch.Text));

            gpc.SearchForPlacesAsyncCompleted += GooglePlacesSearchForPlaceDelegate;
            gpc.SearchForPlacesAsyncNotFound  += SearchForPlacesAsyncNotFound;
        }
예제 #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //GooglePlacesClient gpc = new GooglePlacesClient("AIzaSyBF9QNL1u5bGOvMngxDyAV4smnXi0jwdbw");
            //gpc.SearchForPlaceAync(new GooglePlaceSearchRequest(51.417054, 0.069158, 50000, false, txtSearch.Text));

            GooglePlacesTextSearchClient gpc = new GooglePlacesTextSearchClient("AIzaSyBF9QNL1u5bGOvMngxDyAV4smnXi0jwdbw");

            gpc.SearchForPlaceAync(new GooglePlaceSearchRequest(false, txtSearch.Text));

            gpc.SearchForPlacesAsyncCompleted += GooglePlacesSearchForPlaceDelegate;
            gpc.SearchForPlacesAsyncNotFound  += SearchForPlacesAsyncNotFound;
        }