private void Exit(object sender, KeyEventArgs e) { MainWindow newGame = new MainWindow(); newGame.Show(); this.Close(); chessboardInstance.Close(); }