tx
2025-04-10 2538101febc78f525945da72c7cdcb2589f9e6ea
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using DevExpress.XtraEditors;
using System;
using System.Windows.Forms;
 
namespace TProduct.WinFrmUI
{
    public partial class InputXYnullDialog : Form
    {
        public double? Y = null, X = null;
 
        public InputXYnullDialog()
        {
            InitializeComponent();
 
            //if (TProduct.WinFrmUI.GlobeParas.LocalizationType == Eventech.XingHao.eLocalizationType.enUS)
            //{//英语
            //    //资源文件
            //    System.ComponentModel.ComponentResourceManager resources
            //        = new System.ComponentModel.ComponentResourceManager(typeof(InputXYnullDialog));
 
            //    TProduct.Localization.SetResource.UserControl(this, resources);
            //}
        }
        public void SetLabelX(string name)
        {
            labelX.Text = name;
        }
        public void SetLabelY(string name)
        {
            labelY.Text = name;
        }
        private void InputXYnullDialog_Load(object sender, EventArgs e)
        {
            if (Y != null)
                textY.Text = Y.ToString();
            if (X != null)
                textX.Text = X.ToString();
 
            LocationDialog();
        }
 
        private void buttonOK_Click(object sender, EventArgs e)
        {
            Y = null;
            X = null;
            if (!string.IsNullOrEmpty(textX.Text))
            {
                try
                {
                    X = double.Parse(textX.Text);
                }
                catch
                {
                    XtraMessageBox.Show("请输入数字");
                    return;
                }
            }
 
            if (!string.IsNullOrEmpty(textY.Text))
            {
                try
                {
                    Y = double.Parse(textY.Text);
                }
                catch
                {
                    XtraMessageBox.Show("请输入数字");
                    return;
                }
            }
 
            DialogResult = DialogResult.OK;
            this.Close();
        }
 
        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            this.Close();
        }
 
        //翻译界面语言
        private void LocationDialog()
        {
 
        }
    }
}