예제 #1
0
        private void Quit()
        {
            updateGamePageData();

            PlayerDB.getDB().saveGame(this.gamePageData);
            MainWindow.exit();
        }
예제 #2
0
        private void Quit()
        {
            /* Writes the correct time and turn count in GamePageData */
            updateGamePageData();

            PlayerDB.getDB().saveGame(this.gamePageData);
            MainWindow.exit();
        }
예제 #3
0
        /**
         * Button pressed after name is entered.
         *
         * @author karina
         **/
        private void sendBtn_Click(object sender, RoutedEventArgs e)
        {
            string name = nameTxt.Text;

            nameTxt.Visibility     = Visibility.Hidden;
            sendBtn.Visibility     = Visibility.Hidden;
            newBtn.Visibility      = Visibility.Visible;
            continueBtn.Visibility = Visibility.Hidden;

            if (PlayerDB.getDB().isPlayerExist(name))
            {
                Narrator.displayNameFoundSaved(msgTxt, name);
                continueBtn.Visibility = Visibility.Visible;
            }
            else
            {
                Narrator.newName(msgTxt, name);
            }
        }
예제 #4
0
 public static void exit()
 {
     PlayerDB.getDB().saveDB();
     System.Windows.Application.Current.Shutdown();
 }
예제 #5
0
 private void goToGame(string playerFileName)
 {
     //Load and deserialize file at playerFileName
     this.NavigationService.Navigate(new Game(PlayerDB.getDB().loadGame(playerFileName)));
 }
예제 #6
0
 private void goToGame(string playerFileName)
 {
     this.NavigationService.Navigate(new Game(PlayerDB.getDB().loadGame(playerFileName)));
 }