public virtual void OnChannelInfoChanged (ChannelEventArgs e) { if (ChannelInfoChanged != null) ChannelInfoChanged (this, e); }
void HandleChannelInfoChanged (object sender, ChannelEventArgs e) { Application.Instance.AsyncInvoke (delegate { if (SelectedChannel == e.Channel && this.ParentWindow.HasFocus) { e.Channel.ResetUnreadCount (); } SetUnreadCount(); Update (); }); }
protected virtual void OnCloseChannel (ChannelEventArgs e) { this.channels.Remove (e.Channel); if (CloseChannel != null) CloseChannel (this, e); }
void HandleCloseChannel (object sender, ChannelEventArgs e) { Application.Instance.AsyncInvoke (delegate { var isSelected = channelList.SelectedItem == e.Channel; RemoveSection (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)); }); }