/// <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; } }
/// <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; } }
/// <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; } }
/// <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); }
/// <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; }
/// <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(); }
/// <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; }
/// <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);
/// <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(); }
/// <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) { }
/// <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);
/// <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) { }