public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var section = indexPath.Section;
            var row     = indexPath.Row;

            if (section == 1)
            {
                if (row == 1)
                {
                    var values = new List <BuildOrder>()
                    {
                        BuildOrder.BuildName, BuildOrder.BuildTime
                    };

                    var groupController =
                        new RadioGroupTableViewController("Build ordering", new [] { "Build name", "Build time" }, values.IndexOf(model.Ordering));

                    groupController.RowSelected = delegate(int n) {
                        model.Ordering = values[n];
                        Console.WriteLine("Changed ordering to " + values[n]);
                    };

                    controller.NavigationController.PushViewController(groupController, true);
                }
            }
        }
Ejemplo n.º 2
0
 public RadioGroupTableViewSource(RadioGroupTableViewController controller, string headline, IList <string> labels, int selected)
 {
     this.cell       = new UITableViewCell[labels.Count];
     this.controller = controller;
     this.headline   = headline;
     this.selected   = selected;
     this.labels     = labels;
 }
		public RadioGroupTableViewSource(RadioGroupTableViewController controller, string headline, IList<string> labels, int selected) 
		{
			this.cell = new UITableViewCell[labels.Count];
			this.controller = controller;
			this.headline = headline;
			this.selected = selected;
			this.labels = labels;
		}
		public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
		{
			var section = indexPath.Section;
			var row = indexPath.Row;
			
			if (section == 1)
			{
				if (row == 1) {
					var values = new List<BuildOrder>() { BuildOrder.BuildName, BuildOrder.BuildTime };
					
					var groupController = 
						new RadioGroupTableViewController("Build ordering", new [] {"Build name", "Build time"}, values.IndexOf(model.Ordering));
					
					groupController.RowSelected = delegate(int n) {
						model.Ordering = values[n];
						Console.WriteLine("Changed ordering to " + values[n]);
					};
					
					controller.NavigationController.PushViewController(groupController, true);
				}
			}
		}