public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath) { var feedResultsVC = new SearchResultsViewController (); var search = savedSearches[indexPath.Row]; QueryGeneration helper = new QueryGeneration(); var query = helper.Generate(savedSearches[indexPath.Row]); Console.WriteLine(query); feedResultsVC.Query = query; feedResultsVC.MaxListings = search.MaxListings; feedResultsVC.WeeksOld = search.PostedDate; owner.ShowViewController(feedResultsVC, owner); }
public override void ViewDidLoad() { base.ViewDidLoad(); map = new MKMapView(new RectangleF(0, 0, 320, 620)) { ShowsUserLocation = true, ZoomEnabled = true, ScrollEnabled = true }; Add(map); var searchResultsController = new SearchResultsViewController(map); var searchUpdater = new SearchResultsUpdator(); searchUpdater.UpdateSearchResults += searchResultsController.Search; searchController = new UISearchController(searchResultsController) { SearchResultsUpdater = searchUpdater }; searchController.SearchBar.SizeToFit(); searchController.SearchBar.SearchBarStyle = UISearchBarStyle.Minimal; searchController.SearchBar.Placeholder = "Enter a search query"; searchController.HidesNavigationBarDuringPresentation = false; DefinesPresentationContext = true; NavigationItem.TitleView = searchController.SearchBar; map.Delegate = mapDelegate; var secondViewModel = (SecondViewModel)ViewModel; CreateRoute(); }
void SearchButton_Clicked(object sender, EventArgs e) { QueryGeneration queryHelper = new QueryGeneration(); var feedViewController = new SearchResultsViewController(); SearchObject searchObject = new SearchObject(); searchObject.SearchLocation = Location; searchObject.Category = SubCategory.Value != null ? new KeyValuePair<object, object>(SubCategory.Value, SubCategory.Key) : new KeyValuePair<object, object>(Category.Key, Category.Value); searchObject.SearchItems = this.SearchItems; searchObject.Conditions = this.Conditions; var query = queryHelper.Generate(searchObject); feedViewController.Query = query; feedViewController.MaxListings = MaxListings; feedViewController.WeeksOld = WeeksOld; this.ShowViewController(feedViewController, this); }