lixiaojun
2025-02-18 1f7091dac2a5dddf4a0a40acb0940d3787cf35f5
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
namespace Yw.WinFrmUI
{
    public partial class HydroLossStatisticsCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public HydroLossStatisticsCtrl()
        {
            InitializeComponent();
            this.layoutControl1.SetupLayoutControl();
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                HydroWorkingVmo working,
                HydroCalcuResult calcuResult = null,
                bool isHead = false,
                List<Yw.Vmo.HydroEvaluationVmo> allEvaluationList = null
            )
        {
            var vm = HydroLossStatisticsHelper.Create(hydroInfo, working, calcuResult, isHead, allEvaluationList);
            SetBindingData(vm);
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(HydroLossStatisticsViewModel vm)
        {
            this.hydroLossStatisticsInputCtrl1.SetBindingData(vm?.Input);
            this.hydroLossStatisticsCatalogCtrl1.SetBindingData(vm?.Catalog);
            this.hydroLossStatisticsCategoryCtrl1.SetBindingData(vm?.Category);
        }
 
 
        /// <summary>
        /// 导出能量输入图片
        /// </summary>
        public void ExportInputToImage(string filePath)
        {
            this.hydroLossStatisticsInputCtrl1.ExportToImage(filePath);
        }
 
        /// <summary>
        /// 导出能量分类图片
        /// </summary>
        public void ExportCatalogToImage(string filePath)
        {
            this.hydroLossStatisticsCatalogCtrl1.ExportToImage(filePath);
        }
 
        /// <summary>
        /// 导出能量种类图片
        /// </summary>
        public void ExportCategoryToImage(string filePath)
        {
            this.hydroLossStatisticsCategoryCtrl1.ExportToImage(filePath);
        }
 
    }
}