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
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
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace IStation.WinFrmUI
{
    public partial class InputXYDialog : Form
    {
        public double Y=0, X=0;
 
        public InputXYDialog()
        {
            InitializeComponent();
 
            //if (IStation.WinFrmUI.GlobeParas.LocalizationType == Eventech.XingHao.eLocalizationType.enUS)
            //{//英语
            //    //资源文件
            //    System.ComponentModel.ComponentResourceManager resources
            //        = new System.ComponentModel.ComponentResourceManager(typeof(InputXYDialog));
 
            //    IStation.Localization.SetResource.UserControl(this, resources);
            //}
        }
        public void SetLabelX(string name)
        {
            labelX.Text = name;
        }
        public void SetLabelY(string name)
        {
            labelY.Text = name;
        }
        private void InputXYDialog_Load(object sender, EventArgs e)
        {
            textY.Text = Y.ToString();
            textX.Text = X.ToString();
 
            LocationDialog();
        }
 
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textX.Text) || string.IsNullOrEmpty(textY.Text))
            {
                XtraMessageBox.Show( "不能为空") ;
                return;
            }
 
            try
            {
                Y = double.Parse(textY.Text);
                X = double.Parse(textX.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()
        {
 
        }
    }
}