Beispiel #1
0
 public ChangeUserName_AccountSettings(ServiceReference.Player player)
 {
     playerThis   = player;
     playerClient = new ServiceReference.PlayerManagerClient();
     InitializeComponent();
     label_Warning.Content = Properties.Resources.message_WarningChangeUserName;
 }
 public AccountSettings(ServiceReference.Player player)
 {
     playerThis   = player;
     playerClient = new ServiceReference.PlayerManagerClient();
     InitializeComponent();
     label_UserName.Content = player.UserName;
 }
Beispiel #3
0
 private void Button_LogIn_Click(object sender, RoutedEventArgs e)
 {
     try {
         if (textBox_UserName.Text != "" && passwordBox_Password.Password != "")
         {
             string encryptedPassword = playerClient.EncryptPassword(passwordBox_Password.Password);
             ServiceReference.Player PlayerLogging = playerClient.LogIn(textBox_UserName.Text, encryptedPassword);
             if (PlayerLogging != null)
             {
                 Lobby lobby = new Lobby(PlayerLogging);
                 lobby.Show();
                 this.Close();
             }
             else
             {
                 label_Message.Content = Properties.Resources.message_WrongPasswordUserName;
             }
         }
         else
         {
             label_Message.Content = Properties.Resources.message_CompleteFieldsPasswordEmail;
         }
     } catch (Exception ex) {
         ServerFailed serverFailed = new ServerFailed();
         serverFailed.Show();
         this.Close();
     }
 }
Beispiel #4
0
 public CreateAccount()
 {
     playerClient = new ServiceReference.PlayerManagerClient();
     newPlayer    = new ServiceReference.Player();
     code         = new ServiceReference.Code();
     InitializeComponent();
     SetHideForm();
 }
Beispiel #5
0
 public Lobby(ServiceReference.Player player)
 {
     playerThis   = player;
     playerClient = new ServiceReference.PlayerManagerClient();
     gameClient   = new ServiceReference.GameManagerClient();
     InitializeComponent();
     label_UserName.Content = playerThis.UserName;
     label_EE.Content       = "EE: " + playerClient.GetScore(playerThis.UserName);
 }
Beispiel #6
0
 public StudentBoard(ServiceReference.Player player, int idGame)
 {
     InitializeComponent();
     playerThis      = player;
     playerInstance  = new InstanceContext(this);
     gameClient      = new ServiceReference.GameManagerClient();
     startGameClient = new ServiceReference.StartGameManagerClient(playerInstance);
     this.idGame     = idGame;
     startGameClient.ConnectToStartGame(playerThis.UserName);
     InitializeBoard();
 }
 private void SendPlayer()
 {
     ServiceReference.Player player = new ServiceReference.Player();
     ServiceReference.PlayerManagerClient client = new ServiceReference.PlayerManagerClient();
     player.UserName = textBox_UserName.Text;
     player.Password = passwordBox_Password.Password;
     player.Email    = textBox_Email.Text;
     player.Score    = "0";
     client.AddPlayer(player);
     client.Close();
 }
Beispiel #8
0
 public TeacherMatchBoard(ServiceReference.Player player, int idGame, int idSelectedCharacter)
 {
     playerInstance = new InstanceContext(this);
     playerClient   = new ServiceReference.PlayerManagerClient();
     gameClient     = new ServiceReference.GameManagerClient();
     chatClient     = new ServiceReference.ChatManagerClient(playerInstance);
     music          = new SoundPlayer();
     InitializeComponent();
     playerThis  = player;
     this.idGame = idGame;
     this.idSelectedCharacter = idSelectedCharacter;
     InitializeMusic();
     chatClient.ConnectToChat(playerThis.UserName);
     ShowSelectedCharacter();
     chatClient.InitializeGameChat(idGame, playerThis.UserName);
     label_Message.Content    = playerThis.UserName;
     label_Message_EE.Content = "EE: " + playerClient.GetScore(playerThis.UserName);
 }
Beispiel #9
0
 public Rules(ServiceReference.Player player)
 {
     playerThis = player;
     InitializeComponent();
 }
Beispiel #10
0
 public ChooseBoard(ServiceReference.Player player)
 {
     playerThis = player;
     gameClient = new ServiceReference.GameManagerClient();
     InitializeComponent();
 }