コード例 #1
0
 private void ProxyEvent(object sender, ProxyEventArgs e)
 {
     foreach (User user in e.GetList())
     {
         users.Add(user);
         UserEnter?.Invoke(this, new ChatEventArgs {
             User = user
         });
     }
 }
コード例 #2
0
        private void AddNewUser(User user)
        {
            User reciver = users.SingleOrDefault(u => u.Name.ToUpperInvariant() == user.Name.ToUpperInvariant());

            if (reciver == null)
            {
                users.Add(user);
            }

            UserEnter?.Invoke(this, new ChatEventArgs(user));
        }
コード例 #3
0
 private static void ProxyEvent(object sender, ProxyEventArgs e)
 {
     foreach (User user in e.GetList())
     {
         if (user.Name != User.AutoExporterServiceName)
         {
             users.Add(user);
             UserEnter?.Invoke(null, new ChatEventArgs(user));
         }
     }
 }