public override UITableViewCell GetCell(UITableView tv) { ChannelCell cell = tv.DequeueReusableCell (Key) as ChannelCell; if (cell == null) { cell = new ChannelCell(Channel); } else { cell.UpdateCell(Channel); } return cell; }
private int CreateChannelCell(Channel channel, int top) { int cellHeight = 0; if (_model.ProgramsByChannel.ContainsKey(channel.ChannelId)) { bool isTop = (top == 0); cellHeight = isTop ? _height : (_height - 1); ChannelCell cell = new ChannelCell() { Channel = channel, IsTop = isTop, Rectangle = new Rectangle(0, top, (int)(100 * _widthFactor), cellHeight) }; _channelCells.Add(cell); } return(top + cellHeight); }
private int CreateChannelCell(Channel channel, int top) { int cellHeight = 0; if (_model.ProgramsByChannel.ContainsKey(channel.ChannelId)) { bool isTop = (top == 0); cellHeight = isTop ? _height : (_height - 1); ChannelCell cell = new ChannelCell() { Channel = channel, IsTop = isTop, Rectangle = new Rectangle(0, top, (int) (100 * _widthFactor), cellHeight) }; _channelCells.Add(cell); } return top + cellHeight; }
private int CreateChannelCell(Channel channel, int top) { int cellHeight = 0; if (_model.ProgramsByChannel.ContainsKey(channel.ChannelId)) { bool isTop = (top == 0); cellHeight = isTop ? 71 : 70; ChannelCell cell = new ChannelCell(); cell.Channel = channel; cell.IsTop = isTop; cell.Rectangle = new Rectangle(0, top, 100, cellHeight); _channelCells.Add(cell); } return top + cellHeight; }