lixiaojun
2024-10-10 3379b93327c6c7a9f9bc30d4462ffbeb6d4a4470
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
using Yw.Model;
 
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 连接节点
    /// </summary>
    public class HydroJunctionPropertyViewModel : HydroNodePropertyViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroJunctionPropertyViewModel() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroJunctionPropertyViewModel(Yw.Model.HydroJunctionInfo rhs) : base(rhs)
        {
            this.Elev = rhs.Elev;
            this.Demand = rhs.Demand;
            this.DemandPattern = rhs.DemandPattern;
        }
 
 
        /// <summary>
        /// 标高/高程
        /// </summary>
        [Category("数据")]
        [DisplayName("标高")]
        [PropertyOrder(101)]
        [Browsable(true)]
        public double Elev { get; set; }
 
        /// <summary>
        /// 需水量
        /// </summary>
        [Category("数据")]
        [DisplayName("需水量")]
        [PropertyOrder(102)]
        [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>
        /// <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.HydroJunctionInfo hydroJunctionInfo)
            {
                this.Elev = hydroJunctionInfo.Elev;
                this.Demand = hydroJunctionInfo.Demand;
                this.DemandPattern = hydroJunctionInfo.DemandPattern;
            }
        }
 
 
    }
}