using DevExpress.XtraEditors;
|
using System;
|
using System.Windows.Forms;
|
|
namespace AStation.WinFrmUI.Chart
|
{
|
public partial class ImportCurveByCurveExpressDlg : XtraForm
|
{
|
public ImportCurveByCurveExpressDlg()
|
{
|
InitializeComponent();
|
}
|
|
/// <summary>
|
/// 回调事件
|
/// </summary>
|
public event Func<string, AStation.Chart.eSourceWay, Model.PumpCurveInfo, bool> ReloadDataEvent;
|
|
//确定
|
private void btnOk_Click(object sender, EventArgs e)
|
{
|
var bol = this.importCurveByCurveExpressCtrl1.GetCurve(out string curveCode, out AStation.Chart.eSourceWay eCurveSourceFrom, out Model.PumpCurveInfo featCurveExpressGroup);
|
if (!bol)
|
{
|
return;
|
}
|
|
var result = this.ReloadDataEvent?.Invoke(curveCode, eCurveSourceFrom, featCurveExpressGroup);
|
if (result == null || !result.Value)
|
{
|
XtraMessageBox.Show("导入失败!");
|
return;
|
}
|
XtraMessageBox.Show("导入成功!");
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
|
}
|
}
|