using System.ComponentModel.DataAnnotations; namespace IStation.Win.View.ViewModel { public class RealTimePumpScadaSetViewModel { [Display(Name = "泵")] public int Flag { get; set; } [Display(Name = "运行状态")] public eRunStatus RunStatus { get; set; } [Display(Name = "进口水位")] public double? InletWaterLevel { get; set; } [Display(Name = "出口压力")] public double? OutletPressure { get; set; } [Display(Name = "瞬时流量")] public double? InstantaneousFlow { get; set; } [Display(Name = "有功功率")] public double? ActivePower { get; set; } [Display(Name = "转速")] public double? RotateSpeed { get; set; } [Display(Name = "检修状态")] public double? MaintenanceState { get; set; } public void Set() { if (this.RunStatus != eRunStatus.Open) { this.RunStatus = eRunStatus.Close; this.InletWaterLevel = null; this.OutletPressure = null; this.InstantaneousFlow = null; this.ActivePower = null; this.RotateSpeed = null; } } public enum eRunStatus { [Display(Name = "检修")] Maintenance = -1, [Display(Name = "关闭")] Close = 0, [Display(Name = "开启")] Open = 1 } } }