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);
|
}
|
|
}
|
}
|