void Client_PartReceived(Object sender, PartReceivedEventArgs e) { if (e.User != (UserInfo)this) return; if (!IsIn(e.ChannelName)) return; channels.Remove(e.ChannelName); if (channels.Count > 0) return; isValid = false; if (IsValidChanged != null) IsValidChanged(this, new EventArgs()); }
void Client_PartReceived(Object sender, PartReceivedEventArgs e) { if (Disposed) return; if (e.ChannelName != Name) return; if (Status != ChannelStates.In) return; if (e.User.NickName != Client.MyUserInfo.NickName) { ChannelUser user = this[e.User.NickName]; if (UserLeave != null) UserLeave(this, new UserLeaveEventArgs(user, UserLeaveReason.Parted)); NickListValue.Remove(user); } else { StatusValue = ChannelStates.NotIn; if (Parted != null) Parted(this, new PartedEventArgs(this, Client)); NickListValue.Clear(); NamesListenerValue = null; TopicValue = ""; } }