lixiaojun
2024-11-08 571fb22bfd7ca4b0ca49328be3a3e91c0e3fed0d
WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs
@@ -22,11 +22,32 @@
        }
        /// <summary>
        /// 材料
        /// </summary>
        [Category("数据")]
        [DisplayName("材料")]
        [Display(Name = "材料")]
        [PropertyOrder(3001)]
        [Browsable(true)]
        public string Material { get; set; }
        /// <summary>
        /// 口径
        /// </summary>
        [Category("数据")]
        [DisplayName("口径")]
        [Display(Name = "口径(mm)")]
        [DisplayUnit("mm")]
        [PropertyOrder(3002)]
        [Browsable(true)]
        public double? Caliber { get; set; }
        /// <summary>
        /// 喷射系数
        /// </summary>
        [Category("数据")]
        [DisplayName("喷射系数")]
        [PropertyOrder(1001)]
        [PropertyOrder(3003)]
        [Browsable(true)]
        public virtual double Coefficient { get; set; }
@@ -42,6 +63,10 @@
        public override void UpdateProperty()
        {
            base.UpdateProperty();
            this.Material = this.Vmo.Material;
            this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material));
            this.Caliber = this.Vmo.Caliber;
            this.UpdatePropStatus(nameof(this.Caliber), this.Vmo, nameof(this.Vmo.Caliber));
            this.Coefficient = this.Vmo.Coefficient;
            this.UpdatePropStatus(nameof(this.Coefficient), this.Vmo, nameof(this.Vmo.Coefficient));
        }
@@ -52,6 +77,10 @@
        public override void UpdateVmoProperty()
        {
            base.UpdateVmoProperty();
            this.Vmo.Material = this.Material;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Material), this, nameof(this.Material));
            this.Vmo.Caliber = this.Caliber;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Caliber), this, nameof(this.Caliber));
            this.Vmo.Coefficient = this.Coefficient;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Coefficient), this, nameof(this.Coefficient));
        }