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 InputTemplateNameDlg : XtraForm { public InputTemplateNameDlg() { InitializeComponent(); } private void InputTemplateNameDlg_Load(object sender, EventArgs e) { } public string TemplateName { get { return textEdit1.Text; } } private void btnOk_Click(object sender, EventArgs e) { if(string.IsNullOrEmpty(textEdit1.Text)) { return; } this.DialogResult = DialogResult.OK; this.Close(); } private void btnCancel_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } private void InputTemplateNameDlg_Shown(object sender, EventArgs e) { textEdit1.Focus(); } } }