From abf1e3b3334ab47c38aa92405a11a6ec92b7847a Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 31 十月 2024 17:18:37 +0800 Subject: [PATCH] bimface 水流 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs | 73 ++++++++++++------------------------ 1 files changed, 25 insertions(+), 48 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs index d0fdb54..6725615 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs @@ -412,37 +412,39 @@ await _bimfaceInteropContainer?.ClearLogicCalcuCustomLabels(); return; } - var obj = new List<CustomLabel>(); + var obj = new List<LogicCalcuCustomLabel>(); var allParterList = hydroInfo.GetAllParters(); allParterList?.ForEach(x => { if (x is Yw.Model.HydroPumpInfo pump) { - var hz = pump.RatedHz * pump.SpeedRatio; + var hz = Math.Round(pump.RatedHz * pump.SpeedRatio); var calcuPump = calcuResult.LinkList.Find(x => x.Id == pump.Code); var calcuPumpStart = calcuResult.NodeList.Find(x => x.Id == pump.StartCode); var calcuPumpEnd = calcuResult.NodeList.Find(x => x.Id == pump.EndCode); - var pumpCustomLabel = new CustomLabel(); + var pumpCustomLabel = new LogicCalcuCustomLabel(); pumpCustomLabel.Id = pump.Code; - pumpCustomLabel.Data = new List<CustomLabelItem>() + pumpCustomLabel.Distance = 10000; + pumpCustomLabel.Data = new List<LogicCalcuCustomLabelItem>() { - new CustomLabelItem(){ Name="鐘舵��",Value=HydroLinkStatusHelper.GetStatusName(pump.LinkStatus),Unit=string.Empty}, - new CustomLabelItem(){ Name="棰戠巼",Value=hz.ToString(),Unit=string.Empty}, - new CustomLabelItem(){ Name="娴侀噺",Value=Math.Round(calcuPump.Flow,1).ToString(),Unit="m鲁/h"}, - new CustomLabelItem(){ Name="杩涘彛鍘嬪姏",Value=Math.Round(calcuPumpStart.Head,4).ToString(),Unit="m"}, - new CustomLabelItem(){ Name="鍑哄彛鍘嬪姏",Value=Math.Round(calcuPumpEnd.Head,4).ToString(),Unit="m"}, + new LogicCalcuCustomLabelItem(){ Name="鐘舵��",Value=HydroLinkStatusHelper.GetStatusName(pump.LinkStatus),Unit=string.Empty}, + new LogicCalcuCustomLabelItem(){ Name="棰戠巼",Value=hz.ToString(),Unit=string.Empty}, + new LogicCalcuCustomLabelItem(){ Name="娴侀噺",Value=Math.Round(calcuPump.Flow,1).ToString(),Unit="m鲁/h"}, + new LogicCalcuCustomLabelItem(){ Name="杩涘彛鍘嬪姏",Value=Math.Round(calcuPumpStart.Head,4).ToString(),Unit="m"}, + new LogicCalcuCustomLabelItem(){ Name="鍑哄彛鍘嬪姏",Value=Math.Round(calcuPumpEnd.Head,4).ToString(),Unit="m"}, }; obj.Add(pumpCustomLabel); } else if (x is Yw.Model.HydroEmitterInfo emitter) { var calcuEmitter = calcuResult.NodeList.Find(x => x.Id == emitter.Code); - var emitterCustomLabel = new CustomLabel(); + var emitterCustomLabel = new LogicCalcuCustomLabel(); emitterCustomLabel.Id = emitter.Code; - emitterCustomLabel.Data = new List<CustomLabelItem>() + emitterCustomLabel.Distance = 10000; + emitterCustomLabel.Data = new List<LogicCalcuCustomLabelItem>() { - new CustomLabelItem(){ Name="娴侀噺",Value=Math.Round(calcuEmitter.Demand,1).ToString(),Unit="m鲁/h"}, - new CustomLabelItem(){ Name="鍘嬪姏",Value=Math.Round(calcuEmitter.Head,4).ToString(),Unit="m"} + new LogicCalcuCustomLabelItem(){ Name="娴侀噺",Value=Math.Round(calcuEmitter.Demand,1).ToString(),Unit="m鲁/h"}, + new LogicCalcuCustomLabelItem(){ Name="鍘嬪姏",Value=Math.Round(calcuEmitter.Head,4).ToString(),Unit="m"} }; obj.Add(emitterCustomLabel); } @@ -480,8 +482,17 @@ #endregion - #region 涓氬姟 + #region 涓氬姟姘存祦鍔ㄧ敾 + /// <summary> + /// + /// </summary> + public async Task LoadAllFlowMaterialList(List<LogicFlowEffect> obj) + { + await _bimfaceInteropContainer?.LoadAllFlowMaterialList(obj); + } + + #endregion #region 杩炴帴鏋勪欢棰滆壊 @@ -550,40 +561,6 @@ _linkComponentIds.AddRange(elementIds); await _bimfaceInteropContainer?.OverrideComponentsColor(elementIds, _linkEndComponentColor, _linkComponentTransparency); } - - #endregion - - #region 璁剧疆Open鏋勪欢棰滆壊 - - private const string _openComponentColor = "#2E8B57"; - private const double _openComponentTransparency = 0.8; - private List<string> _openComponentIds = null;//Open鏋勪欢id鍒楄〃 - - /// <summary> - /// 璁剧疆Open鏋勪欢棰滆壊 - /// </summary> - public async Task SetOpenComponentsColor(List<string> elementIds) - { - if (_openComponentIds != null && _openComponentIds.Count > 0) - { - await _bimfaceInteropContainer.RestoreComponentsColor(_openComponentIds); - } - _openComponentIds = elementIds; - if (elementIds == null || elementIds.Count < 1) - { - return; - } - if (_bimfaceInteropContainer == null) - { - return; - } - await _bimfaceInteropContainer.OverrideComponentsColor(elementIds, _openComponentColor, _openComponentTransparency); - } - - #endregion - - - #endregion -- Gitblit v1.9.3