lixiaojun
2024-11-28 d10b5c63fe08360560306ef799c828320f332db1
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/03-statistics/HydroSingleWorkingLossStatisticsCtrl.cs
@@ -1,4 +1,6 @@
namespace Yw.WinFrmUI
using Yw.Hydro;
using Yw.EPAnet;
namespace Yw.WinFrmUI
{
    public partial class HydroSingleWorkingLossStatisticsCtrl : DevExpress.XtraEditors.XtraUserControl
    {
@@ -8,6 +10,31 @@
            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, allEnergyList);
        }
        /// <summary>
        /// 
        /// </summary>