lixiaojun
2024-10-17 4cb1f00f84d160f97afd0fb86cf600e1be667dd5
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
90
91
using Yw.Model;
 
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 连接节点
    /// </summary>
    public class HydroJunctionPropertyViewModel : HydroNodePropertyViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroJunctionPropertyViewModel() : base() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroJunctionPropertyViewModel(Yw.Model.HydroJunctionInfo rhs) : base(rhs)
        {
            this.Elev = rhs.Elev;
            this.UpdatePropStatus(nameof(this.Elev), rhs, nameof(rhs.Elev));
            this.MinorLoss = rhs.MinorLoss;
            this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss));
            this.Demand = rhs.Demand;
            this.UpdatePropStatus(nameof(this.Demand), rhs, nameof(rhs.Demand));
            this.DemandPattern = rhs.DemandPattern;
            this.UpdatePropStatus(nameof(this.DemandPattern), rhs, nameof(rhs.DemandPattern));
        }
 
 
        /// <summary>
        /// 标高/高程
        /// </summary>
        [Category("数据")]
        [DisplayName("标高")]
        [PropertyOrder(101)]
        [DisplayUnit("m")]
        [Browsable(true)]
        public double Elev { get; set; }
 
        /// <summary>
        /// 损失系数
        /// </summary>
        [Category("数据")]
        [DisplayName("损失系数")]
        [PropertyOrder(33)]
        [Browsable(true)]
        public double? MinorLoss { get; set; }
 
        /// <summary>
        /// 需水量
        /// </summary>
        [Category("数据")]
        [DisplayName("需水量")]
        [PropertyOrder(102)]
        [DisplayUnit("m³/h")]
        [Browsable(true)]
        public double? Demand { get; set; }
 
        /// <summary>
        /// 需水模式
        /// </summary>
        [Category("数据")]
        [DisplayName("需水模式")]
        [PropertyOrder(103)]
        [IsHydroPatternPro(HydroPattern.Demand)]
        [Browsable(true)]
        public string DemandPattern { get; set; }
 
        /// <summary>
        /// 更新属性
        /// </summary>
        public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList)
        {
            base.UpdateProperty(rhs, allParterList);
            if (rhs is Yw.Model.HydroJunctionInfo hydroJunctionInfo)
            {
                this.Elev = hydroJunctionInfo.Elev;
                this.UpdatePropStatus(nameof(this.Elev), hydroJunctionInfo, nameof(hydroJunctionInfo.Elev));
                this.MinorLoss = hydroJunctionInfo.MinorLoss;
                this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(hydroJunctionInfo.MinorLoss));
                this.Demand = hydroJunctionInfo.Demand;
                this.UpdatePropStatus(nameof(this.Demand), hydroJunctionInfo, nameof(hydroJunctionInfo.Demand));
                this.DemandPattern = hydroJunctionInfo.DemandPattern;
                this.UpdatePropStatus(nameof(this.DemandPattern), hydroJunctionInfo, nameof(hydroJunctionInfo.DemandPattern));
            }
        }
 
 
    }
}