using DevExpress.XtraEditors;
using System.Windows.Forms;
namespace Yw.WinFrmUI.Phart.Cubic
{
public partial class ImportCurveByExcelDlg : XtraForm
{
public ImportCurveByExcelDlg()
{
InitializeComponent();
}
///
/// 回调事件
///
public event Func> ReloadDataEvent;
//确定
private async void btnOk_Click(object sender, EventArgs e)
{
var bol = this.importCurveByExcelCtrl1.Get(out string other_name, out Yw.Pump.CurveQH qh, out Yw.Pump.CurveQE qe, out Yw.Pump.CurveQP qp);
if (!bol)
{
return;
}
var result = await this.ReloadDataEvent?.Invoke(other_name, qh, qe, qp);
if (!result)
{
XtraMessageBox.Show("导入失败!");
return;
}
XtraMessageBox.Show("导入成功!");
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}