using DevExpress.Utils.Svg; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HStation.WinFrmUI { /// /// /// public class XhsSchemeExchangerChangeViewModel { /// /// /// public XhsSchemeExchangerChangeViewModel() { this.SvgImage = HStation.WinFrmUI.AssetsMainSvgImageHelper.Exchanger; } /// /// /// public XhsSchemeExchangerChangeViewModel(HydroExchangerViewModel rhs) { this.ViewModel = rhs; this.SvgImage = HStation.WinFrmUI.AssetsMainSvgImageHelper.Exchanger; } /// /// 名称 /// public string Name { get { var name = this.ViewModel.Name; if (!string.IsNullOrEmpty(this.ViewModel.ModelType)) { name += $"({this.ViewModel.ModelType})"; } return name; } } /// /// 材质 /// [Display(Name = "材质")] public string Material { get { return this.ViewModel.Material; } set { this.ViewModel.Material = value; } } /// /// 直径 /// [Display(Name = "直径")] public double Diameter { get { return this.ViewModel.Diameter; } set { this.ViewModel.Diameter = value; } } /// /// 局阻系数 /// [Display(Name = "局阻系数")] public double MinorLoss { get { return this.ViewModel.MinorLoss; } set { this.ViewModel.MinorLoss = value; } } /// /// 水头损失曲线 /// [Display(Name = "水头损失曲线")] public string Curve { get { if (string.IsNullOrEmpty(this.ViewModel.CurveQL)) { return "未配置"; } return "已配置"; } } /// /// ViewMdoel /// public HydroExchangerViewModel ViewModel { get; set; } /// /// 图片 /// public SvgImage SvgImage { get; set; } /// /// 查看图片 /// public SvgImage ViewImage { get; set; } } }