Ejemplo n.º 1
0
        /// <summary>
        /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
        /// </summary>
        /// <param name="newValue">The new value.</param>
        /// <param name="oldValue">The old value.</param>
        protected override void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
        {
            base.OnGuildInfoChanged(newValue, oldValue);

            if (oldValue != null)
            {
                oldValue.OnlineMemberAdded   -= _updateHandler;
                oldValue.OnlineMemberRemoved -= _updateHandler;
            }

            if (newValue != null)
            {
                newValue.OnlineMemberAdded   += _updateHandler;
                newValue.OnlineMemberRemoved += _updateHandler;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
        /// </summary>
        /// <param name="newValue">The new value.</param>
        /// <param name="oldValue">The old value.</param>
        protected override void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
        {
            base.OnGuildInfoChanged(newValue, oldValue);

            if (oldValue != null)
            {
                oldValue.OnlineMemberAdded -= _updateHandler;
                oldValue.OnlineMemberRemoved -= _updateHandler;
            }

            if (newValue != null)
            {
                newValue.OnlineMemberAdded += _updateHandler;
                newValue.OnlineMemberRemoved += _updateHandler;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
        /// </summary>
        /// <param name="newValue">The new value.</param>
        /// <param name="oldValue">The old value.</param>
        protected override void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
        {
            base.OnGuildInfoChanged(newValue, oldValue);

            if (_frmOnline != null)
            {
                _frmOnline.GuildInfo  = newValue;
                _frmMembers.GuildInfo = newValue;
            }

            UpdateGuildStatus();

            if (oldValue != null)
            {
                oldValue.GuildChanged -= UserGuildInfo_GuildChanged;
            }

            if (newValue != null)
            {
                newValue.GuildChanged += UserGuildInfo_GuildChanged;
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// When overridden in the derived class, gets the items to display in the list.
 /// </summary>
 /// <returns>The items to display in the list.</returns>
 protected override IEnumerable <GuildMemberNameRank> GetListItems(UserGuildInformation guildInfo)
 {
     return(guildInfo.Members);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// When overridden in the derived class, gets the items to display in the list.
 /// </summary>
 /// <returns>The items to display in the list.</returns>
 protected override IEnumerable<GuildMemberNameRank> GetListItems(UserGuildInformation guildInfo)
 {
     return guildInfo.OnlineMembers;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Handles the corresponding event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 void UserGuildInfo_GuildChanged(UserGuildInformation sender, EventArgs e)
 {
     UpdateGuildStatus();
 }
Ejemplo n.º 7
0
        /// <summary>
        /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
        /// </summary>
        /// <param name="newValue">The new value.</param>
        /// <param name="oldValue">The old value.</param>
        protected override void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
        {
            base.OnGuildInfoChanged(newValue, oldValue);

            if (_frmOnline != null)
            {
                _frmOnline.GuildInfo = newValue;
                _frmMembers.GuildInfo = newValue;
            }

            UpdateGuildStatus();

            if (oldValue != null)
                oldValue.GuildChanged -= UserGuildInfo_GuildChanged;

            if (newValue != null)
                newValue.GuildChanged += UserGuildInfo_GuildChanged;
        }
Ejemplo n.º 8
0
 /// <summary>
 /// When overridden in the derived class, gets the items to display in the list.
 /// </summary>
 /// <param name="guildInfo">The guild info. Cannot be null.</param>
 /// <returns>The items to display in the list.</returns>
 protected abstract IEnumerable<GuildMemberNameRank> GetListItems(UserGuildInformation guildInfo);
Ejemplo n.º 9
0
 /// <summary>
 /// Handles the corresponding event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 void UserGuildInfo_GuildChanged(UserGuildInformation sender, EventArgs e)
 {
     UpdateGuildStatus();
 }
Ejemplo n.º 10
0
 /// <summary>
 /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
 /// </summary>
 /// <param name="newValue">The new value.</param>
 /// <param name="oldValue">The old value.</param>
 protected virtual void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
 {
 }
Ejemplo n.º 11
0
 /// <summary>
 /// When overridden in the derived class, gets the items to display in the list.
 /// </summary>
 /// <param name="guildInfo">The guild info. Cannot be null.</param>
 /// <returns>The items to display in the list.</returns>
 protected abstract IEnumerable <GuildMemberNameRank> GetListItems(UserGuildInformation guildInfo);
Ejemplo n.º 12
0
 /// <summary>
 /// When overridden in the derived class, handles when the <see cref="UserGuildInformation"/> changes.
 /// </summary>
 /// <param name="newValue">The new value.</param>
 /// <param name="oldValue">The old value.</param>
 protected virtual void OnGuildInfoChanged(UserGuildInformation newValue, UserGuildInformation oldValue)
 {
 }