示例#1
0
文件: User.cs 项目: hapm/IrcShark
 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());
 }
示例#2
0
文件: Channel.cs 项目: hapm/IrcShark
 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 = "";
     }
 }