示例#1
0
 private void SearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if ((sender as UISearchBar).Text == string.Empty)
     {
         pdfViewerControl.CancelSearch();
     }
 }
示例#2
0
 void OnTextChanged(object sender, UISearchBarTextChangedEventArgs a)
 {
     // This only fires when text has been typed into the SearchBar; see UpdateText()
     // for why this is handled in this manner.
     _textWasTyped = true;
     _typedText    = a.SearchText;
     UpdateOnTextChanged();
 }
示例#3
0
 void HandleTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if (sfDataSource != null)
     {
         this.sfDataSource.Filter = FilterContacts;
         this.sfDataSource.RefreshFilter();
     }
 }
示例#4
0
        private async void LocationNameSearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(this.LocationNameSearchBar.Text))
            {
                _results = await _googlePlaceService.AutoComplete(this.LocationNameSearchBar.Text);

                this.LocationsTableView.ReloadData();
            }
        }
        private void SearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            string text         = e.SearchText.Trim();
            var    searchResult = AllContact.Where(x => x.FamilyName.ToUpper().Contains(text.ToUpper()) ||
                                                   x.GivenName.ToUpper().Contains(text.ToUpper())).ToList();

            ContactTableSource.ItemSource = searchResult;
            contactTable.ReloadData();
        }
示例#6
0
        private void TeamNameSearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            var searchKeyword = this.TeamNameSearchBar.Text;

            if (!string.IsNullOrWhiteSpace(searchKeyword))
            {
                _results = _allTeams.Where(t => t.Name.Contains(searchKeyword)).ToList();

                this.TeamTableView.ReloadData();
            }
        }
示例#7
0
        async void SearchBarItems_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            Console.WriteLine(searchBarItems.Text + "---------" + e.SearchText);
            //searchTable();
            SearchOn(searchBarItems.Text.ToLower());
            TableView.ReloadData();

            searchBarItems.ShowsCancelButton = true;

            //await ProductoReadyAsync(e.SearchText);
            //TableView.ReloadData();
        }
 /// <summary>
 /// Updates suggestions as the user types
 /// </summary>
 private async void HomeLocationSearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     try
     {
         // This is the method that is called when the user searches
         await GetSuggestionsFromLocatorAsync();
     }
     catch (Exception ex)
     {
         ErrorLogger.Instance.LogException(ex);
     }
 }
示例#9
0
 private void CountriesSearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if (CountriesSearchBar.Text != string.Empty)
     {
         var data = Countries.Where(a => a.CountryName.ToLowerInvariant().StartsWith(CountriesSearchBar.Text.ToLowerInvariant())).ToList();
         CountriesTableView.Source = new TableSource(data, NavController);
     }
     else
     {
         CountriesTableView.Source = new TableSource(Countries, NavController);
     }
     CountriesTableView.ReloadData();
 }
示例#10
0
 private void SearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs uiSearchBarTextChangedEventArgs)
 {
     /*
      * if (!string.IsNullOrEmpty(searchBar.Text))
      *  return;
      *
      * //Send table view to back and clear it.
      * View.SendSubviewToBack(tableView);
      * tableView.Source = new SearchDataSource(new List<BeerItem>());
      * tableView.ReloadData();
      *
      */
 }
 void Search(object sender, UISearchBarTextChangedEventArgs e)
 {
     IEnumerable<Player> searchResults = new List<Player>();
     int nbr;
     if (int.TryParse (e.SearchText, out nbr))
         searchResults = Players.Where (p => p.PlayerNumber.Equals(nbr));
     else
         searchResults = Players.Where (p => string.Format ("{0} {1}", p.Name, p.FirstNames).ToLower().Contains (e.SearchText.ToLower()));
     var source = new PlayerPickerView (searchResults.ToList ());
     source.ItemSelected += HandleItemSelected;
     playerPickerView.Source = source;
     playerPickerView.ReloadData ();
 }
