using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace MyCommanHelper { public class MessageBoxHelper { // Methods public static void ShowErrorMessage(string sErr) { MessageBox.Show(sErr, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } public static void ShowErrorMessage(Exception ex, string errType) { MessageBox.Show(ex.Message, errType, MessageBoxButtons.OK, MessageBoxIcon.Error); } public static void ShowInfoMessage(string sInfo) { MessageBox.Show(sInfo, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }