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

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

Formats a cell to add to the row with a button allowing the User to join the Group if they are not a Member and to leave the Group if the User is not a Member of the Group.
private MakeButtonCellForRow ( int groupID, int leaveOrJoin ) : TableCell
groupID int
leaveOrJoin int 0 if the User is a Member, 1 if the User is not a Member
Результат TableCell
        private TableCell MakeButtonCellForRow(int groupID, int leaveOrJoin)
        {
            TableCell newCell = new TableCell();

            Button b = new Button();
            b.ID = groupID.ToString();
            b.CssClass = "Button";

            if(leaveOrJoin == 0)
            {
                b.Text = "Leave the Group";
                b.Click += new EventHandler(quitClick);
            }
            else
            {
                b.Text = "Join the Group!";
                b.Click += new EventHandler(joinClick);
            }

            newCell.Controls.Add(b);

            return newCell;
        }