I'm having the following code as part of my XNA game:
private void gameOver()
{
if (!m_IsGameOver)
{
string message = String.Format("GAME OVER!!!{0}Your score is: {1}",
Environment.NewLine, GameScore);
if (MessageBox.Show(message, "GameOver", MessageBoxButtons.OK) == DialogResult.OK)
{
this.Exit();
}
m_IsGameOver = true;
}
}
private void gameWon()
{
string message = String.Format("You Won!!!{0}Your score is: {1}",
Environment.NewLine, GameScore);
if (MessageBox.Show(message, "You Won!", MessageBoxButtons.OK) == DialogResult.OK)
{
this.Exit();
}
}
For some reason,I received the following errors:
"The name 'MessageBox' does not exist in the current context"
"The name 'MessageBoxButtons' does not exist in the current context"
"The name 'DialogResult' does not exist in the current context"
I'm tring to add "System.Windows..." but it seems like that "System" does not have "windows" in it...
How can I solve this?