using DevExpress.XtraEditors; using HStation.Vmo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Yw; namespace HStation.WinFrmUI { public partial class AssetsExchangerCurveQLMgrPage : DocumentPage { public AssetsExchangerCurveQLMgrPage() { InitializeComponent(); this.PageTitle.Caption = "水头损失曲线"; this.PageTitle.HeaderSvgImage = AssetsMainSvgImageHelper.Curve; this.PageTitle.SvgImageSize = new Size(24, 24); this.phartDiagramRelationListCtrl1.SelectedChangedEvent += PhartDiagramRelationListCtrl1_SelectedChangedEvent; } private AssetsExchangerMainVmo _vmo = null; private PhartDiagramRelationVmo _relation = null; /// /// /// public async void SetBindingData(AssetsExchangerMainVmo vmo) { if (vmo == null) { return; } _vmo = vmo; this.PageTitle.Caption = $"{vmo.Name}\r\n水头损失曲线"; var allRelationList = await BLLFactory.Instance .GetByObjectTypeAndObjectID(HStation.Assets.DataType.ExchangerMain, vmo.ID); this.phartDiagramRelationListCtrl1.SetBindingData(allRelationList); } //excel private void Excel() { var dlg = new ImportAssetsExchangerCurveQLByExcelDlg(); dlg.SetBindingData(); dlg.ShowDialog(); } //图片 private void Picture() { var dlg = new ImportAssetsExchangerCurveQLByPictureDlg(); dlg.SetBindingData(); dlg.ShowDialog(); } //基本信息 private void Info() { } //曲线 private void Curve() { var dlg = new EditAssetsExchangerCurveQLDlg(); dlg.SetBindingData(null); dlg.ShowDialog(); } //删除 private void Delete() { } //Excel导入 private void barBtnImportByExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Excel(); } //图片导入 private void barBtnImportByPicture_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Picture(); } //基本信息 private void barBtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Info(); } //曲线 private void barBtnCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Curve(); } //删除 private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Delete(); } //选择改变 private void PhartDiagramRelationListCtrl1_SelectedChangedEvent(PhartDiagramRelationVmo obj) { _relation = obj; } } }