Пример #1
0
        /// <summary>
        /// Called when a row is touched
        /// </summary>
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            //UIAlertController okAlertController = UIAlertController.Create("Row Selected", tableItems[indexPath.Row], UIAlertControllerStyle.Alert);
            //okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
            //home.PresentViewController(okAlertController, true, null);

            try
            {
                UIStoryboard           board       = UIStoryboard.FromName("Main", null);
                JourneyTableController journeyCtrl = board.InstantiateViewController("journey") as JourneyTableController;
                if (journeyCtrl != null)
                {
                    journeyCtrl.toFavStation = tableItems[indexPath.Row];
                    home.NavigationController.PushViewController(journeyCtrl, true);
                }
            }catch (Exception e)
            {
                Debug.WriteLine(e.ToString());
            }
            tableView.DeselectRow(indexPath, true);
        }
Пример #2
0
 //Constructor 2
 public TableJourney(List <Section> items, JourneyTableController owner)
 {
     this.owner      = owner;
     this.tableItems = items;
 }