protected virtual void OnUsersOnline(UsersEventArgs e) { UsersEventHendler handler = UsersOnline; if (handler != null) { handler(this, e); } }
void Auth_UsersOnline(object sender, UsersEventArgs e) { if (e.Users.Count != 0) { onlineListView.BeginInvoke(new Action(() => { foreach (UsersEventInfo u in e.Users) { if (u.Name != user.name) { OnlineListAddItem(u.Name, u.Status); } } })); } }