Exemple #1
0
 public UserListRow(PnlUserList parent, GPG.Multiplayer.Client.Clans.ClanMember clanMember, UserListStyles style, UserListCategories initialCategory)
 {
     this.PlayerAwards = null;
     this.PlayerStatus = null;
     this.mCategory = UserListCategories.Online;
     this.mPreviousRow = null;
     this.mNextRow = null;
     this.mIsSelected = false;
     this.LastCategory = null;
     this.ClanRankImage = null;
     this.Award1Image = null;
     this.Award2Image = null;
     this.Award3Image = null;
     this.AvatarImage = null;
     this.StatusImage = null;
     this.ClanLabelBounds = null;
     this.mParent = parent;
     this.mClanMember = clanMember;
     this.mStyle = style;
     this.mCategory = initialCategory;
     this.Parent.MouseMove += new MouseEventHandler(this.Parent_MouseMove);
     this.Parent.MouseDown += new MouseEventHandler(this.Parent_MouseDown);
     this.Parent.MouseUp += new MouseEventHandler(this.Parent_MouseUp);
     this.BindToClanMember(clanMember);
 }
Exemple #2
0
 public bool CanTargetAbility(ClanAbility ability, ClanMember target)
 {
     if (!this.HasAbility(ability))
     {
         return false;
     }
     if (ability == ClanAbility.Promote)
     {
         return (this.Rank < (target.Rank - 1));
     }
     if (ability == ClanAbility.Demote)
     {
         return ((this.Rank < target.Rank) && (target.Rank < ClanRanking.MinValue.Seniority));
     }
     if (ability == ClanAbility.Remove)
     {
         return (this.Rank < target.Rank);
     }
     return true;
 }
Exemple #3
0
 private UserListCategories DetermineUserCategory(ClanMember member)
 {
     return (UserListCategories) Enum.Parse(typeof(UserListCategories), "Clan_Rank" + member.Rank.ToString());
 }
Exemple #4
0
 public void BindToClanMember(GPG.Multiplayer.Client.Clans.ClanMember member, UserListCategories initialCategory)
 {
     this.mClanMember = member;
     this.mCategory = initialCategory;
     try
     {
         if (!member.Online)
         {
             this.NameColor = Program.Settings.Chat.Appearance.UnavailableColor;
             this.NameFont = DefaultFont;
         }
         else
         {
             this.NameColor = Program.Settings.Chat.Appearance.DefaultColor;
             this.NameFont = DefaultFont;
         }
         this.ClanRankImage = member.GetRanking().Image;
         if (member.Online)
         {
             this.PlayerStatus = UserStatus.None;
         }
         else
         {
             this.PlayerStatus = UserStatus.Offline;
         }
         if (this.PlayerStatus != null)
         {
             this.StatusImage = this.PlayerStatus.Icon;
         }
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
 }
Exemple #5
0
 public bool IsAvailable(ClanMember member)
 {
     return this.IsAvailable(member.Rank);
 }
Exemple #6
0
 public int GetMembersByRank(int rank, out ClanMember[] rMembers)
 {
     ClanMember[] memberArray = Clan.CurrentMembers.ToArray();
     List<ClanMember> list = new List<ClanMember>();
     for (int i = 0; i < memberArray.Length; i++)
     {
         if (memberArray[i].Rank == rank)
         {
             list.Add(memberArray[i]);
         }
     }
     rMembers = list.ToArray();
     return rMembers.Length;
 }
Exemple #7
0
 private bool ClanChangeRank(ClanMember member, int newRank)
 {
     if (DataAccess.ExecuteQuery("ChangeRank", new object[] { newRank, member.ID, Clan.Current.ID }))
     {
         member.Rank = newRank;
         return true;
     }
     this.SystemMessage("<LOC>Unable to change the clan member's rank at this time.", new object[0]);
     return false;
 }
Exemple #8
0
 private void AddClanParticipant(ClanMember member)
 {
     this.pnlUserListClan.RefreshData();
 }