Ejemplo n.º 1
0
        public override void Draw(CoreGraphics.CGRect bounds, CoreGraphics.CGContext context, UIKit.UIView view)
        {
            UIColor.White.SetFill ();
            context.FillRect (bounds);

            if (this.cell == null) {
                this.cell = new CheckPointTableCell ();
                view.AddSubview (cell);
            }
            cell.RenderCheckpointForDetail(this.data);

            view.LayoutIfNeeded ();
        }
Ejemplo n.º 2
0
        public bool AttachUtilityButtonsToCell(CheckPointTableCell cell)
        {
            var cmdsForThisCell = this.CreateCommands ();
            var grouped = cmdsForThisCell
                .Where (u => u.ShouldDecorate (cell.CheckPoint))
                .Where(u=>(u as IDialogBoundCommand)==null)
                .GroupBy (u => u.Category, c => c.AsButton ());

            foreach(var g in grouped)
            {
                if (g.Key == "Left")
                    cell.LeftUtilityButtons = g.ToArray ();
                else if (g.Key == "Right")
                    cell.RightUtilityButtons = g.ToArray ();
            }
            return true;
        }
        CheckPointTableCell CheckPointTableCellFactory(UITableView tableView, CheckPoint checkpoint)
        {
            var cell = tableView.DequeueReusableCell (CheckPointTableCell.Key) as CheckPointTableCell;

            if (cell == null)
                cell = new CheckPointTableCell ()
                    {Delegate = this.Controller.UtilityButtonHandler};

            cell.RenderCheckpoint (checkpoint);
            Controller.Commands.AttachUtilityButtonsToCell (cell);
            return cell;
        }