| | |
| | | public RevitParter(Model.RevitParter rhs) |
| | | { |
| | | this.Id = rhs.Id; |
| | | this.Catalog = rhs.Catalog; |
| | | this.Name = rhs.Name; |
| | | this.Code = rhs.Code; |
| | | this.ModelType = rhs.ModelType; |
| | | this.Flags = rhs.Flags; |
| | | this.Description = rhs.Description; |
| | |
| | | public string Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分类 |
| | | /// </summary> |
| | | public string Catalog { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 编码 |
| | | /// </summary> |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 型号 |
| | |
| | | /// </summary> |
| | | public List<RevitPropStatus> PropStatusList { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 获取属性名称 |
| | | /// </summary> |
| | | public RevitPropStatus GetPropStatus(string propName) |
| | | { |
| | | if (string.IsNullOrEmpty(propName)) |
| | | { |
| | | return default; |
| | | } |
| | | var propStatus = this.PropStatusList?.Find(x => x.PropName == propName); |
| | | return propStatus; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新属性状态 |
| | | /// </summary> |
| | | public bool UpdatePropStatus(string propName, ePropStatus propStatus, string statusInfo) |
| | | { |
| | | if (string.IsNullOrEmpty(propName)) |
| | | { |
| | | return false; |
| | | } |
| | | if (this.PropStatusList == null) |
| | | { |
| | | this.PropStatusList = new List<Model.RevitPropStatus>(); |
| | | } |
| | | var propStatusModel = this.GetPropStatus(propName); |
| | | if (propStatusModel == null) |
| | | { |
| | | propStatusModel = new Model.RevitPropStatus() { PropName = propName }; |
| | | this.PropStatusList.Add(propStatusModel); |
| | | } |
| | | propStatusModel.PropStatus = propStatus; |
| | | propStatusModel.StatusInfo = statusInfo; |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |