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()
|
{
|
|
}
|
}
|
}
|