if (MessageBox.Show("确定要退出吗?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel) {} MessageBoxButtons messButton = MessageBoxButtons.OKCancel; DialogResult dialogResult = MessageBox.Show("是否确定选择Specification Configure文件?", "Configure文件", messButton); if (dialogResult == DialogResult.OK) {}