| | |
| | | } |
| | | } |
| | | |
| | | //压缩机 |
| | | if (model.Compressors != null && model.Compressors.Count > 0) |
| | | { |
| | | foreach (var compressor in model.Compressors) |
| | | { |
| | | var compressModel = new Pipe(); |
| | | compressModel.Id = compressor.Code; |
| | | compressModel.Name = compressor.Name; |
| | | compressModel.StartNode = allNodes.Find(x => x.Id == compressor.StartCode); |
| | | compressModel.EndNode = allNodes.Find(x => x.Id == compressor.EndCode); |
| | | compressModel.LinkStatus = compressor.LinkStatus; |
| | | compressModel.Length = compressor.Length; |
| | | compressModel.Diameter = compressor.Diameter; |
| | | compressModel.Roughness = compressor.Roughness; |
| | | compressModel.MinorLoss = compressor.MinorLoss; |
| | | netWork.Pipes.Add(compressModel); |
| | | } |
| | | } |
| | | |
| | | //水泵 |
| | | if (model.Pumps != null && model.Pumps.Count > 0) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 属性面板 |
| | | #region 构件属性 |
| | | |
| | | //属性控件 |
| | | private XhsProjectSimulationPropertyCtrl _propertyCtrl = null; |
| | |
| | | _viewer.addBlinkComponentsById(obj.ids); |
| | | _viewer.setBlinkColor(new Glodon.Web.Graphics.Color(obj.color, obj.transparency)); |
| | | _viewer.enableBlinkComponents(true); |
| | | _viewer.setBlinkIntervalTime(500); |
| | | _viewer.setBlinkIntervalTime(100); |
| | | _viewer.render(); |
| | | _isBlinkComponentsActivated = true; |
| | | } |
| | |
| | | /// </summary> |
| | | public HydroTankPropertyViewModel(Yw.Model.HydroTankInfo rhs) : base(rhs) |
| | | { |
| | | this.PoolElev = rhs.PoolElev; |
| | | this.PoolElev = Math.Round(rhs.PoolElev, 4); |
| | | this.UpdatePropStatus(nameof(this.PoolElev), rhs, nameof(rhs.PoolElev)); |
| | | this.InitLevel = rhs.InitLevel; |
| | | this.InitLevel = Math.Round(rhs.InitLevel, 4); |
| | | this.UpdatePropStatus(nameof(this.InitLevel), rhs, nameof(rhs.InitLevel)); |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MinLevel = Math.Round(rhs.MinLevel, 4); |
| | | this.UpdatePropStatus(nameof(this.MinLevel), rhs, nameof(rhs.MinLevel)); |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.MaxLevel = Math.Round(rhs.MaxLevel, 4); |
| | | this.UpdatePropStatus(nameof(this.MaxLevel), rhs, nameof(rhs.MaxLevel)); |
| | | this.DN = rhs.DN; |
| | | this.DN = Math.Round(rhs.DN, 4); |
| | | this.UpdatePropStatus(nameof(this.DN), rhs, nameof(rhs.DN)); |
| | | this.MinVol = rhs.MinVol; |
| | | this.MinVol = Math.Round(rhs.MinVol, 4); |
| | | this.UpdatePropStatus(nameof(this.MinVol), rhs, nameof(rhs.MinVol)); |
| | | this.VolCurve = rhs.VolCurve; |
| | | this.UpdatePropStatus(nameof(this.VolCurve), rhs, nameof(rhs.VolCurve)); |
| | |
| | | { |
| | | this.Material = rhs.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material)); |
| | | this.Diameter = rhs.Diameter; |
| | | this.Diameter = Math.Round(rhs.Diameter, 0); |
| | | this.UpdatePropStatus(nameof(this.Diameter), rhs, nameof(rhs.Diameter)); |
| | | this.Length = rhs.Length; |
| | | this.Length = Math.Round(rhs.Length, 4); |
| | | this.UpdatePropStatus(nameof(this.Length), rhs, nameof(rhs.Length)); |
| | | this.Roughness = rhs.Roughness; |
| | | this.UpdatePropStatus(nameof(this.Roughness), rhs, nameof(rhs.Roughness)); |
| | |
| | | public override string LinkStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定功率 |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("额定功率")] |
| | | [PropertyOrder(101)] |
| | | [DisplayUnit("kW")] |
| | | [Browsable(true)] |
| | | public double RatedP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定流量 |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("额定流量")] |
| | | [PropertyOrder(102)] |
| | | [PropertyOrder(101)] |
| | | [DisplayUnit("m³/h")] |
| | | [Browsable(true)] |
| | | public double? RatedQ { get; set; } |
| | |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("额定扬程")] |
| | | [PropertyOrder(103)] |
| | | [PropertyOrder(102)] |
| | | [DisplayUnit("m")] |
| | | [Browsable(true)] |
| | | public double? RatedH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定功率 |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("额定功率")] |
| | | [PropertyOrder(103)] |
| | | [DisplayUnit("kW")] |
| | | [Browsable(true)] |
| | | public double RatedP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定转速 |
| | |
| | | public double RatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 频率 |
| | | /// 设定频率 |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("频率")] |
| | | [DisplayName("设定频率")] |
| | | [PropertyOrder(106)] |
| | | [DisplayUnit("hz")] |
| | | [Browsable(true)] |
| | |
| | | public override string LinkStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定功率(kW) |
| | | /// </summary> |
| | | [DisplayName("额定功率(kW)")] |
| | | public double RatedP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定流量(m³/h) |
| | | /// </summary> |
| | | [DisplayName("额定流量(m³/h)")] |
| | |
| | | public double? RatedH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定功率(kW) |
| | | /// </summary> |
| | | [DisplayName("额定功率(kW)")] |
| | | public double RatedP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 额定转速(r/min) |
| | | /// </summary> |
| | | [DisplayName("额定扬程(r/min)")] |
| | | [DisplayName("额定转速(r/min)")] |
| | | public double? RatedN { get; set; } |
| | | |
| | | /// <summary> |