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