Inheritance: PartyElement
Example #1
0
File: Team.cs Project: gwupe/Gwupe
 public void InitTeam(TeamElement teamElement)
 {
     InitParty(teamElement);
     bool foundMe = false;
     var currentUsername = GwupeClientAppContext.CurrentAppContext.CurrentUserManager.CurrentUser.Username;
     _teamMembers.Clear();
     _playerRequest = null;
     foreach (var teamMemberElement in teamElement.teamMembers)
     {
         var teamMember = new TeamMember(teamMemberElement);
         _teamMembers.Add(teamMember);
         Logger.Debug("Adding team member " + teamMember);
         if (!foundMe && teamMember.Username.Equals(currentUsername))
         {
             Logger.Debug("Found myself in the team list, adding my membership status " + teamMember);
             Admin = teamMember.Admin;
             Player = teamMember.Player;
             foundMe = true;
         }
     }
     if (!foundMe)
     {
         Admin = false;
         Player = PlayerMembership.none;
     }
 }
Example #2
0
File: Team.cs Project: gwupe/Gwupe
 public Team(TeamElement teamElement)
 {
     InitTeam(teamElement);
 }
Example #3
0
 internal Attendance(TeamElement element)
     : this(new Team(element))
 {
 }