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.Threading.Tasks;
|
using System.Windows.Forms;
|
|
namespace IStation.WinFrmUI.CalcErQu
|
{
|
public partial class InputWaterLevelDlg : XtraForm
|
{
|
public InputWaterLevelDlg()
|
{
|
InitializeComponent();
|
}
|
|
private void InputTemplateNameDlg_Load(object sender, EventArgs e)
|
{
|
|
}
|
public double WaterLevel
|
{
|
get
|
{
|
return Convert.ToDouble(textEdit1.Text);
|
}
|
}
|
|
private void btnOk_Click(object sender, EventArgs e)
|
{
|
if(string.IsNullOrEmpty(textEdit1.Text))
|
{
|
return;
|
}
|
double v = 0;
|
if(!double.TryParse(textEdit1.Text, out v))
|
{
|
return;
|
}
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
{
|
this.DialogResult = DialogResult.Cancel;
|
this.Close();
|
}
|
|
private void InputWaterLevelDlg_Shown(object sender, EventArgs e)
|
{
|
textEdit1.Focus();
|
}
|
}
|
}
|