示例#12
0
        private void SearchBarOnTextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(_searchBar.Text))
            {
                ((TabIndexViewModel)ViewModel).SearchJuices(string.Empty);

                BeginInvokeOnMainThread(() => _searchBar.ResignFirstResponder());
            }
            else
            {
                ((TabIndexViewModel)ViewModel).SearchJuices(_searchBar.Text);
            }
        }
        async void SearchInputChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            if (e.SearchText == "")
            {
                resultsTable.Hidden = true;
            }
            else
            {
                resultsTable.Hidden = false;
                var predictions = await GetPlaces(e.SearchText);

                UpdateTableWithPredictions(predictions);
            }
        }
        async void AddressSearchBar_TextChanged (object sender, UISearchBarTextChangedEventArgs e)
        {
            if (AddressSearchBar.Text.Length < 5)
            {
                return;
            }

            if (CrossConnectivity.Current.IsConnected)
            {
                //await PerformAddressSearch(AddressSearchBar.Text);
                var result = await _googlePlace.PerformAddressSearch(AddressSearchBar.Text);
                TableView.Source = new AddressLookupTableSource(this,result,"addressCell",OnAddressSelected);
                TableView.ReloadData();
            }
        }
 private void Control_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if (Control != null)
     {
         UIButton button = GetCancelButton(Control);
         if (button != null)
         {
             button.SetTitle("Go!", UIControlState.Normal);
         }
         else
         {
             Control.ShowsCancelButton = false;
         }
     }
 }
示例#16
0
        private async void Searchbox_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
        {
            if (e.SearchText.Length > 1)
            {
                searchLoader.Hidden = false;
                string     url     = $"https://maps.googleapis.com/maps/api/place/autocomplete/json?input={e.SearchText}&key=AIzaSyAZQBaY-ugQuwCWr4NkD-bybK7urElvNyY&sessiontoken=123254251&components=country:ng";
                var        handler = new HttpClientHandler();
                HttpClient client  = new HttpClient(handler);
                string     result  = await client.GetStringAsync(url);

                if (!string.IsNullOrEmpty(result))
                {
                    var resultObject     = JObject.Parse(result);
                    var predictionString = resultObject["predictions"].ToString();
                    predictionList = JsonConvert.DeserializeObject <List <Prediction> >(predictionString);

                    Console.WriteLine("Prediction Count = " + predictionList.Count);
                    placesTableView.Hidden = false;
                    searchLoader.Hidden    = true;
                    SetupTable();
                }
            }
        }
示例#17
0
 private void OnSearchTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     _asyncSearch.NotifySearchTextChanged(e.SearchText);
 }
 void searchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if (searchBar.Text.Length >= 2)
     {
         lastPagePulled = 0;
         Action<EventsJson> skaters = new Action<EventsJson>(UpdateAdapter);
         Calendar.SearchEvents(lastPagePulled, PAGE_COUNT, searchBar.Text, skaters);
     }
     else if (searchBar.Text.Length == 0)
     {
         Action<EventsJson> skaters = new Action<EventsJson>(UpdateAdapter);
         Calendar.PullEvents(lastPagePulled, PAGE_COUNT, skaters);
     }
 }
示例#19
0
 void OnTextPropertySet(object?sender, UISearchBarTextChangedEventArgs a) =>
 VirtualView.UpdateText(a.SearchText);
 void searchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     if (searchBar.Text.Length >= 2)
     {
         lastPagePulled = 0;
         Action<LeaguesJson> skaters = new Action<LeaguesJson>(UpdateAdapter);
         RDN.iOS.Classes.Public.League.SearchLeagues(lastPagePulled, PAGE_COUNT, searchBar.Text, skaters);
     }
     else if (searchBar.Text.Length == 0)
     {
         Action<LeaguesJson> skaters = new Action<LeaguesJson>(UpdateAdapter);
         RDN.iOS.Classes.Public.League.PullLeagues(lastPagePulled, PAGE_COUNT, lastLetterPulled, skaters);
     }
 }
		void SearchBar_TextChanged (object sender, UISearchBarTextChangedEventArgs e)
		{
			SearchButtonClicked();	
		}
示例#22
0
 private async Task SearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     ViewModel.SearchBarTextChangeCommand.Execute(e.SearchText);
 }
示例#23
0
		void HandleTextChanged (object sender, UISearchBarTextChangedEventArgs e)
		{
			viewmodel.FilterText = e.SearchText;
		}
 private void HandleSearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     lazySearchTimer.Run ();
 }
        /// <summary>
        /// Handles showing the placeholder when the text is null or empty. 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="uiSearchBarTextChangedEventArgs"></param>
        void SearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs uiSearchBarTextChangedEventArgs)
        {
            upc = string.Empty;

            if (!string.IsNullOrEmpty(searchBar.Text))
                return;

            //Setup text and image for scaling animation
            scrllPlaceHolder.Alpha = 0.6f;
            var smallTransform = CGAffineTransform.MakeIdentity();
            smallTransform.Scale(0.6f, 0.6f);
            imgSearch.Transform = smallTransform;
            lblFindBeers.Transform = smallTransform;
            lblSearchBeerDrinkin.Transform = smallTransform;

            //Send table view to back and clear it.
            View.SendSubviewToBack(tableView);
            tableView.Source = new SearchDataSource(new List<BeerItem>());
            tableView.ReloadData();

            //Animate the placeholder 
            var normalTransform = CGAffineTransform.MakeIdentity();
            smallTransform.Scale(1f, 1f);
            UIView.Animate(0.3, 0, UIViewAnimationOptions.TransitionCurlUp,
                () =>
                {
                    scrllPlaceHolder.Alpha = 1;

                    imgSearch.Transform = normalTransform;
                    lblFindBeers.Transform = normalTransform;
                    lblSearchBeerDrinkin.Transform = normalTransform;
                }, () =>
                {
                });
        }
        private void SearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs uiSearchBarTextChangedEventArgs)
        {
            /*
            if (!string.IsNullOrEmpty(searchBar.Text))
                return;

            //Send table view to back and clear it.
            View.SendSubviewToBack(tableView);
            tableView.Source = new SearchDataSource(new List<BeerItem>());
            tableView.ReloadData();

            */
        }
示例#27
0
 void OnTextChanged(object sender, UISearchBarTextChangedEventArgs a)
 {
     ElementController.SetValueFromRenderer(SearchBar.TextProperty, Control.Text);
 }
 private void SearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     __presenter.Search(e.SearchText);
 }
示例#29
0
 /// <summary>
 /// Update suggestions when text changes.
 /// </summary>
 private void Search_textChanged(object sender, UISearchBarTextChangedEventArgs e) => UpdateTableView();
示例#30
0
 private void HandleSearchBarValueChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     FireValueChanged(View.Text);
 }
示例#31
0
 private void TableViewSearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     ViewModel.ContactNameSearchQuery = e.SearchText;
 }
 private void searchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     dataSource.SearchAndFilter(this.searchBar.Text);
     this.TableView.ReloadData();
 }
示例#33
0
        void HandleTextChanged (object sender, UISearchBarTextChangedEventArgs e)
        {
			ViewModel.ClearResults();
        }
 void OnTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     UpdateCancelButtonColor(_uiSearchBar.FindDescendantView <UIButton>());
 }
 void SearchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     Vm.SearchQuiry = e.SearchText;
 }
示例#36
0
 /// <summary>
 /// Triggered each time the text in the search filed changes
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SearchTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     Session.SearchActor(e.SearchText);
     tableView.ReloadData();
 }
	    private void SearchBarTextChanged(object sender, UISearchBarTextChangedEventArgs uiSearchBarTextChangedEventArgs)
	    {
	        string searchText = uiSearchBarTextChangedEventArgs.SearchText.ToLower();
	        FriendsDataSource source = TableView.Source as FriendsDataSource;
	        if (source != null)
	        {
	            source.FilteredFriendsList = 
                    source.FriendsList.Where(
                        friend => (friend.FirstName.ToLower().Contains(searchText) || friend.LastName.ToLower().Contains(searchText))
                    ).ToList();

                TableView.ReloadData();
	        }
	    }
 void HandleTextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     viewModel.FilterText = e.SearchText;
 }
示例#39
0
 private void searchBar_TextChanged(object sender, UISearchBarTextChangedEventArgs e)
 {
     dataSource.SearchAndFilter(this.searchBar.Text);
     this.TableView.ReloadData();
 }