Shuxia Ning
2024-12-17 907a1579fecf2c160852cf99b3ea77c08eb481cc
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
92
93
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 过渡件视图
    /// </summary>
    public class HydroTranslationViewModel : HydroPipeViewModel, IHydroCalcuTranslationResult
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroTranslationViewModel() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroTranslationViewModel(Yw.Model.HydroTranslationInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
        {
            this.StartDiameter = Math.Round(rhs.StartDiameter, 0);
            this.UpdatePropStatus(nameof(this.StartDiameter), rhs, nameof(rhs.StartDiameter));
            this.EndDiameter = Math.Round(rhs.EndDiameter, 0);
            this.UpdatePropStatus(nameof(this.EndDiameter), rhs, nameof(rhs.EndDiameter));
        }
 
        /// <summary>
        /// 直径
        /// </summary>
        [Category("数据")]
        [Display(Name = "直径(mm)")]
        [DisplayName("直径")]
        [DisplayUnit("mm")]
        [PropertyOrder(2002)]
        [Browsable(false)]
        public override double Diameter { get; set; }
 
        /// <summary>
        /// 上游直径
        /// </summary>
        [Category("数据")]
        [Display(Name = "上游直径(mm)")]
        [DisplayName("上游直径")]
        [DisplayUnit("mm")]
        [PropertyOrder(3001)]
        [Browsable(true)]
        public double StartDiameter { get; set; }
 
        /// <summary>
        /// 下游直径
        /// </summary>
        [Category("数据")]
        [Display(Name = "下游直径(mm)")]
        [DisplayName("下游直径")]
        [DisplayUnit("mm")]
        [PropertyOrder(3002)]
        [Browsable(true)]
        public double EndDiameter { get; set; }
 
        /// <summary>
        /// 
        /// </summary>
        [Browsable(false)]
        public new Yw.Model.HydroTranslationInfo Vmo
        {
            get { return _vmo as Yw.Model.HydroTranslationInfo; }
            set { _vmo = value; }
        }
 
 
        /// <summary>
        /// 更新属性
        /// </summary>
        public override void UpdateProperty()
        {
            base.UpdateProperty();
            this.StartDiameter = this.Vmo.StartDiameter;
            this.UpdatePropStatus(nameof(this.StartDiameter), this.Vmo, nameof(this.Vmo.StartDiameter));
            this.EndDiameter = this.Vmo.EndDiameter;
            this.UpdatePropStatus(nameof(this.EndDiameter), this.Vmo, nameof(this.Vmo.EndDiameter));
        }
 
        /// <summary>
        /// 
        /// </summary>
        public override void UpdateVmoProperty()
        {
            base.UpdateVmoProperty();
            this.Vmo.StartDiameter = this.StartDiameter;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.StartDiameter), this, nameof(this.StartDiameter));
            this.Vmo.EndDiameter = this.EndDiameter;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.EndDiameter), this, nameof(this.EndDiameter));
        }
 
    }
}