using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; namespace PDAForm.Comm { public class MyMessageBox { public static void ShowErrorMessage(string MessageInfo) { MessageBox.Show(MessageInfo, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); } public static void ShowInfoMessage(string MessageInfo) { MessageBox.Show(MessageInfo, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); } public static bool ShowQuestion(string MessageInfo) { bool result = false; if (MessageBox.Show(MessageInfo, "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { result = true; } return result; } } }