private void Quit() { updateGamePageData(); PlayerDB.getDB().saveGame(this.gamePageData); MainWindow.exit(); }
private void Quit() { /* Writes the correct time and turn count in GamePageData */ updateGamePageData(); PlayerDB.getDB().saveGame(this.gamePageData); MainWindow.exit(); }
/** * 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); } }
public static void exit() { PlayerDB.getDB().saveDB(); System.Windows.Application.Current.Shutdown(); }
private void goToGame(string playerFileName) { //Load and deserialize file at playerFileName this.NavigationService.Navigate(new Game(PlayerDB.getDB().loadGame(playerFileName))); }
private void goToGame(string playerFileName) { this.NavigationService.Navigate(new Game(PlayerDB.getDB().loadGame(playerFileName))); }