ActivEarth.Groups.GroupsDisplayTable.MakeRowForTable C# (CSharp) Метод

MakeRowForTable() приватный Метод

Formats a single row to the table using the given Groups.
private MakeRowForTable ( ActivEarth group, Color backColor, Color textColor ) : TableRow
group ActivEarth The group to display in the row
backColor Color The background color to display in the row
textColor Color The text color to display in the row
Результат TableRow
        private TableRow MakeRowForTable(ActivEarth.Objects.Groups.Group group, Color backColor, Color textColor)
        {
            TableRow newRow = new TableRow();
            newRow.BackColor = backColor;
            newRow.Cells.Add(MakeLinkCellForRow(group.Name, group.ID, textColor));
            newRow.Cells.Add(MakeTextCellForRow(group.Description, textColor));
            newRow.Cells.Add(MakeTextCellForRow(group.Owner.UserName, textColor));
            newRow.Cells.Add(MakeTextCellForRow(group.ActivityScore.TotalScore.ToString(), textColor));
            newRow.Cells.Add(MakeTextCellForRow(group.GreenScore.ToString(), textColor));

            if (userDetails.UserID != group.Owner.UserID)
            {
                if (MembersContains(group.Members, userDetails))
                {
                    newRow.Cells.Add(MakeButtonCellForRow(group.ID, 0));
                }
                else
                {
                    newRow.Cells.Add(MakeButtonCellForRow(group.ID, 1));
                }
            }
            else
            {
                newRow.Cells.Add(MakeTextCellForRow("Group Owner", textColor));
            }
            return newRow;
        }