ActivEarth.Groups.MembersDisplayTable.PopulateMembersTable_SeeAll C# (CSharp) Method

PopulateMembersTable_SeeAll() public method

Formats the table of all Users in the Group based on the given list of Users and colors.
public PopulateMembersTable_SeeAll ( List users, Color backColors, Color textColors ) : void
users List The list of users to display in the table
backColors Color The list of alternating background colors to display in the table
textColors Color The list of alternating text colors to display in the table
return void
        public void PopulateMembersTable_SeeAll(List<User> users, Color[] backColors, Color[] textColors)
        {
            int colorIndex = 0;
            int textIndex = 0;

            foreach (User user in users)
            {
                _usersTable.Rows.Add(MakeRowForSeeAllTable(user, backColors[colorIndex], textColors[textIndex]));

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

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