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

PopulateMembersTable_Owner() public method

Formats the table of all Users in the Group with the option to remove users for the Owner of the group.
public PopulateMembersTable_Owner ( 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_Owner(List<User> users, Color[] backColors, Color[] textColors)
        {
            int colorIndex = 0;
            int textIndex = 0;

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

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

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