我们经常操作messagebox类,有时候我们又分不清一些参数,下面是一些操作messageBox的常用方法:
class="code_img_closed" src="/Upload/Images/2015011415/0015B68B3C38AA5B.gif" alt="" />logs_code_hide('797e6607-e44a-475f-9248-aab37b51f80c',event)" src="/Upload/Images/2015011415/2B1B950FA3DF188F.gif" alt="" />public static class ClsMsg { public static void ShowInfoMsg(string p_info) { MessageBox.Show(p_info, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } public static void ShowWaringMsg(string p_info) { MessageBox.Show(p_info, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } public static DialogResult ShowYesNoMsg(string p_info) { return MessageBox.Show(p_info, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question); } public static DialogResult ShowOKCancelMsg(string p_info) { return MessageBox.Show(p_info, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); } public static void ShowErrorMsg(string p_info) { MessageBox.Show(p_info, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }View Code
喜欢的话可以优化下,用用