コード例 #1
0
 public ChangeUserName_AccountSettings(ServiceReference.Player player)
 {
     playerThis   = player;
     playerClient = new ServiceReference.PlayerManagerClient();
     InitializeComponent();
     label_Warning.Content = Properties.Resources.message_WarningChangeUserName;
 }
コード例 #2
0
 public AccountSettings(ServiceReference.Player player)
 {
     playerThis   = player;
     playerClient = new ServiceReference.PlayerManagerClient();
     InitializeComponent();
     label_UserName.Content = player.UserName;
 }
コード例 #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();
     }
 }
コード例 #4
0
 public CreateAccount()
 {
     playerClient = new ServiceReference.PlayerManagerClient();
     newPlayer    = new ServiceReference.Player();
     code         = new ServiceReference.Code();
     InitializeComponent();
     SetHideForm();
 }
コード例 #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);
 }
コード例 #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();
 }
コード例 #7
0
 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();
 }
コード例 #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);
 }
コード例 #9
0
ファイル: Rules.xaml.cs プロジェクト: BrunoLujan/LISWHOFINAL
 public Rules(ServiceReference.Player player)
 {
     playerThis = player;
     InitializeComponent();
 }
コード例 #10
0
 public ChooseBoard(ServiceReference.Player player)
 {
     playerThis = player;
     gameClient = new ServiceReference.GameManagerClient();
     InitializeComponent();
 }