void HandleChannelInfoChanged(object sender, ChannelEventArgs e) { Application.Instance.AsyncInvoke(delegate { if (SelectedChannel == e.Channel && ParentWindow.HasFocus) { e.Channel.ResetUnreadCount(); } SetUnreadCount(); Update(); }); }
public virtual void OnChannelInfoChanged(ChannelEventArgs e) { if (ChannelInfoChanged != null) ChannelInfoChanged(this, e); }
void HandleCloseChannel(object sender, ChannelEventArgs e) { Application.Instance.Invoke(delegate { var isSelected = channelList.SelectedItem == e.Channel; RemoveSection(e.Channel.Server, e.Channel); Update(); if (isSelected) channelList.SelectedItem = e.Channel.Server; var serverSection = GetServerSection(e.Channel.Server); serverSection.AddNotification(new NotificationMessage("You have left {0}", e.Channel.Name)); }); }
protected virtual void OnCloseChannel(ChannelEventArgs e) { this.channels.Remove(e.Channel); if (CloseChannel != null) CloseChannel(this, e); }