我的 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 ...”,但似乎“System”中没有“windows”...
我该如何解决这个问题?