Exemple #1
0
 private void RemoveRoom(RoomObj room)
 {
     if (Rooms.Contains(room))
     {
         Rooms.Remove(new RoomObjExt(room));
         RoomDataUpdated?.Invoke();
     }
 }
Exemple #2
0
 private void AddRoom(RoomObj room)
 {
     if (!Rooms.Contains(room))
     {
         Rooms.AddLast(new RoomObjExt(room));
         RoomDataUpdated?.Invoke();
     }
 }
Exemple #3
0
 private void onRoomDataReceived(RoomObj[] rooms)
 {
     Rooms.Clear();
     foreach (RoomObj room in rooms)
     {
         Rooms.AddLast(new RoomObjExt(room));
     }
     RoomDataUpdated?.Invoke();
 }
Exemple #4
0
        public void CreateRoom(string room)
        {
            RoomObjExt r = new RoomObjExt(room);

            //AddRoom(r);
            RequestManager.CreateRoom(room);
            MessageListUpdated?.Invoke();
            RoomDataUpdated?.Invoke();
        }
Exemple #5
0
 private void AddUser(string room, string username)
 {
     FindRoom(room)?.clients.Add(username);
     RoomDataUpdated?.Invoke();
 }
Exemple #6
0
 private void RemoveUser(string room, string username)
 {
     FindRoom(room)?.clients.Remove(username);
     RoomDataUpdated?.Invoke();
 }