如何讓Xwinnerform保持最佳狀態保持主窗體不被點擊,我嘗試了ShowDialog,但無法使其工作。顯示對話框問題
static public bool CheckWinner(Button[] myControls)
{
//bolean statement to check for the winner
bool gameOver = false;
for (int i = 0; i < 8; i++)
{
int a = Winners[i, 0];
int b = Winners[i, 1];
int c = Winners[i, 2];
Button b1 = myControls[a], b2 = myControls[b], b3 = myControls[c];
if (b1.Text == "" || b2.Text == "" || b3.Text == "")
continue;
if (b1.Text == b2.Text && b2.Text == b3.Text)
{
xWinnerForm xWinnerForm = new xWinnerForm();
xWinnerForm.ShowDialog(b1.Text + " is the Winner");
}
}
return gameOver;
}
enter code here
「......不能讓它開始工作」的說法太含糊。什麼不行? – Thomas 2010-05-24 16:50:55
你能解釋一下「不能工作嗎?」 ShowDialog是適當的方法。 – 2010-05-24 16:51:40
它說'名稱'的最佳重載方法匹配有一些無效參數 – 2010-05-24 16:53:17