using Gs.DevApp.ToolBox; using System; namespace Gs.DevApp.UserControl { public partial class showZhongTai : DevExpress.XtraEditors.XtraForm { public showZhongTai() { InitializeComponent(); btnSave.Click += (s, e) => { if (comZt.SelectedIndex <= 0) { Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择状态!"); return; } string str = comZt.Text.Trim(); UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = str }); Close(); }; btnCancel.Click += (s, e) => { this.Close(); }; } /// /// 选择后的回调事件 /// public event EventHandler UpdateParent; } }