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
using Yw.Model;
 
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 连接件属性视图
    /// </summary>
    public class HydroCouplingPropertyViewModel : HydroJunctionPropertyViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroCouplingPropertyViewModel() : base() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroCouplingPropertyViewModel(Yw.Model.HydroCouplingInfo rhs) : base(rhs)
        {
            this.Material = rhs.Material;
            this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material));
            this.Caliber = rhs.Caliber;
            this.UpdatePropStatus(nameof(this.Caliber), rhs, nameof(rhs.Caliber));
        }
 
 
        /// <summary>
        /// 材料
        /// </summary>
        [Category("数据")]
        [DisplayName("材料")]
        [PropertyOrder(31)]
        [Browsable(true)]
        public string Material { get; set; }
 
        /// <summary>
        /// 口径
        /// </summary>
        [Category("数据")]
        [DisplayName("口径")]
        [PropertyOrder(32)]
        [DisplayUnit("mm")]
        [Browsable(true)]
        public double? Caliber { get; set; }
 
        /// <summary>
        /// 更新属性
        /// </summary>
        public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList)
        {
            base.UpdateProperty(rhs, allParterList);
            if (rhs is Yw.Model.HydroCouplingInfo hydroCouplingInfo)
            {
                this.Material = hydroCouplingInfo.Material;
                this.UpdatePropStatus(nameof(this.Material), hydroCouplingInfo, nameof(hydroCouplingInfo.Material));
                this.Caliber = hydroCouplingInfo.Caliber;
                this.UpdatePropStatus(nameof(this.Caliber), hydroCouplingInfo, nameof(hydroCouplingInfo.Caliber));
            }
        }
 
 
 
    }
}