Example #1
0
 public UserListRow(PnlUserList parent, GPG.Multiplayer.Quazal.User user, 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.mUser = user;
     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.BindToUser(this.User);
 }
Example #2
0
 public void BindToUser(GPG.Multiplayer.Quazal.User user, UserListCategories initialCategory)
 {
     this.mUser = user;
     this.mCategory = initialCategory;
     this.Award1Image = null;
     this.Award2Image = null;
     this.Award3Image = null;
     try
     {
         this.NameColor = Program.Settings.Chat.Appearance.DefaultColor;
         this.NameFont = DefaultFont;
         this.PlayerAwards = new PlayerDisplayAwards(user);
         if (!AvatarCache.ContainsKey(this.PlayerAwards.Avatar.ID))
         {
             AvatarCache[this.PlayerAwards.Avatar.ID] = DrawUtil.CopyImage(this.PlayerAwards.Avatar.Image);
         }
         this.AvatarImage = AvatarCache[this.PlayerAwards.Avatar.ID];
         if (this.PlayerAwards.Award1Specified)
         {
             this.Award1Image = this.PlayerAwards.Award1.SmallImage;
         }
         if (this.PlayerAwards.Award2Specified)
         {
             this.Award2Image = this.PlayerAwards.Award2.SmallImage;
         }
         if (this.PlayerAwards.Award3Specified)
         {
             this.Award3Image = this.PlayerAwards.Award3.SmallImage;
         }
         if (!(((!user.IsAway && !user.IsDND) && !user.IsIgnored) && user.Online))
         {
             this.NameColor = Program.Settings.Chat.Appearance.UnavailableColor;
             this.NameFont = DefaultFont;
         }
         else if (user.IsAdmin || ((Chatroom.InChatroom && !Chatroom.Current.IsPersistent) && user.IsChannelOperator))
         {
             this.NameColor = Program.Settings.Chat.Appearance.AdminColor;
             this.NameFont = AdminFont;
         }
         else if (user.IsModerator)
         {
             this.NameColor = Program.Settings.Chat.Appearance.ModeratorColor;
             this.NameFont = Program.Settings.Chat.Appearance.ModeratorFont;
         }
         else
         {
             this.NameColor = Program.Settings.Chat.Appearance.DefaultColor;
             this.NameFont = DefaultFont;
         }
         if (this.NameColor == Color.Empty)
         {
             this.NameColor = Program.Settings.Chat.Appearance.DefaultColor;
         }
         if (this.NameFont == null)
         {
             this.NameFont = DefaultFont;
         }
         this.PlayerStatus = UserStatus.GetStatus(user);
         if (this.PlayerStatus != null)
         {
             this.StatusImage = this.PlayerStatus.Icon;
         }
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
 }
Example #3
0
 public void MoveToCategory(UserListCategory category)
 {
     if (this.LastCategory != null)
     {
         this.LastCategory.RemoveRow(this);
     }
     this.mCategory = category.Category;
     category.AddRow(this);
     this.LastCategory = category;
 }
Example #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);
     }
 }