public wpfPlayGame() { InitializeComponent(); //create new score list scoreList = new List <string[]>(); //create new math class calMath = new clsMath(); //create new error handler HandleError = new ErrorHandler(); //create count down timer gameTime = new DispatcherTimer(); hScore = new wpfHighScore(); }
public MainWindow() { InitializeComponent(); //main windown shut up mode Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; //create new wpfplayerinfo window playerInfo = new wpfPlayerInfo(); //create new wpfPlayGame window playGame = new wpfPlayGame(); //create new wpfHighScore window highScore = new wpfHighScore(); //check if player info is empty checkPlayerInfo(); //pass data to playgame window playGame.CopyPlayerInfo = playerInfo; //pass data to highscore from playgame window highScore.copyGameScore = playGame; //pass data to highscore from player info window highScore.copyPlayer = playerInfo; //create new HandleError class HandleError = new ErrorHandler(); }