Esempio n. 1
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell("LeagueMatchCell", indexPath);

            var match = MatchesByRound.ElementAt(indexPath.Section).ElementAt(indexPath.Row);

            (cell.ViewWithTag(200) as UILabel).Text = match.Date.ToString();
            (cell.ViewWithTag(201) as UILabel).Text = Teams.First(t => t.Id == match.HomeTeamId).Name;
            (cell.ViewWithTag(202) as UILabel).Text = match.ScoreH.ToString();
            (cell.ViewWithTag(203) as UILabel).Text = Teams.First(t => t.Id == match.AwayTeamId).Name;
            (cell.ViewWithTag(204) as UILabel).Text = match.ScoreA.ToString();

            return(cell);
        }
Esempio n. 2
0
 public override nint RowsInSection(UITableView tableView, nint section)
 {
     return(MatchesByRound.ElementAt(Convert.ToInt16(section)).Count());
 }