public MyphraseTableSource(List<Phrase> items, List<Phrase> filteredItems, MyPhraseScreen owner) { tableItems = items; this.filteredItems = filteredItems; this.myPhraseScreenController = owner; this.search = owner.SearchDisplayController; }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { IList<Category> childCategories = CategoryManager.GetChildCategories (tableItems[indexPath.Row].CategoryID); if (childCategories.Count > 0) { ChildCategoryScreen childCategoryScreen = new ChildCategoryScreen(tableItems[indexPath.Row].CategoryID); this.categoryScreenController.NavigationController.PushViewController (childCategoryScreen, true); } else { if (tableItems [indexPath.Row].Name.Equals ("My Phrases")) { MyPhraseScreen myPhraseScreen = new MyPhraseScreen (tableItems [indexPath.Row].CategoryID); this.categoryScreenController.NavigationController.PushViewController (myPhraseScreen, true); } else { PhraseScreen phraseScreen = new PhraseScreen (tableItems[indexPath.Row].CategoryID, tableItems[indexPath.Row].Name); this.categoryScreenController.NavigationController.PushViewController (phraseScreen, true); } } }