コード例 #1
0
        private void ReceiveNewUsersList()
        {
            ClientsNames = new List <string>();
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                ClientsNames.Add(reader.ReadString());
            }
            UsersListUpdate?.Invoke();
        }
コード例 #2
0
 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();
     }
 }