Shuxia Ning
2024-08-12 d2cee56db11f0ee475e9f9dbdc8bfd03ad982e18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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();
        }
 
    }
}