圖中報錯的兩個應該怎么改?
private void ExamScore()
{
int sum = 0;
if (this.radioButton1.Checked) sum += 20;
if (this.radioButton6.Checked) sum += 20;
if (this.radioButton11.Checked) sum += 20;
if (this.radioButton16.Checked) sum += 20;
if (this.radioButton20.Checked) sum += 20; this.timer1.Enabled = false; this.btnGrade.Enabled = false; this.TotalScore.Text = sum.ToString();
}
private void btnGrade_Click(object sender, EventArgs e)
{
if(MessageBox.Show(this,
"確定要交卷嗎?是,請單擊'確定\n'按鈕;否則,請單擊'取消'按鈕。","提示",
MessageBoxButtons.OKCancel,OKCancel,MessageBox1con.Question) == DialogResult.OK) ExamScore();
}
uj5u.com熱心網友回復:
MessageBox.Show("用戶名或者密碼不能為空","登錄提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Exclamation)
uj5u.com熱心網友回復:
if(MessageBox.Show("確定交卷?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information)==DialogResult.OK);uj5u.com熱心網友回復:
OKCancel不能直接用,應該是MessageBoxButtons.OkCancel。uj5u.com熱心網友回復:
是不是打了2個okcancle轉載請註明出處,本文鏈接:https://www.uj5u.com/net/34552.html
標籤:C#
