/// <summary> /// A section was touched. Either show the next level of of Sections /// or load a different view for Categories /// </summary> public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { Console.WriteLine("SECTION TableViewDelegate.RowSelected: Label={0}", list[indexPath.Row].Name); if (svc.Sections[indexPath.Row].Sections.Count == 0) { // show words Console.WriteLine(" show words {0} to {1}", list[indexPath.Row].StartCategory, list[indexPath.Row].EndCategory); CategoryViewController secvc = new CategoryViewController(mvc, list[indexPath.Row].StartCategory, list[indexPath.Row].EndCategory); secvc.Title = list[indexPath.Row].Name; mvc.NavigationController.PushViewController(secvc, true); } else { // show more sections (more hierarchy) SectionViewController uivc = new SectionViewController(mvc); uivc.Title = list[indexPath.Row].Name; uivc.Sections = svc.Sections[indexPath.Row].Sections; Console.WriteLine(" thesaurus count: " + uivc.Sections.Count); mvc.NavigationController.PushViewController(uivc, true); } }
/// <summary> /// A section was touched. Either show the next level of of Sections /// or load a different view for Categories /// </summary> public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { Console.WriteLine("SECTION TableViewDelegate.RowSelected: Label={0}", list[indexPath.Row].Name); if (svc.Sections[indexPath.Row].Sections.Count == 0) { // show words Console.WriteLine(" show words {0} to {1}", list[indexPath.Row].StartCategory, list[indexPath.Row].EndCategory); CategoryViewController secvc = new CategoryViewController(mvc, list[indexPath.Row].StartCategory, list[indexPath.Row].EndCategory); secvc.Title = list[indexPath.Row].Name; mvc.NavigationController.PushViewController(secvc,true); } else { // show more sections (more hierarchy) SectionViewController uivc = new SectionViewController(mvc); uivc.Title = list[indexPath.Row].Name; uivc.Sections = svc.Sections[indexPath.Row].Sections; Console.WriteLine(" thesaurus count: " + uivc.Sections.Count); mvc.NavigationController.PushViewController(uivc,true); } }