lixiaojun
2025-01-22 46f64905a3c309a50c0f245b3350cdeb8dd699c6
WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/00-core/HydroLinkViewModel.cs
@@ -16,23 +16,9 @@
        public HydroLinkViewModel(Yw.Model.HydroLinkInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
        {
            this.StartCode = rhs.StartCode;
            this.UpdatePropStatus(nameof(this.StartCode), rhs, nameof(rhs.StartCode));
            this.EndCode = rhs.EndCode;
            this.UpdatePropStatus(nameof(this.EndCode), rhs, nameof(rhs.EndCode));
            this.LinkStatus = HydroLinkStatusHelper.GetStatusName(rhs.LinkStatus);
            this.UpdatePropStatus(nameof(this.LinkStatus), rhs, nameof(rhs.LinkStatus));
        }
        /// <summary>
        /// Y流向
        /// </summary>
        [Category("拓扑结构")]
        [DisplayName("Y流向")]
        [HydroFlowDirectionPro]
        [PropertyOrder(102)]
        [TypeConverter(typeof(HydroFlowDirectionConverter))]
        [Browsable(false)]
        public override string FlowDirectionY { get; set; }
        /// <summary>
        /// 上游节点
@@ -55,15 +41,6 @@
        [ReadOnly(true)]
        [Browsable(true)]
        public string EndCode { get; set; }
        /// <summary>
        /// 管段状态
        /// </summary>
        [Category("数据")]
        [DisplayName("管段状态")]
        [PropertyOrder(1003)]
        [Browsable(false)]
        public virtual string LinkStatus { get; set; }
        /// <summary>
        /// 流量
@@ -147,11 +124,7 @@
        {
            base.UpdateProperty();
            this.StartCode = this.Vmo.StartCode;
            this.UpdatePropStatus(nameof(this.StartCode), this.Vmo, nameof(this.Vmo.StartCode));
            this.EndCode = this.Vmo.EndCode;
            this.UpdatePropStatus(nameof(this.EndCode), this.Vmo, nameof(this.Vmo.EndCode));
            this.LinkStatus = HydroLinkStatusHelper.GetStatusName(this.Vmo.LinkStatus);
            this.UpdatePropStatus(nameof(this.LinkStatus), this.Vmo, nameof(this.Vmo.LinkStatus));
        }
        /// <summary>
@@ -161,11 +134,7 @@
        {
            base.UpdateVmoProperty();
            this.Vmo.StartCode = this.StartCode;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.StartCode), this, nameof(this.StartCode));
            this.Vmo.EndCode = this.EndCode;
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.EndCode), this, nameof(this.EndCode));
            this.Vmo.LinkStatus = HydroLinkStatusHelper.GetStatusCode(this.LinkStatus);
            this.Vmo.UpdatePropStatus(nameof(this.Vmo.LinkStatus), this, nameof(this.LinkStatus));
        }
        /// <summary>
@@ -185,5 +154,8 @@
        }
    }
}