WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
@@ -125,6 +125,7 @@ if (bol) { propViewModel.UpdateProperty(pumpInfo, hydroInfo.GetAllParters()); this.hydroParterPropertyCtrl1.UpdateRows(); } return bol; }; 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); } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -1082,10 +1082,7 @@ } }; if (dlg.ShowDialog() == DialogResult.Cancel) { await _bimfaceCtrl?.ClearLogicCalcuCustomLabels(); } dlg.ShowDialog(); } #endregion WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/01-click/ClickIn3dInfo.cs
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/01-click/ClickOut3dInfo.cs
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/02-helper/BimfaceHelper.cs
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/03-logic-calcu/LogicCalcuCustomLabel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,27 @@ namespace Yw.WinFrmUI.Bimface { /// <summary> /// /// </summary> public class LogicCalcuCustomLabel { /// <summary> /// ä½ç½® /// </summary> [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] public string Id { get; set; } /// <summary> /// æ°æ® /// </summary> [JsonProperty("data", NullValueHandling = NullValueHandling.Ignore)] public List<LogicCalcuCustomLabelItem> Data { get; set; } /// <summary> /// å¯è§è·ç¦» /// </summary> [JsonProperty("distance", NullValueHandling = NullValueHandling.Ignore)] public int Distance { get; set; } } } WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/03-logic-calcu/LogicCalcuCustomLabelItem.cs
ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/CustomLabelItem.cs ÐÞ¸Ä @@ -3,7 +3,7 @@ /// <summary> /// /// </summary> public class CustomLabelItem public class LogicCalcuCustomLabelItem { /// <summary> /// åç§° WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/CustomLabel.cs
ÎļþÒÑɾ³ý WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/BimfaceInterop3dContainer.cs
@@ -417,7 +417,7 @@ /// <summary> /// 设置ä¸å¡è®¡ç®èªå®ä¹æ ç¾ /// </summary> public async Task SetLogicCalcuCustomLabels(List<CustomLabel> obj) public async Task SetLogicCalcuCustomLabels(List<LogicCalcuCustomLabel> obj) { if (!_isViewInitialized) { WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/IBimfaceInterop3dContainer.cs
@@ -154,7 +154,7 @@ /// </summary> /// <param name="obj"></param> /// <returns></returns> Task SetLogicCalcuCustomLabels(List<CustomLabel> obj); Task SetLogicCalcuCustomLabels(List<LogicCalcuCustomLabel> obj); /// <summary> /// æ¸ é¤èªå®ä¹æ ç¾ WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/LogicCalcuCustomLabel.js
@@ -44,6 +44,7 @@ let customItem = new Glodon.Bimface.Plugins.Drawable.CustomItem(config); _drawableContainer.addItem(customItem); customItem.setVisibleDistance(item.distance); } //è·åä¸å¡è®¡ç®æ°æ®å 容html WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/01-const/HydroCurve.cs
@@ -5,6 +5,8 @@ /// </summary> public class HydroCurve { #region Pump /// <summary> /// æ°´æ³µæ²çº¿ /// </summary> @@ -25,6 +27,10 @@ /// </summary> public const string PumpQE = "PumpQE"; #endregion #region Valve /// <summary> /// éé¨ /// </summary> @@ -35,6 +41,21 @@ /// </summary> public const string ValveQL = "ValveQL"; #endregion #region Tank /// <summary> /// æ°´æ± /// </summary> public const string Tank = "Tank"; /// <summary> /// æ°´æ± å®¹ç§¯æ²çº¿ /// </summary> public const string TankVol = "TankVol"; #endregion } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/01-source/02-tank/00-core/HydroTankPropertyViewModel.cs
ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/01-source/02-tank/HydroTankPropertyViewModel.cs ÐÞ¸Ä @@ -29,6 +29,7 @@ this.UpdatePropStatus(nameof(this.DN), rhs, nameof(rhs.DN)); this.MinVol = Math.Round(rhs.MinVol, 4); this.UpdatePropStatus(nameof(this.MinVol), rhs, nameof(rhs.MinVol)); this.Curve = string.IsNullOrEmpty(rhs.VolCurve) ? "æªé ç½®" : "å·²é ç½®"; this.VolCurve = rhs.VolCurve; this.UpdatePropStatus(nameof(this.VolCurve), rhs, nameof(rhs.VolCurve)); this.OverFlow = rhs.OverFlow; @@ -100,24 +101,33 @@ /// </summary> [Category("æ°æ®")] [DisplayName("容积æ²çº¿")] [PropertyOrder(107)] [PropertyOrder(108)] [IsHydroCurvePro(HydroCurve.Tank)] [Browsable(true)] public string Curve { get; set; } /// <summary> /// 容积æ²çº¿ /// </summary> [Category("æ°æ®")] [DisplayName("容积æ²çº¿")] [PropertyOrder(109)] [IsHydroCurvePro(HydroCurve.TankVol)] [Browsable(false)] public string VolCurve { get; set; } /// <summary> /// æ¯å¦å è®¸æº¢æµ /// å è®¸æº¢æµ /// </summary> [Category("æ°æ®")] [DisplayName("æ¯å¦å 许溢æµ")] [PropertyOrder(108)] [DisplayName("å 许溢æµ")] [PropertyOrder(110)] [Browsable(true)] public bool OverFlow { get; set; } /// <summary> /// æ´æ°å±æ§ /// </summary> /// <param name="rhs"></param> /// <param name="allParterList"></param> public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList) { base.UpdateProperty(rhs, allParterList); @@ -135,6 +145,7 @@ this.UpdatePropStatus(nameof(this.DN), hydroTankInfo, nameof(hydroTankInfo.DN)); this.MinVol = hydroTankInfo.MinVol; this.UpdatePropStatus(nameof(this.MinVol), hydroTankInfo, nameof(hydroTankInfo.MinVol)); this.Curve = string.IsNullOrEmpty(hydroTankInfo.VolCurve) ? "æªé ç½®" : "å·²é ç½®"; this.VolCurve = hydroTankInfo.VolCurve; this.UpdatePropStatus(nameof(this.VolCurve), hydroTankInfo, nameof(hydroTankInfo.VolCurve)); this.OverFlow = hydroTankInfo.OverFlow; WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/01-source/02-tank/01-waterbox/HydroWaterboxPropertyViewModel.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/SetHydroCurveCtrl.cs
@@ -43,6 +43,11 @@ this.txtDescription.EditValue = _curveInfo.Description; switch (curveType) { case HydroCurve.TankVol: { } break; case HydroCurve.PumpQH: { this.txtCurveType.EditValue = "æ°´æ³µæµéæ¬ç¨æ²çº¿"; @@ -70,6 +75,15 @@ this.hydroCurveViewCtrl1.TitleTextY = "æçï¼%ï¼"; } break; case HydroCurve.ValveQL: { this.txtCurveType.EditValue = "é鍿°´å¤´æå¤±æ²çº¿"; this.colX.Caption = "Q(m³/h)"; this.colY.Caption = "H(m)"; this.hydroCurveViewCtrl1.TitleTextX = "æµéï¼m³/hï¼"; this.hydroCurveViewCtrl1.TitleTextY = "ååï¼mï¼"; } break; default: break; } _allBindingList = new BindingList<HydroCurvePointViewModel>(); WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/HydroParterPropertyCtrl.cs
@@ -80,18 +80,6 @@ } /// <summary> /// ç»å®å¯¹è±¡å表 /// </summary> public List<HydroParterPropertyViewModel> SelectedObjects { get { return this.propertyGridControl1.SelectedObjects?.Select(x => x as HydroParterPropertyViewModel).ToList(); } set { this.propertyGridControl1.SelectedObjects = value?.ToArray(); } } /// <summary> /// 鿰仿°æ®æºä¸è¯»åæ°æ®ï¼å¤è§æ¢å¤åå¼å§å è½½çæ ·å /// </summary> public void UpdateData() @@ -401,6 +389,22 @@ var vm = GetPropertyViewModel(e.Row); switch (curvePropAttri.CurveType) { case HydroCurve.Tank: { if (this.SetCurveEvent == null || !this.SetCurveEvent.Invoke(vm, HydroCurve.Pump)) { XtraMessageBox.Show("æ£å¨å¼åä¸..."); } } break; case HydroCurve.TankVol: { if (this.SetCurveEvent == null || !this.SetCurveEvent.Invoke(vm, HydroCurve.TankVol)) { XtraMessageBox.Show("æ£å¨å¼åä¸..."); } } break; case HydroCurve.Pump: { if (this.SetCurveEvent == null || !this.SetCurveEvent.Invoke(vm, HydroCurve.Pump))