public void NotifyWinnerEndGame()
        {
            PlaySoundWinnerCharacter(idSelectedCharacter);
            playerClient.AddOneScore(playerThis.UserName);
            MessageBox.Show(Properties.Resources.message_WinnerPass, Properties.Resources.message_Congrats, MessageBoxButton.OK, MessageBoxImage.Information);
            chatClient.ExitChat(playerThis.UserName);
            gameClient.ExitGame(playerThis.UserName, idGame);
            Lobby lobby = new Lobby(playerThis);

            this.Close();
            lobby.Show();
            music.SoundLocation = path + "/Resources/MENU.wav";
            music.PlayLooping();
            music.Dispose();
        }
Example #2
0
 private void LeftGame()
 {
     try {
         Lobby lobby = new Lobby(playerThis);
         gameClient.ExitGame(playerThis.UserName, idGame);
         startGameClient.ExitStartGame(playerThis.UserName);
         lobby.Show();
         this.Close();
     } catch (Exception) {
         ServerFailed serverFailed = new ServerFailed();
         serverFailed.Show();
         this.Close();
     }
 }