private void ReceiveNewUsersList() { ClientsNames = new List <string>(); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { ClientsNames.Add(reader.ReadString()); } UsersListUpdate?.Invoke(); }
public void UpdateUsersList() { ClientsNames = new List <string>(); foreach (var c in clients) { ClientsNames.Add(c.Name); } UsersListUpdate?.Invoke("User list update"); foreach (var cl in clients) { cl.SendUsersList(); } }