示例#1
0
 void OnConnect(RPCConnectResult result)
 {
     try
     {
         if (result.Success())
         {
             Connected = true;
             WriteLine("Successfully connected to the server");
             TerminateUpdateThread();
             lock (TerminationEvent)
             {
                 AutomaticUpdatesThread      = new Thread(RunAutomaticUpdates);
                 AutomaticUpdatesThread.Name = string.Format("{0} Automatic updates", Profile.Description);
                 AutomaticUpdatesThread.Start();
             }
         }
         else
         {
             if (result.Result == RPCConnectResultType.LoginFault && result.FlexLoginFault.FaultString == "com.riotgames.platform.login.LoginFailedException : null")
             {
                 WriteLine("The server has placed this client in the login queue. Please be patient.");
             }
             else
             {
                 WriteLine(result.GetMessage());
             }
             TerminationEvent.WaitOne(Configuration.ReconnectDelay);
             ConnectInThread();
         }
     }
     catch (Exception exception)
     {
         GlobalHandler.HandleException(exception);
     }
 }
示例#2
0
 void OnConnect(RPCConnectResult result)
 {
     ConnectionSuccess = result.Success();
     Output.WriteLine(result.GetMessage());
     OnConnectEvent.Set();
 }