private void RemoveRoom(RoomObj room) { if (Rooms.Contains(room)) { Rooms.Remove(new RoomObjExt(room)); RoomDataUpdated?.Invoke(); } }
private void AddRoom(RoomObj room) { if (!Rooms.Contains(room)) { Rooms.AddLast(new RoomObjExt(room)); RoomDataUpdated?.Invoke(); } }
private void onRoomDataReceived(RoomObj[] rooms) { Rooms.Clear(); foreach (RoomObj room in rooms) { Rooms.AddLast(new RoomObjExt(room)); } RoomDataUpdated?.Invoke(); }
public void CreateRoom(string room) { RoomObjExt r = new RoomObjExt(room); //AddRoom(r); RequestManager.CreateRoom(room); MessageListUpdated?.Invoke(); RoomDataUpdated?.Invoke(); }
private void AddUser(string room, string username) { FindRoom(room)?.clients.Add(username); RoomDataUpdated?.Invoke(); }
private void RemoveUser(string room, string username) { FindRoom(room)?.clients.Remove(username); RoomDataUpdated?.Invoke(); }