StableVersion4.3/HL_FristAidPlatform_PreHosp.../Form_Transfer.cs

49 lines
1.3 KiB
C#
Raw Permalink Normal View History

2024-03-11 09:47:34 +08:00
using DevExpress.XtraEditors;
using System;
using System.Windows.Forms;
namespace HL_FristAidPlatform_PreHospitalEmergency
{
public partial class Form_Transfer : XtraForm
{
public Form_Transfer()
{
InitializeComponent();
}
public delegate void TextEventHandler(string strText);
public TextEventHandler TextHandler;
private void simpleButton1_Click(object sender, EventArgs e)
{
if (null != TextHandler)
{
if (string.IsNullOrEmpty(textEdit1.Text))
{
MessageBox.Show("地址不能为空");
return;
}
TextHandler.Invoke(textEdit1.Text);
DialogResult = DialogResult.OK;
}
}
private void textEdit1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Keys.Enter == (Keys)e.KeyChar)
{
if (null != TextHandler)
{
TextHandler.Invoke(textEdit1.Text);
DialogResult = DialogResult.OK;
}
}
}
private void simpleButton2_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}