Example #1
0
            public override UITableViewCell GetCell(UITableView aTableView, NSIndexPath aIndexPath)
            {
                CellRoom cell = aTableView.DequeueReusableCell(kCellIdentifier) as CellRoom;

                if (cell == null)
                {
                    CellRoomFactory factory = new CellRoomFactory();
                    NSBundle.MainBundle.LoadNib("CellRoom", factory, null);
                    cell = factory.Cell;
                    if (iStandbyButtonOffsetX != 0)
                    {
                        cell.SetStandbyButtonOffsetX(iStandbyButtonOffsetX);
                    }
                }

                Linn.Kinsky.Room room = iRooms[aIndexPath.Row];

                cell.BackgroundView = new UIView();
                cell.BackgroundView.BackgroundColor = UIColor.Clear;
                cell.BackgroundColor     = UIColor.Clear;
                cell.SelectionStyle      = UITableViewCellSelectionStyle.Gray;
                cell.TextLabel.TextColor = UIColor.White;
                cell.Standby             = room.Standby;

                cell.Position = room.GetHashCode();//aIndexPath.Row;

                cell.Title     = room.Name;
                cell.Accessory = (iRoom == room) ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
                return(cell);
            }