예제 #1
0
 public void threadedLogin(string inputString)
 {
     try
     {
         //Connect to Server
         if (ClientConnection.CheckConnectionMessage(inputString))
         {
             Dispatcher.Invoke(new Action(delegate
             {
                 isLoggedIn                = true;//set this to true for running game!
                 loginButton.Visibility    = Visibility.Hidden;
                 playButton.Visibility     = Visibility.Visible;
                 registerButton.Visibility = Visibility.Hidden;
                 _inputUsername.IsEnabled  = false;
                 _inputPassword.IsEnabled  = false;
                 //PrintMessage("Authorization successfull, Starting Game...");
                 //this.Content = "Authorization successfull, Starting Game...";//set for screen text only
             }));
         }
     }
     catch
     {
         PrintMessage("Connection Error! is the LoginServer Online?");
     }
 }