Exemplo n.º 1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var          views = NSBundle.MainBundle.LoadNib("BasketTWCell_iPhone", tableView, null);
            BasketTWCell cell  = Runtime.GetNSObject(views.ValueAt(0)) as BasketTWCell;

            cell.m_bGrayBackgnd = indexPath.Row % 2 == 0 ? true : false;
            cell.update(indexPath.Row);
            int qty = m_tableItems[indexPath.Row].m_weight;

            cell.UpdateCell(m_tableItems[indexPath.Row].m_meal_name, (qty > 0 ? qty.ToString() + " " : "")
                            + m_tableItems[indexPath.Row].m_unit);
            return(cell);
        }
Exemplo n.º 2
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            //[Take Row]
            BasketTWCell cell = tableView.CellAt(indexPath) as BasketTWCell;

            if (cell != null)
            {
                tableView.DeselectRow(indexPath, false);
                if (cell.m_bChecked)
                {
                    m_selectedItems.Add(indexPath);
                }
                else
                {
                    m_selectedItems.Remove(indexPath);
                }
            }
        }