if (MessageBox.Show("内容", "标题", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { }