private void ReceivedRoomsList(ServerHubClient sender, List <RoomInfo> rooms)
 {
     _roomsList.AddRange(rooms.Select(x => new ServerHubRoom(sender.ip, sender.port, x)));
     HMMainThreadDispatcher.instance.Enqueue(delegate()
     {
         Misc.Logger.Info($"Received rooms from {sender.ip}:{sender.port}! Total rooms count: {_roomsList.Count}");
         _roomListViewController.SetRooms(_roomsList);
         _serverHubNavigationController.SetLoadingState(false);
     });
 }
Esempio n. 2
0
 public void ServerHubException(ServerHubClient sender, Exception e)
 {
     if (!string.IsNullOrEmpty(sender.serverHubName))
     {
         Plugin.log.Error($"ServerHub exception \"{sender.serverHubName}\" ({sender.ip}:{sender.port}): {e}");
     }
     else
     {
         Plugin.log.Error($"ServerHub exception ({sender.ip}:{sender.port}): {e}");
     }
 }
Esempio n. 3
0
 private void ReceivedRoomsList(ServerHubClient sender, List <RoomInfo> rooms)
 {
     _roomsList.AddRange(rooms.Select(x => new ServerHubRoom(sender.ip, sender.port, x)));
     HMMainThreadDispatcher.instance.Enqueue(delegate()
     {
         if (!string.IsNullOrEmpty(sender.serverHubName))
         {
             Plugin.log.Info($"Received rooms from \"{sender.serverHubName}\" ({sender.ip}:{sender.port})! Total rooms count: {_roomsList.Count}");
         }
         else
         {
             Plugin.log.Info($"Received rooms from {sender.ip}:{sender.port}! Total rooms count: {_roomsList.Count}");
         }
         _roomListViewController.SetRooms(_roomsList);
         _serverHubNavigationController.SetLoadingState(false);
         _roomListViewController.SetRefreshButtonState(true);
     });
 }
Esempio n. 4
0
 public void ServerHubException(ServerHubClient sender, Exception e)
 {
     Plugin.log.Error($"ServerHub exception ({sender.ip}:{sender.port}): {e}");
 }
        public void ServerHubSelected(ServerHubClient serverHubClient)
        {
            _selectedServerHub = serverHubClient;

            PresentViewController(_mainRoomCreationViewController);
        }
 public void ServerHubException(ServerHubClient sender, Exception e)
 {
     Misc.Logger.Error($"ServerHub exception ({sender.ip}:{sender.port}): {e}");
 }