| | |
| | | namespace Yw.WinFrmUI |
| | | using Yw.Hydro; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// 水力组件视图 |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroParterViewModel(Yw.Model.HydroParterInfo rhs, Yw.Model.HydroModelInfo hydroInfo) |
| | | public HydroParterViewModel |
| | | ( |
| | | Yw.Model.HydroParterInfo rhs, |
| | | Yw.Model.HydroModelInfo hydroInfo |
| | | ) |
| | | { |
| | | this.Code = rhs.Code; |
| | | this.Name = rhs.Name; |
| | | this.Catalog = HydroParterCatalogHelper.GetName(rhs.Catalog); |
| | | this.ModelType = rhs.ModelType; |
| | | this.DbId = rhs.DbId; |
| | | this.DbLocked = rhs.DbLocked; |
| | | this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); |
| | | this.Description = rhs.Description; |
| | | this.DbLocked = rhs.DbLocked; |
| | | |
| | | this.Vmo = rhs; |
| | | this.HydroInfo = hydroInfo; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroParterViewModel |
| | | ( |
| | | Yw.Model.HydroParterInfo rhs, |
| | | Yw.Model.HydroModelInfo hydroInfo, |
| | | HydroParterPropStatusHelper propStatusHelper |
| | | ) : this(rhs, hydroInfo) |
| | | { |
| | | this.PropStatusHelper = propStatusHelper; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [Browsable(false)] |
| | | public virtual Yw.Model.HydroModelInfo HydroInfo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PropStatusHelper |
| | | /// </summary> |
| | | [Browsable(false)] |
| | | public virtual HydroParterPropStatusHelper PropStatusHelper { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新属性 |
| | |
| | | this.Vmo.Description = this.Description; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新属性状态 |
| | | /// </summary> |
| | | public virtual void UpdatePropStatus(string propName, ePropStatus propStatus, string statusInfo) |
| | | { |
| | | this.PropStatusHelper?.UpdatePropStatus(this.Vmo, propName, propStatus, statusInfo); |
| | | } |
| | | |
| | | |
| | | |