lixiaojun
2024-12-13 56f8d725e3e195a937da02aff340deeb32e6e5ac
WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs
@@ -23,8 +23,6 @@
            this.UpdatePropStatus(nameof(this.Demand), rhs, nameof(rhs.Demand));
            this.DemandPattern = rhs.DemandPattern;
            this.UpdatePropStatus(nameof(this.DemandPattern), rhs, nameof(rhs.DemandPattern));
            this.Vmo = rhs;
        }
@@ -33,8 +31,9 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("标高")]
        [PropertyOrder(1001)]
        [Display(Name = "标高(m)")]
        [DisplayUnit("m")]
        [PropertyOrder(2001)]
        [Browsable(true)]
        public virtual double Elev { get; set; }
@@ -43,7 +42,8 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("损失系数")]
        [PropertyOrder(1002)]
        [Display(Name = "损失系数")]
        [PropertyOrder(2002)]
        [Browsable(true)]
        public virtual double? MinorLoss { get; set; }
@@ -52,8 +52,9 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("需水量")]
        [PropertyOrder(1003)]
        [Display(Name = "需水量(m³/h)")]
        [DisplayUnit("m³/h")]
        [PropertyOrder(2003)]
        [Browsable(false)]
        public virtual double? Demand { get; set; }
@@ -62,8 +63,9 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("需水模式")]
        [PropertyOrder(1004)]
        [IsHydroPatternPro(HydroPattern.Demand)]
        [Display(Name = "需水模式")]
        [HydroPatternPro(HydroPattern.Demand)]
        [PropertyOrder(2004)]
        [Browsable(false)]
        public virtual string DemandPattern { get; set; }
@@ -71,14 +73,18 @@
        /// 
        /// </summary>
        [Browsable(false)]
        public new Yw.Model.HydroJunctionInfo Vmo { get; set; }
        public new Yw.Model.HydroJunctionInfo Vmo
        {
            get { return _vmo as Yw.Model.HydroJunctionInfo; }
            set { _vmo = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public override void Update()
        public override void UpdateProperty()
        {
            base.Update();
            base.UpdateProperty();
            this.Elev = this.Vmo.Elev;
            this.UpdatePropStatus(nameof(this.Elev), this.Vmo, nameof(this.Vmo.Elev));
            this.MinorLoss = this.Vmo.MinorLoss;
@@ -89,7 +95,21 @@
            this.UpdatePropStatus(nameof(this.DemandPattern), this.Vmo, nameof(this.Vmo.DemandPattern));
        }
        /// <summary>
        ///
        /// </summary>
        public override void UpdateVmoProperty()
        {
            base.UpdateVmoProperty();
            this.Vmo.Elev = this.Elev;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Elev), this, nameof(this.Elev));
            this.Vmo.MinorLoss = this.MinorLoss;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.MinorLoss), this, nameof(this.MinorLoss));
            this.Vmo.Demand = this.Demand;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Demand), this, nameof(this.Demand));
            this.Vmo.DemandPattern = this.DemandPattern;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.DemandPattern), this, nameof(this.DemandPattern));
        }
    }