lixiaojun
2024-07-11 8d8cd298ab46aee191baf53ff320fd3290d1ec9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace IStation.WinFrmUI
{
    public static class MyMessageBox
    {
        public static void InfomationShow(string str)
        {
            if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN"))
            {
                XtraMessageBox.Show(str, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);            
            }
            else
            {
                XtraMessageBox.Show(str, "Notice", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 
        public static DialogResult WarningShow(string str)
        {
            if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN"))
            {
                return XtraMessageBox.Show(str, "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            }
            else
            {
                return XtraMessageBox.Show(str, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            }
        }
 
        public static DialogResult StopShow(string str)
        {
            if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN"))
            {
                return XtraMessageBox.Show(str, "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
            else
            {
                return XtraMessageBox.Show(str, "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
 
 
 
 
    }
 
 
}