lixiaojun
2024-10-29 7c4fde84af5d666236c85b784bf13c9295bcb605
bimface 业务计算显示距离设定
已删除1个文件
已重命名6个文件
已修改9个文件
已添加1个文件
180 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/01-click/ClickIn3dInfo.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/01-click/ClickOut3dInfo.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/02-helper/BimfaceHelper.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/03-logic-calcu/LogicCalcuCustomLabel.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/03-logic-calcu/LogicCalcuCustomLabelItem.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/CustomLabel.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/BimfaceInterop3dContainer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/IBimfaceInterop3dContainer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/LogicCalcuCustomLabel.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/01-const/HydroCurve.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/01-source/02-tank/00-core/HydroTankPropertyViewModel.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/01-source/02-tank/01-waterbox/HydroWaterboxPropertyViewModel.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/SetHydroCurveCtrl.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/HydroParterPropertyCtrl.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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))