lixiaojun
2024-12-17 a2ad15911dcde2d45cd546d5b8d7fb791f7afafd
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
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 水力可见组件
    /// </summary>
    public class HydroVisualViewModel : HydroParterViewModel, IHydroCalcuVisualResult
    {
        /// <summary>
        /// 
        /// </summary>
        public HydroVisualViewModel() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroVisualViewModel(Yw.Model.HydroVisualInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
        {
            this.FlowDirectionX = HydroFlowDirectionHelper.GetName(rhs.FlowDirectionX);
            this.UpdatePropStatus(nameof(this.FlowDirectionX), rhs, nameof(rhs.FlowDirectionX));
            this.FlowDirectionY = HydroFlowDirectionHelper.GetName(rhs.FlowDirectionY);
            this.UpdatePropStatus(nameof(this.FlowDirectionY), rhs, nameof(rhs.FlowDirectionY));
        }
 
 
        /// <summary>
        /// X流向
        /// </summary>
        [Category("拓扑结构")]
        [DisplayName("X流向")]
        [HydroFlowDirectionPro]
        [PropertyOrder(101)]
        [Browsable(true)]
        [TypeConverter(typeof(HydroFlowDirectionConverter))]
        public virtual string FlowDirectionX { get; set; }
 
        /// <summary>
        /// Y流向
        /// </summary>
        [Category("拓扑结构")]
        [DisplayName("Y流向")]
        [HydroFlowDirectionPro]
        [PropertyOrder(102)]
        [Browsable(true)]
        [TypeConverter(typeof(HydroFlowDirectionConverter))]
        public virtual string FlowDirectionY { get; set; }
 
        /// <summary>
        /// vmo
        /// </summary>
        [Browsable(false)]
        public new Yw.Model.HydroVisualInfo Vmo
        {
            get { return _vmo as Yw.Model.HydroVisualInfo; }
            set { _vmo = value; }
        }
 
        /// <summary>
        /// 更新属性
        /// </summary>
        public override void UpdateProperty()
        {
            base.UpdateProperty();
            this.FlowDirectionX = HydroFlowDirectionHelper.GetName(this.Vmo.FlowDirectionX);
            this.UpdatePropStatus(nameof(this.FlowDirectionX), this.Vmo, nameof(this.Vmo.FlowDirectionX));
            this.FlowDirectionY = HydroFlowDirectionHelper.GetName(this.Vmo.FlowDirectionY);
            this.UpdatePropStatus(nameof(this.FlowDirectionY), this.Vmo, nameof(this.Vmo.FlowDirectionY));
        }
 
        /// <summary>
        /// 更新 Vmo 属性
        /// </summary>
        public override void UpdateVmoProperty()
        {
            base.UpdateVmoProperty();
            this.Vmo.FlowDirectionX = HydroFlowDirectionHelper.GetCode(this.FlowDirectionX);
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.FlowDirectionX), this, nameof(this.FlowDirectionX));
            this.Vmo.FlowDirectionY = HydroFlowDirectionHelper.GetCode(this.FlowDirectionY);
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.FlowDirectionY), this, nameof(this.FlowDirectionY));
        }
 
 
    }
}