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

PopulateMembersTable_Display() public method

Formats the preview table of Users on the Group Page based on the given list of Users and colors.
public PopulateMembersTable_Display ( 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_Display(List<User> users, Color[] backColors, Color[] textColors)
        {
            TableRow imageRow = new TableRow();
            imageRow.BackColor = backColors[0];
            TableRow nameRow = new TableRow();
            nameRow.BackColor = backColors[1];

            for (int i = 0; i < Math.Min(6, users.Count); i++)
            {

                imageRow.Cells.Add(MakeImageCellForRow(users.ElementAt(i)));
                nameRow.Cells.Add(MakeTextCellForRow(users.ElementAt(i).UserName, textColors[1]));

            }

            _usersTable.Rows.Add(imageRow);
            _usersTable.Rows.Add(nameRow);
        }