我在下面的代码作为我的XNA游戏的一部分:
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();
}
}
出于某种原因,我收到以下错误:
"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"
我特林添加“System.Windows ......”但似乎这样的“系统”没有“窗口”,在这...
我该如何解决这个问题?