private void ProxyEvent(object sender, ProxyEventArgs e) { foreach (User user in e.GetList()) { users.Add(user); UserEnter?.Invoke(this, new ChatEventArgs { User = user }); } }
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)); }
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)); } } }