ActivEarth.Competition.Contests.LeaderBoard.PopulateLeaderBoard C# (CSharp) Метод

PopulateLeaderBoard() публичный Метод

Fills the leaderboard with the teams that are passed in.
public PopulateLeaderBoard ( List teams, Color backColors, Color textColors, string scoreFormat, List rewards ) : void
teams List The teams corressponding to the brackets realative to the user.
backColors Color The backcolors the leaderboard should use.
textColors Color The text colors the leaderboard should use.
scoreFormat string The format of each teams score.
rewards List The reward levels of each bracket.
Результат void
        public void PopulateLeaderBoard(List<ContestTeam> teams, Color[] backColors, Color[] textColors, string scoreFormat, List<int> rewards)
        {
            int colorIndex = 0;
            int textIndex = 0;

            foreach (ContestTeam team in teams)
            {
                if (team != null)
                {
                    LeaderBoardTable.Rows.Add(MakeRowForTable(team, backColors[colorIndex], textColors[textIndex], scoreFormat, rewards));

                    colorIndex++;
                    if (colorIndex == backColors.Length)
                    {
                        colorIndex = 0;
                    }

                    textIndex++;
                    if (textIndex == textColors.Length)
                    {
                        textIndex = 0;
                    }
                }
            }
        }