lixiaojun
2024-09-02 f057f1388eda8aeaea7f3e7a0451b57f32de324c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using Yw.Model;
 
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 管道属性视图
    /// </summary>
    public class HydroPipePropertyViewModel : HydroLinkPropertyViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroPipePropertyViewModel() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroPipePropertyViewModel(Yw.Model.HydroPipeInfo rhs) : base(rhs)
        {
            this.Diameter = rhs.Diameter;
            this.Length = rhs.Length;
            this.Roughness = rhs.Roughness;
            this.MinorLoss = rhs.MinorLoss;
        }
 
        /// <summary>
        /// 管道状态
        /// </summary>
        [Category("数据")]
        [DisplayName("管道状态")]
        [PropertyOrder(13)]
        [Browsable(true)]
        public override string LinkStatus { get; set; }
 
        /// <summary>
        /// 直径
        /// </summary>
        [Category("数据")]
        [DisplayName("直径")]
        [PropertyOrder(101)]
        [Browsable(true)]
        public double Diameter { get; set; }
 
        /// <summary>
        /// 长度
        /// </summary>
        [Category("数据")]
        [DisplayName("长度")]
        [PropertyOrder(102)]
        [Browsable(true)]
        public double Length { get; set; }
 
        /// <summary>
        /// 粗糙系数
        /// </summary>
        [Category("数据")]
        [DisplayName("粗糙系数")]
        [PropertyOrder(103)]
        [Browsable(true)]
        public double Roughness { get; set; }
 
        /// <summary>
        /// 局部阻力系数
        /// </summary>
        [Category("数据")]
        [DisplayName("局部阻力系数")]
        [PropertyOrder(104)]
        [Browsable(true)]
        public double MinorLoss { 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);
            if (rhs is Yw.Model.HydroPipeInfo hydroPipeInfo)
            {
                this.Diameter = hydroPipeInfo.Diameter;
                this.Length = hydroPipeInfo.Length;
                this.Roughness = hydroPipeInfo.Roughness;
                this.MinorLoss = hydroPipeInfo.MinorLoss;
            }
        }
 
    }
}