| | |
| | | #region BIM控件 |
| | | |
| | | //bimface控件 |
| | | private XhsProjectSimulationBimfaceCtrl _bimfaceCtrl = null; |
| | | private SimulationBimfaceCtrl _bimfaceCtrl = null; |
| | | |
| | | //获取 bimface 控件 |
| | | private async Task<XhsProjectSimulationBimfaceCtrl> GetBimfaceCtrl() |
| | | private async Task<SimulationBimfaceCtrl> GetBimfaceCtrl() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | if (_bimfaceCtrl == null) |
| | | { |
| | | var overlay = this.ShowOverlay(); |
| | | _bimfaceCtrl = new XhsProjectSimulationBimfaceCtrl(); |
| | | _bimfaceCtrl = new SimulationBimfaceCtrl(); |
| | | _bimfaceCtrl.Dock = DockStyle.Fill; |
| | | await _bimfaceCtrl.InitialData(_project, _projectSite); |
| | | _bimfaceCtrl.LoadCompletedEvent += () => |
| | |
| | | #region 属性控件 |
| | | |
| | | //属性控件 |
| | | private XhsProjectSimulationPropertyCtrl _propertyCtrl = null; |
| | | private SimulationPropertyCtrl _propertyCtrl = null; |
| | | |
| | | //获取属性控件 |
| | | private XhsProjectSimulationPropertyCtrl GetPropertyCtrl() |
| | | private SimulationPropertyCtrl GetPropertyCtrl() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | } |
| | | if (_propertyCtrl == null) |
| | | { |
| | | _propertyCtrl = new XhsProjectSimulationPropertyCtrl(); |
| | | _propertyCtrl = new SimulationPropertyCtrl(); |
| | | _propertyCtrl.Dock = DockStyle.Fill; |
| | | _propertyCtrl.HydroViewEvent += (visual) => |
| | | { |
| | |
| | | { |
| | | if (this.controlContainerRight.Controls.Count > 0) |
| | | { |
| | | if (this.controlContainerRight.Controls[0] is XhsProjectSimulationPropertyCtrl) |
| | | if (this.controlContainerRight.Controls[0] is SimulationPropertyCtrl) |
| | | { |
| | | return true; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | var dlg = new PumpParallelAnalyDlg(); |
| | | dlg.SetBindingData(vmList); |
| | | dlg.ReloadDataEvent += (list) => |
| | | { |
| | | list?.ForEach(x => |
| | | { |
| | | var pump = pumps.Find(t => t.Code == x.Code); |
| | | if (pump != null) |
| | | { |
| | | pump.LinkStatus = x.RunStatus ? Yw.Hydro.PumpStatus.Open : Yw.Hydro.PumpStatus.Closed; |
| | | pump.SpeedRatio = x.CurrentHz / pump.RatedHz; |
| | | } |
| | | }); |
| | | var codes = list?.Select(x => x.Code).ToList(); |
| | | //UpdateVisualViewModelProperty(codes); |
| | | //ShowSelectedProperty(); |
| | | UpdateVisualListCtrl(); |
| | | return true; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | //var dlg = new PumpParallelAnalyDlg(); |
| | | //dlg.SetBindingData(vmList); |
| | | //dlg.ReloadDataEvent += (list) => |
| | | //{ |
| | | // list?.ForEach(x => |
| | | // { |
| | | // var pump = pumps.Find(t => t.Code == x.Code); |
| | | // if (pump != null) |
| | | // { |
| | | // pump.LinkStatus = x.RunStatus ? Yw.Hydro.PumpStatus.Open : Yw.Hydro.PumpStatus.Closed; |
| | | // pump.SpeedRatio = x.CurrentHz / pump.RatedHz; |
| | | // } |
| | | // }); |
| | | // var codes = list?.Select(x => x.Code).ToList(); |
| | | // //UpdateVisualViewModelProperty(codes); |
| | | // //ShowSelectedProperty(); |
| | | // UpdateVisualListCtrl(); |
| | | // return true; |
| | | //}; |
| | | //dlg.ShowDialog(); |
| | | } |
| | | |
| | | //并联模拟 |
| | |
| | | |
| | | } |
| | | |
| | | var dlg = new PumpParallelAnalyDlg(); |
| | | dlg.SetBindingData(vmList); |
| | | dlg.ReloadDataEvent += (list) => |
| | | { |
| | | list?.ForEach(x => |
| | | { |
| | | var pump = _hydroInfo.Pumps?.Find(t => t.Code == x.Code); |
| | | if (pump != null) |
| | | { |
| | | pump.LinkStatus = x.RunStatus ? Yw.Hydro.PumpStatus.Open : Yw.Hydro.PumpStatus.Closed; |
| | | pump.SpeedRatio = Math.Round(x.CurrentHz / pump.RatedHz, 1); |
| | | } |
| | | }); |
| | | //ShowSelectedProperty(); |
| | | return true; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | //var dlg = new PumpParallelAnalyDlg(); |
| | | //dlg.SetBindingData(vmList); |
| | | //dlg.ReloadDataEvent += (list) => |
| | | //{ |
| | | // list?.ForEach(x => |
| | | // { |
| | | // var pump = _hydroInfo.Pumps?.Find(t => t.Code == x.Code); |
| | | // if (pump != null) |
| | | // { |
| | | // pump.LinkStatus = x.RunStatus ? Yw.Hydro.PumpStatus.Open : Yw.Hydro.PumpStatus.Closed; |
| | | // pump.SpeedRatio = Math.Round(x.CurrentHz / pump.RatedHz, 1); |
| | | // } |
| | | // }); |
| | | // //ShowSelectedProperty(); |
| | | // return true; |
| | | //}; |
| | | //dlg.ShowDialog(); |
| | | } |
| | | |
| | | //能效分析 |