using DevExpress.XtraEditors; using Gs.DevApp.ToolBox; 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 Gs.DevApp.DevFrm { public partial class Frm_XunJianDetect01Show : DevExpress.XtraEditors.XtraForm { public Frm_XunJianDetect01Show() { InitializeComponent(); btnSave.Click += (s, e) => { if (txt_fBegDate.Text.Length <= 0) { Gs.DevApp.ToolBox.MsgHelper.ShowInformation("日期不能为空!"); txt_fBegDate.Focus(); return; } string str = txt_fBegDate.Text.Trim(); UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = str }); Close(); }; btnCancel.Click += (s, e) => { this.Close(); }; } /// /// 选择后的回调事件 /// public event EventHandler UpdateParent; } }