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

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