private void ToCloseThisForm() { DialogResult dr = FormMessBox.Show("提示", "是否确认退出!", MessageBoxButtons.YesNo); if (dr == DialogResult.OK || dr == DialogResult.Yes) { this.Close(); } }
public static DialogResult Show(string title, string mess, MessageBoxButtons buttons) { FormMessBox box = new FormMessBox(title, mess, buttons); return(box.ShowDialog()); }