private void View_SearchTextChanged(object sender, SearchTextChangedEventArgs e)
 {
     if (e.Text != _searchItem.DisplayText)
     {
         _searchItem = new PlainTextSearchItem(e.Text);
     }
 }
 private void View_LocationSelected(object sender, LocationSelectedEventArgs e)
 {
     _view.SearchText = e.Location.DisplayName;
     _view.DisplaySuggestedLocations(null);
     _searchItem = new PlainTextSearchItem(e.Location.Name, e.Location.DisplayName);
     SearchForProperties();
 }
Ejemplo n.º 3
0
 public SearchResultsPresenter(INavigationService navigationService, PropertyCrossPersistentState state,
                               PropertyListingsResult results, SearchItemBase searchItem, PropertyDataSource dataSource)
 {
     _state             = state;
     _navigationService = navigationService;
     _searchItem        = searchItem;
     _dataSource        = dataSource;
     _properties        = results.Data;
     _totalResult       = results.TotalResult;
     _totalPages        = results.TotalPages;
 }
   public SearchResultsPresenter(INavigationService navigationService, PropertyCrossPersistentState state,
 PropertyListingsResult results, SearchItemBase searchItem, PropertyDataSource dataSource)
   {
       _state = state;
         _navigationService = navigationService;
         _searchItem = searchItem;
         _dataSource = dataSource;
         _properties = results.Data;
         _totalResult = results.TotalResult;
         _totalPages = results.TotalPages;
   }
        private void View_MyLocationButtonClicked(object sender, EventArgs e)
        {
            _view.IsLoading = true;
            _geolocationService.GetLocation(location =>
            {
                _view.IsLoading = false;

                if (location == null)
                {
                    _view.SetMessage("Unable to detect current location. Please ensure location is turned on in your phone settings and try again.");
                }
                else
                {
                    _searchItem      = new GeoLocationSearchItem(location);
                    _view.SearchText = _searchItem.DisplayText;
                    SearchForProperties();
                }
            });
        }
 private void View_RecentSearchSelected(object sender, RecentSearchSelectedEventArgs e)
 {
     _searchItem      = e.RecentSearch.Search;
     _view.SearchText = e.RecentSearch.Search.DisplayText;
     SearchForProperties();
 }
 private void View_SearchTextChanged(object sender, SearchTextChangedEventArgs e)
 {
     if (e.Text != _searchItem.DisplayText)
       {
     _searchItem = new PlainTextSearchItem(e.Text);
       }
 }
 private void View_RecentSearchSelected(object sender, RecentSearchSelectedEventArgs e)
 {
     _searchItem = e.RecentSearch.Search;
       _view.SearchText = e.RecentSearch.Search.DisplayText;
       SearchForProperties();
 }
        private void View_MyLocationButtonClicked(object sender, EventArgs e)
        {
            _view.IsLoading = true;
              _geolocationService.GetLocation(location =>
            {
              _view.IsLoading = false;

              if (location == null)
              {
            _view.SetMessage("Unable to detect current location. Please ensure location is turned on in your phone settings and try again.");
              }
              else
              {
            _searchItem = new GeoLocationSearchItem(location);
            _view.SearchText = _searchItem.DisplayText;
            SearchForProperties();
              }
            });
        }
 private void View_LocationSelected(object sender, LocationSelectedEventArgs e)
 {
     _view.SearchText = e.Location.DisplayName;
       _view.DisplaySuggestedLocations(null);
       _searchItem = new PlainTextSearchItem(e.Location.Name, e.Location.DisplayName);
       SearchForProperties();
 }