cloudflight
2025-01-13 02c14c9c57dbde72d9c771bd8b0fab1cd023047d
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using Yw.EPAnet;
using Yw.Hydro;
namespace Yw.WinFrmUI
{
    public partial class HydroSingleWorkingLossStatisticsCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public HydroSingleWorkingLossStatisticsCtrl()
        {
            InitializeComponent();
            this.layoutControl1.SetupLayoutControl();
        }
 
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult)
        {
            if (hydroInfo == null)
            {
                return;
            }
            List<Yw.EPAnet.EnergyPoint> allEnergyList = null;
            var network = hydroInfo.ToNetwork();
            if (network != null)
            {
                if (calcuResult != null)
                {
                    if (calcuResult.EPAnetCalcuResult != null)
                    {
                        allEnergyList = network.AnalyzeEnergy(calcuResult.EPAnetCalcuResult);
                    }
                }
            }
            SetBindingData(hydroInfo, calcuResult, allEnergyList);
        }
 
        /// <summary>
        /// 
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult, List<Yw.EPAnet.EnergyPoint> allEnergyList)
        {
            if (hydroInfo == null)
            {
                return;
            }
            this.hydroInputEnergyScaleChartCtrl1.SetBindingData(hydroInfo, calcuResult, allEnergyList);
            this.hydroCatalogLossScaleChartCtrl1.SetBindingData(hydroInfo, calcuResult, allEnergyList);
            this.hydroEnergyStatisticsBarCtrl1.SetBindingData(hydroInfo, calcuResult, allEnergyList);
        }
 
        /// <summary>
        /// 导出能量输入图片
        /// </summary>
        public void ExportInputToImage(string filePath)
        {
            this.hydroInputEnergyScaleChartCtrl1.ExportToImage(filePath);
        }
 
        /// <summary>
        /// 导出损失图片
        /// </summary>
        public void ExportLossToImage(string filePath)
        {
            this.hydroCatalogLossScaleChartCtrl1.ExportToImage(filePath);
        }
 
        /// <summary>
        /// 导出统计图片
        /// </summary>
        public void ExportStatisticsToImage(string filePath)
        {
            this.hydroEnergyStatisticsBarCtrl1.ExportToImage(filePath);
        }
 
    }
}