Esempio n. 1
0
 public void Disconnect()
 {
     Message("Loader.Disconnect() called");
     State = GameState.StoppingGameWindow;
     ConnectionLoop.Disconnect();
     ConnectionLoop = null;
     State = GameState.InLoader;
     Message("Loader.Disconnect() completed");
 }
Esempio n. 2
0
 public void InitiateConnectionThread()
 {
     try {
         Message("InitiateConnectionThread() Thread started, connecting.");
         ConnectionLoop = new ConnectionLoop(this);
         ConnectionLoop.StartConnect(_hostname, 4100, _username, _password);
         ConnectionLoop.Disconnect();
         //ConnectionLoop = null;
         Message("InitiateConnectionThread() stopped after Run()");
     }
     catch (ThreadAbortException ex) {
         Console.WriteLine(ex.ToString());
         throw ex;
     }
     catch (Exception ex) {
         Console.WriteLine(ex.ToString());
         if (ConnectionLoop != null) {
             ConnectionLoop.Disconnect();
             ConnectionLoop = null;
         }
         // TODO: FixMe
     }
     Message("InitiateConnectionThread() at end");
 }