| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | | this.Flags = rhs.Flags?.ToList(); |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | |
| | | { |
| | | /// <summary> |
| | | /// 流量计 |
| | | ///</summary> |
| | | ///</summary> |
| | | public class AddAssetsFlowmeterMainInput |
| | | { |
| | | { |
| | | /// <summary> |
| | | /// 名称 |
| | | ///</summary> |
| | | ///</summary> |
| | | [Required] |
| | | public string Name { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage ="SeriesID 必须大于0")] |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "SeriesID 必须大于0")] |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | ///</summary> |
| | | public string KeyWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | ///</summary> |
| | | ///</summary> |
| | | public Dictionary<string, string> Paras { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | ///</summary> |
| | | ///</summary> |
| | | public List<string> Flags { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | ///</summary> |
| | | ///</summary> |
| | | public string TagName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | ///</summary> |
| | | ///</summary> |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | { |
| | | /// <summary> |
| | | /// 流量计 |
| | | ///</summary> |
| | | ///</summary> |
| | | public class UpdateAssetsFlowmeterMainInput |
| | | { |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage ="ID 必须大于0")] |
| | | /// ID |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "ID 必须大于0")] |
| | | public long ID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | ///</summary> |
| | | /// 名称 |
| | | ///</summary> |
| | | [Required] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage ="SeriesID 必须大于0")] |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | public string KeyWord { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | ///</summary> |
| | | public Dictionary<string, string> Paras { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | ///</summary> |
| | | public List<string> Flags { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | ///</summary> |
| | | public string TagName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | ///</summary> |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | ///</summary> |
| | | [Required, Range(1, long.MaxValue, ErrorMessage = "SeriesID 必须大于0")] |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | public string KeyWord { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | ///</summary> |
| | | public Dictionary<string, string> Paras { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | ///</summary> |
| | | public List<string> Flags { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | ///</summary> |
| | | public string TagName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | ///</summary> |
| | | public string Description { get; set; } |
| | | } |
| | | } |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public HStation.Assets.eAlgorithmType eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Diameter = rhs.Diameter; |
| | | this.StartDiameter = rhs.StartDiameter; |
| | | this.EndDiameter = rhs.EndDiameter; |
| | | this.Roughness = rhs.Roughness; |
| | | this.eAlgorithmType = rhs.eAlgorithmType; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public HStation.Assets.eAlgorithmType eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public HStation.Assets.eAlgorithmType eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | /// 水池 |
| | | ///</summary> |
| | | [SysType("assets-tank-main")] |
| | | [SugarTable("assets_tank_main")] |
| | | public class AssetsTankMain : BaseEntity , IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | [SugarTable("assets_tank_main")] |
| | | public class AssetsTankMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTankMain() { } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTankMain() |
| | | { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTankMain(AssetsTankMain rhs) : base(rhs) |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTankMain(AssetsTankMain rhs) : base(rhs) |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras; |
| | | this.Flags = rhs.Flags; |
| | | this.TagName = rhs.TagName; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Description = rhs.Description; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 名称 |
| | | ///</summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string Name { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | /// 参数 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Paras { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | /// 标签 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Flags { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | /// 标志 |
| | | ///</summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string TagName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | | /// 排序码 |
| | | ///</summary> |
| | | public int SortCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | /// 说明 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTankMain Clone() |
| | | { |
| | | return (AssetsTankMain)this.MemberwiseClone(); |
| | | return (AssetsTankMain)this.MemberwiseClone(); |
| | | } |
| | | |
| | | object ICloneable.Clone() |
| | | { |
| | | return this.MemberwiseClone(); |
| | | return this.MemberwiseClone(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras; |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | /// 流量计 |
| | | ///</summary> |
| | | [SysType("assets-flowmeter-main")] |
| | | [SugarTable("assets_flowmeter_main")] |
| | | public class AssetsFlowmeterMain : BaseEntity , IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | [SugarTable("assets_flowmeter_main")] |
| | | public class AssetsFlowmeterMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsFlowmeterMain() { } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsFlowmeterMain() |
| | | { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsFlowmeterMain(AssetsFlowmeterMain rhs) : base(rhs) |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsFlowmeterMain(AssetsFlowmeterMain rhs) : base(rhs) |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras; |
| | |
| | | this.TagName = rhs.TagName; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Description = rhs.Description; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 名称 |
| | | ///</summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string Name { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | /// 参数 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Paras { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | /// 标签 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Flags { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | /// 标志 |
| | | ///</summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string TagName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | | /// 排序码 |
| | | ///</summary> |
| | | public int SortCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | /// 说明 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsFlowmeterMain Clone() |
| | | { |
| | | return (AssetsFlowmeterMain)this.MemberwiseClone(); |
| | | return (AssetsFlowmeterMain)this.MemberwiseClone(); |
| | | } |
| | | |
| | | object ICloneable.Clone() |
| | | { |
| | | return this.MemberwiseClone(); |
| | | return this.MemberwiseClone(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /// 压力表 |
| | | ///</summary> |
| | | [SysType("assets-pressmeter-main")] |
| | | [SugarTable("assets_pressmeter_main")] |
| | | public class AssetsPressmeterMain : BaseEntity , IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | [SugarTable("assets_pressmeter_main")] |
| | | public class AssetsPressmeterMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsPressmeterMain() { } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsPressmeterMain() |
| | | { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsPressmeterMain(AssetsPressmeterMain rhs) : base(rhs) |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsPressmeterMain(AssetsPressmeterMain rhs) : base(rhs) |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras; |
| | |
| | | this.TagName = rhs.TagName; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Description = rhs.Description; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 名称 |
| | | ///</summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string Name { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | /// 参数 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Paras { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | /// 标签 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Flags { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | /// 标志 |
| | | ///</summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string TagName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | | /// 排序码 |
| | | ///</summary> |
| | | public int SortCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | /// 说明 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsPressmeterMain Clone() |
| | | { |
| | | return (AssetsPressmeterMain)this.MemberwiseClone(); |
| | | return (AssetsPressmeterMain)this.MemberwiseClone(); |
| | | } |
| | | |
| | | object ICloneable.Clone() |
| | | { |
| | | return this.MemberwiseClone(); |
| | | return this.MemberwiseClone(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /// 过渡件 |
| | | ///</summary> |
| | | [SysType("assets-translation-main")] |
| | | [SugarTable("assets_translation_main")] |
| | | public class AssetsTranslationMain : BaseEntity , IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | [SugarTable("assets_translation_main")] |
| | | public class AssetsTranslationMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTranslationMain() { } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTranslationMain() |
| | | { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTranslationMain(AssetsTranslationMain rhs) : base(rhs) |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTranslationMain(AssetsTranslationMain rhs) : base(rhs) |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Diameter = rhs.Diameter; |
| | | this.StartDiameter = rhs.StartDiameter; |
| | | this.EndDiameter = rhs.EndDiameter; |
| | | this.Roughness = rhs.Roughness; |
| | | this.eAlgorithmType = rhs.eAlgorithmType; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | |
| | | this.TagName = rhs.TagName; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Description = rhs.Description; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 名称 |
| | | ///</summary> |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | [SugarColumn(Length = 50, IsNullable = true)] |
| | | public string Name { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 系列ID |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public int eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string Material { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | /// 识别关键字 |
| | | ///</summary> |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | [SugarColumn(Length = 255, IsNullable = true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 参数 |
| | | /// 参数 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Paras { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标签 |
| | | /// 标签 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Flags { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标志 |
| | | /// 标志 |
| | | ///</summary> |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | [SugarColumn(Length = 500, IsNullable = true)] |
| | | public string TagName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | | /// 排序码 |
| | | ///</summary> |
| | | public int SortCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | /// 说明 |
| | | ///</summary> |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] |
| | | public string Description { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AssetsTranslationMain Clone() |
| | | { |
| | | return (AssetsTranslationMain)this.MemberwiseClone(); |
| | | return (AssetsTranslationMain)this.MemberwiseClone(); |
| | | } |
| | | |
| | | object ICloneable.Clone() |
| | | { |
| | | return this.MemberwiseClone(); |
| | | return this.MemberwiseClone(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | | this.Flags = rhs.Flags?.ToList(); |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | | this.Flags = rhs.Flags?.ToList(); |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | { |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Diameter = rhs.Diameter; |
| | | this.StartDiameter = rhs.StartDiameter; |
| | | this.EndDiameter = rhs.EndDiameter; |
| | | this.Roughness = rhs.Roughness; |
| | | this.eAlgorithmType = rhs.eAlgorithmType; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Diameter = rhs.Diameter; |
| | | this.StartDiameter = rhs.StartDiameter; |
| | | this.EndDiameter = rhs.EndDiameter; |
| | | this.Roughness = rhs.Roughness; |
| | | this.eAlgorithmType = rhs.eAlgorithmType; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public HStation.Assets.eAlgorithmType eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | | this.Flags = rhs.Flags?.ToList(); |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 最低水位 |
| | | /// </summary> |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | /// 最高水位 |
| | | /// </summary> |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | | ///</summary> |
| | | public double MinorLoss { get; set; } |
| | | /// 公称直径 |
| | | /// </summary> |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.Paras = rhs.Paras == null ? null : new(rhs.Paras); |
| | |
| | | /// 系列ID |
| | | ///</summary> |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | ///</summary> |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 局阻系数 |
| | |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.Caliber = rhs.Caliber; |
| | | this.Diameter = rhs.Diameter; |
| | | this.StartDiameter = rhs.StartDiameter; |
| | | this.EndDiameter = rhs.EndDiameter; |
| | | this.Roughness = rhs.Roughness; |
| | | this.eAlgorithmType = rhs.eAlgorithmType; |
| | | this.Material = rhs.Material; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.KeyWord = rhs.KeyWord; |
| | |
| | | public long SeriesID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | ///</summary> |
| | | public double? Caliber { get; set; } |
| | | /// 直径 |
| | | /// </summary> |
| | | public double Diameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 上游直径 |
| | | /// </summary> |
| | | public double StartDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下游直径 |
| | | /// </summary> |
| | | public double EndDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 粗糙系数 |
| | | /// </summary> |
| | | public double Roughness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 算法类型 |
| | | /// </summary> |
| | | public HStation.Assets.eAlgorithmType eAlgorithmType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | _TankVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _TankVmo.Name = TextEditName.Text.Trim(); |
| | | _TankVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | _TankVmo.Material = TextEditMaterial.Text.Trim(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _TankVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double minorLoss)) |
| | | { |
| | | _TankVmo.MinorLoss = minorLoss; |
| | | } |
| | | |
| | | _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; |
| | | if (await this.ReloadDataEvent.Invoke(_TankVmo)) |
| | | { |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_TankVmo.Caliber == null) |
| | | { |
| | | TextEditCaliber.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditCaliber.EditValue = _TankVmo.Caliber.ToString(); |
| | | } |
| | | if (_TankVmo.Material == null) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditMaterial.EditValue = _TankVmo.Material.ToString(); |
| | | } |
| | | |
| | | this.TextEditName.Text = _TankVmo.Name; |
| | | this.TextEditMinorLoss.Text = _TankVmo.MinorLoss.ToString(); |
| | | this.DescriptionTextEdit.Text = _TankVmo.Description; |
| | | this.TextEditKeyWord.Text = string.Join(",", _TankVmo.KeyWord); |
| | | this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(_TankVmo.Flags); |
| | |
| | | { |
| | | if (!(Valid())) |
| | | return; |
| | | _TankVmo.Material = TextEditMaterial.Text.Trim(); |
| | | _TankVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _TankVmo.Name = TextEditName.Text.Trim(); |
| | | _TankVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _TankVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double MinorLoss)) |
| | | { |
| | | _TankVmo.MinorLoss = MinorLoss; |
| | | } |
| | | |
| | | _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; |
| | | if (await this.ReloadDataEvent.Invoke(_TankVmo)) |
| | | { |
| | |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | | |
| | | public void Reset(Vmo.AssetsTankMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Description = rhs.Description; |
| | | this.Name = rhs.Name; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | | this.SortCode = rhs.SortCode; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// 最低水位 |
| | | /// </summary> |
| | | [DisplayName("口径(mm)")] |
| | | [DisplayName("最低水位")] |
| | | [Browsable(true)] |
| | | public string Caliber { get; set; } |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | /// 最高水位 |
| | | /// </summary> |
| | | [DisplayName("材料")] |
| | | [DisplayName("最高水位")] |
| | | [Browsable(true)] |
| | | public string Material { get; set; } |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 系数 |
| | | /// 公称直径 |
| | | /// </summary> |
| | | [DisplayName("系数")] |
| | | [DisplayName("公称直径")] |
| | | [Browsable(true)] |
| | | public double MinorLoss { get; set; } |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | [DisplayName("最小容积")] |
| | | [Browsable(true)] |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | [DisplayName("是否允许溢流")] |
| | | [Browsable(true)] |
| | | public bool OverFlow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)MeterCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | |
| | | // |
| | | // selectFlagsPopupCtrl1 |
| | | // |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 80); |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 56); |
| | | selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; |
| | | selectFlagsPopupCtrl1.Size = new Size(597, 19); |
| | | selectFlagsPopupCtrl1.Size = new Size(597, 20); |
| | | selectFlagsPopupCtrl1.TabIndex = 6; |
| | | // |
| | | // popupContainerControl1 |
| | |
| | | // |
| | | // DescriptionTextEdit |
| | | // |
| | | DescriptionTextEdit.Location = new Point(20, 136); |
| | | DescriptionTextEdit.Location = new Point(20, 113); |
| | | DescriptionTextEdit.Name = "DescriptionTextEdit"; |
| | | DescriptionTextEdit.Size = new Size(637, 306); |
| | | DescriptionTextEdit.Size = new Size(637, 329); |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 7; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(264, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(404, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(265, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | | // |
| | | // TextEditKeyWord |
| | | // |
| | |
| | | // |
| | | // TextEditMinorLoss |
| | | // |
| | | TextEditMinorLoss.Location = new Point(72, 56); |
| | | TextEditMinorLoss.Location = new Point(72, 32); |
| | | TextEditMinorLoss.Name = "TextEditMinorLoss"; |
| | | TextEditMinorLoss.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMinorLoss.Properties.PopupControl = popupContainerControl1; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem12, layoutControlGroup5, layoutControlItem9, layoutControlItem2, layoutControlItem7, layoutControlItem3 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem2, layoutControlItem7, layoutControlItem3 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(677, 488); |
| | |
| | | layoutControlItem1.Text = "<color=red>*</color>型号:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(332, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(333, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlGroup5 |
| | | // |
| | | layoutControlGroup5.AppearanceGroup.FontSizeDelta = 1; |
| | | layoutControlGroup5.AppearanceGroup.Options.UseFont = true; |
| | | layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); |
| | | layoutControlGroup5.Location = new Point(0, 95); |
| | | layoutControlGroup5.Location = new Point(0, 72); |
| | | layoutControlGroup5.Name = "layoutControlGroup5"; |
| | | layoutControlGroup5.Size = new Size(665, 355); |
| | | layoutControlGroup5.Size = new Size(665, 378); |
| | | layoutControlGroup5.Text = "说明"; |
| | | // |
| | | // layoutControlItem5 |
| | |
| | | layoutControlItem5.Control = DescriptionTextEdit; |
| | | layoutControlItem5.Location = new Point(0, 0); |
| | | layoutControlItem5.Name = "layoutControlItem5"; |
| | | layoutControlItem5.Size = new Size(641, 310); |
| | | layoutControlItem5.Size = new Size(641, 333); |
| | | layoutControlItem5.Text = "说明:"; |
| | | layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextToControlDistance = 0; |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(332, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | |
| | | // layoutControlItem7 |
| | | // |
| | | layoutControlItem7.Control = TextEditMinorLoss; |
| | | layoutControlItem7.Location = new Point(0, 48); |
| | | layoutControlItem7.Location = new Point(0, 24); |
| | | layoutControlItem7.Name = "layoutControlItem7"; |
| | | layoutControlItem7.Size = new Size(665, 24); |
| | | layoutControlItem7.Text = "局阻系数:"; |
| | |
| | | // layoutControlItem3 |
| | | // |
| | | layoutControlItem3.Control = selectFlagsPopupCtrl1; |
| | | layoutControlItem3.Location = new Point(0, 72); |
| | | layoutControlItem3.Location = new Point(0, 48); |
| | | layoutControlItem3.Name = "layoutControlItem3"; |
| | | layoutControlItem3.Size = new Size(665, 23); |
| | | layoutControlItem3.Size = new Size(665, 24); |
| | | layoutControlItem3.Text = "标签列表:"; |
| | | layoutControlItem3.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)MeterCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | | private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | | private DevExpress.XtraEditors.TextEdit TextEditKeyWord; |
| | |
| | | this.MeterCoefficientViewModelBindingSource.DataSource = _AssetsMeterCoefficient; |
| | | _MeterVmo = new Vmo.AssetsMeterMainVmo(); |
| | | _MeterVmo.SeriesID = SeriesID; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.ID); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | | foreach (var item in allMaterial) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.ID); |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | TextEditCaliber.SelectedIndex = 0; |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(); |
| | | } |
| | | |
| | |
| | | return true; |
| | | } |
| | | |
| | | //材料选择变化事件 |
| | | private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsMeterCoefficient == null) |
| | | return; |
| | | var select = GetCoefficientByMaterial(TextEditMaterial.Text); |
| | | if (select == null) |
| | | { |
| | | this.TextEditCoefficient.Text = string.Empty; |
| | | return; |
| | | } |
| | | this.TextEditCoefficient.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsMeterCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsMeterCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditCoefficient.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsMeterCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | | AssetsMeterCoefficientVmo select = null; |
| | | int maxMatchedChars = 0; |
| | | foreach (var item in _AssetsMeterCoefficient) |
| | | { |
| | | int matchedChars = GetIntersect(item.Material, name); |
| | | if (matchedChars > maxMatchedChars) |
| | | { |
| | | maxMatchedChars = matchedChars; |
| | | select = item; |
| | | return select; |
| | | } |
| | | } |
| | | return select; |
| | | } |
| | | |
| | | private int GetIntersect(string str1, string str2) |
| | | { |
| | | if (str1 == null || str2 == null) return 0; |
| | | return string.Join("", str1.Intersect(str2)).Count(); |
| | | } |
| | | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | |
| | | _MeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _MeterVmo.Name = TextEditName.Text.Trim(); |
| | | _MeterVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | _MeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _MeterVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double minorLoss)) |
| | | { |
| | | _MeterVmo.MinorLoss = minorLoss; |
| | |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="BluntheadCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="MeterCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>340, 17</value> |
| | | <value>317, 17</value> |
| | | </metadata> |
| | | <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>495, 17</value> |
| | | <value>472, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)MeterCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | |
| | | // |
| | | // selectFlagsPopupCtrl1 |
| | | // |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 80); |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 56); |
| | | selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 20); |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 21); |
| | | selectFlagsPopupCtrl1.TabIndex = 7; |
| | | // |
| | | // popupContainerControl1 |
| | |
| | | // |
| | | // DescriptionTextEdit |
| | | // |
| | | DescriptionTextEdit.Location = new Point(20, 137); |
| | | DescriptionTextEdit.Location = new Point(20, 114); |
| | | DescriptionTextEdit.Name = "DescriptionTextEdit"; |
| | | DescriptionTextEdit.Size = new Size(641, 299); |
| | | DescriptionTextEdit.Size = new Size(641, 322); |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 6; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(266, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(406, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(267, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | | // |
| | | // TextEditKeyWord |
| | | // |
| | |
| | | // |
| | | // TextEditMinorLoss |
| | | // |
| | | TextEditMinorLoss.Location = new Point(72, 56); |
| | | TextEditMinorLoss.Location = new Point(72, 32); |
| | | TextEditMinorLoss.Name = "TextEditMinorLoss"; |
| | | TextEditMinorLoss.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMinorLoss.Properties.PopupControl = popupContainerControl1; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem9, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(681, 482); |
| | |
| | | layoutControlItem1.Text = "<color=red>*</color>型号:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(334, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlGroup5 |
| | | // |
| | | layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); |
| | | layoutControlGroup5.Location = new Point(0, 96); |
| | | layoutControlGroup5.Location = new Point(0, 73); |
| | | layoutControlGroup5.Name = "layoutControlGroup5"; |
| | | layoutControlGroup5.Size = new Size(669, 348); |
| | | layoutControlGroup5.Size = new Size(669, 371); |
| | | layoutControlGroup5.Text = "说明"; |
| | | // |
| | | // layoutControlItem5 |
| | |
| | | layoutControlItem5.Control = DescriptionTextEdit; |
| | | layoutControlItem5.Location = new Point(0, 0); |
| | | layoutControlItem5.Name = "layoutControlItem5"; |
| | | layoutControlItem5.Size = new Size(645, 303); |
| | | layoutControlItem5.Size = new Size(645, 326); |
| | | layoutControlItem5.Text = "说明:"; |
| | | layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextToControlDistance = 0; |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(334, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(335, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem7 |
| | | // |
| | |
| | | // layoutControlItem11 |
| | | // |
| | | layoutControlItem11.Control = TextEditMinorLoss; |
| | | layoutControlItem11.Location = new Point(0, 48); |
| | | layoutControlItem11.Location = new Point(0, 24); |
| | | layoutControlItem11.Name = "layoutControlItem11"; |
| | | layoutControlItem11.Size = new Size(669, 24); |
| | | layoutControlItem11.Text = "局阻系数:"; |
| | |
| | | // layoutControlItem6 |
| | | // |
| | | layoutControlItem6.Control = selectFlagsPopupCtrl1; |
| | | layoutControlItem6.Location = new Point(0, 72); |
| | | layoutControlItem6.Location = new Point(0, 48); |
| | | layoutControlItem6.Name = "layoutControlItem6"; |
| | | layoutControlItem6.Size = new Size(669, 24); |
| | | layoutControlItem6.Size = new Size(669, 25); |
| | | layoutControlItem6.Text = "标签列表:"; |
| | | layoutControlItem6.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)MeterCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | | private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | | private DevExpress.XtraEditors.TextEdit TextEditKeyWord; |
| | |
| | | this.MeterCoefficientViewModelBindingSource.DataSource = _AssetsMeterCoefficient; |
| | | |
| | | _MeterVmo = MeterVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | | foreach (var item in allMaterial) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_MeterVmo.Caliber == null) |
| | | { |
| | | TextEditCaliber.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditCaliber.EditValue = _MeterVmo.Caliber.ToString(); |
| | | } |
| | | if (_MeterVmo.Material == null) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditMaterial.EditValue = _MeterVmo.Material.ToString(); |
| | | } |
| | | |
| | | this.TextEditName.Text = _MeterVmo.Name; |
| | | this.TextEditMinorLoss.Text = _MeterVmo.MinorLoss.ToString(); |
| | | this.DescriptionTextEdit.Text = _MeterVmo.Description; |
| | |
| | | return true; |
| | | } |
| | | |
| | | //材料选择变化事件 |
| | | private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsMeterCoefficient == null) |
| | | return; |
| | | var select = GetCoefficientByMaterial(TextEditMaterial.Text); |
| | | if (select == null) |
| | | { |
| | | this.TextEditMinorLoss.Text = string.Empty; |
| | | return; |
| | | } |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsMeterCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsMeterCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditMinorLoss.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsMeterCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | | AssetsMeterCoefficientVmo select = null; |
| | | int maxMatchedChars = 0; |
| | | foreach (var item in _AssetsMeterCoefficient) |
| | | { |
| | | int matchedChars = GetIntersect(item.Material, name); |
| | | if (matchedChars > maxMatchedChars) |
| | | { |
| | | maxMatchedChars = matchedChars; |
| | | select = item; |
| | | return select; |
| | | } |
| | | } |
| | | return select; |
| | | } |
| | | |
| | | private int GetIntersect(string str1, string str2) |
| | | { |
| | | if (str1 == null || str2 == null) return 0; |
| | | return string.Join("", str1.Intersect(str2)).Count(); |
| | | } |
| | | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | | if (!(Valid())) |
| | | return; |
| | | _MeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | _MeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _MeterVmo.Name = TextEditName.Text.Trim(); |
| | | _MeterVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _MeterVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double MinorLoss)) |
| | | { |
| | | _MeterVmo.MinorLoss = MinorLoss; |
| | |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | |
| | | public void Reset(Vmo.AssetsMeterMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Description = rhs.Description; |
| | | this.Name = rhs.Name; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | |
| | | [DisplayName("名称")] |
| | | [Browsable(true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// </summary> |
| | | [DisplayName("口径(mm)")] |
| | | [Browsable(true)] |
| | | public string Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | /// </summary> |
| | | [DisplayName("材料")] |
| | | [Browsable(true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 系数 |
| | |
| | | _FlowmeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _FlowmeterVmo.Name = TextEditName.Text.Trim(); |
| | | _FlowmeterVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | _FlowmeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _FlowmeterVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double minorLoss)) |
| | | { |
| | | _FlowmeterVmo.MinorLoss = minorLoss; |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)FlowmeterCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | |
| | | // |
| | | // selectFlagsPopupCtrl1 |
| | | // |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 80); |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 56); |
| | | selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 20); |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 21); |
| | | selectFlagsPopupCtrl1.TabIndex = 7; |
| | | // |
| | | // popupContainerControl1 |
| | |
| | | // |
| | | // DescriptionTextEdit |
| | | // |
| | | DescriptionTextEdit.Location = new Point(20, 137); |
| | | DescriptionTextEdit.Location = new Point(20, 114); |
| | | DescriptionTextEdit.Name = "DescriptionTextEdit"; |
| | | DescriptionTextEdit.Size = new Size(641, 299); |
| | | DescriptionTextEdit.Size = new Size(641, 322); |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 6; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(266, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(406, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(267, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | | // |
| | | // TextEditKeyWord |
| | | // |
| | |
| | | // |
| | | // TextEditMinorLoss |
| | | // |
| | | TextEditMinorLoss.Location = new Point(72, 56); |
| | | TextEditMinorLoss.Location = new Point(72, 32); |
| | | TextEditMinorLoss.Name = "TextEditMinorLoss"; |
| | | TextEditMinorLoss.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMinorLoss.Properties.PopupControl = popupContainerControl1; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem9, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(681, 482); |
| | |
| | | layoutControlItem1.Text = "<color=red>*</color>型号:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(334, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlGroup5 |
| | | // |
| | | layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); |
| | | layoutControlGroup5.Location = new Point(0, 96); |
| | | layoutControlGroup5.Location = new Point(0, 73); |
| | | layoutControlGroup5.Name = "layoutControlGroup5"; |
| | | layoutControlGroup5.Size = new Size(669, 348); |
| | | layoutControlGroup5.Size = new Size(669, 371); |
| | | layoutControlGroup5.Text = "说明"; |
| | | // |
| | | // layoutControlItem5 |
| | |
| | | layoutControlItem5.Control = DescriptionTextEdit; |
| | | layoutControlItem5.Location = new Point(0, 0); |
| | | layoutControlItem5.Name = "layoutControlItem5"; |
| | | layoutControlItem5.Size = new Size(645, 303); |
| | | layoutControlItem5.Size = new Size(645, 326); |
| | | layoutControlItem5.Text = "说明:"; |
| | | layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextToControlDistance = 0; |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(334, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(335, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem7 |
| | | // |
| | |
| | | // layoutControlItem11 |
| | | // |
| | | layoutControlItem11.Control = TextEditMinorLoss; |
| | | layoutControlItem11.Location = new Point(0, 48); |
| | | layoutControlItem11.Location = new Point(0, 24); |
| | | layoutControlItem11.Name = "layoutControlItem11"; |
| | | layoutControlItem11.Size = new Size(669, 24); |
| | | layoutControlItem11.Text = "局阻系数:"; |
| | |
| | | // layoutControlItem6 |
| | | // |
| | | layoutControlItem6.Control = selectFlagsPopupCtrl1; |
| | | layoutControlItem6.Location = new Point(0, 72); |
| | | layoutControlItem6.Location = new Point(0, 48); |
| | | layoutControlItem6.Name = "layoutControlItem6"; |
| | | layoutControlItem6.Size = new Size(669, 24); |
| | | layoutControlItem6.Size = new Size(669, 25); |
| | | layoutControlItem6.Text = "标签列表:"; |
| | | layoutControlItem6.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)FlowmeterCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | | private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | | private DevExpress.XtraEditors.TextEdit TextEditKeyWord; |
| | |
| | | var bll = new BLL.AssetsFlowmeterCoefficient(); |
| | | _AssetsFlowmeterCoefficient = await bll.GetAll(); |
| | | this.FlowmeterCoefficientViewModelBindingSource.DataSource = _AssetsFlowmeterCoefficient; |
| | | |
| | | _FlowmeterVmo = FlowmeterVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | | foreach (var item in allMaterial) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_FlowmeterVmo.Caliber == null) |
| | | { |
| | | TextEditCaliber.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditCaliber.EditValue = _FlowmeterVmo.Caliber.ToString(); |
| | | } |
| | | if (_FlowmeterVmo.Material == null) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditMaterial.EditValue = _FlowmeterVmo.Material.ToString(); |
| | | } |
| | | this.TextEditName.Text = _FlowmeterVmo.Name; |
| | | this.TextEditMinorLoss.Text = _FlowmeterVmo.MinorLoss.ToString(); |
| | | this.DescriptionTextEdit.Text = _FlowmeterVmo.Description; |
| | |
| | | return true; |
| | | } |
| | | |
| | | //材料选择变化事件 |
| | | private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsFlowmeterCoefficient == null) |
| | | return; |
| | | var select = GetCoefficientByMaterial(TextEditMaterial.Text); |
| | | if (select == null) |
| | | { |
| | | this.TextEditMinorLoss.Text = string.Empty; |
| | | return; |
| | | } |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsFlowmeterCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsFlowmeterCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditMinorLoss.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsFlowmeterCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | | AssetsFlowmeterCoefficientVmo select = null; |
| | | int maxMatchedChars = 0; |
| | | foreach (var item in _AssetsFlowmeterCoefficient) |
| | | { |
| | | int matchedChars = GetIntersect(item.Material, name); |
| | | if (matchedChars > maxMatchedChars) |
| | | { |
| | | maxMatchedChars = matchedChars; |
| | | select = item; |
| | | return select; |
| | | } |
| | | } |
| | | return select; |
| | | } |
| | | |
| | | private int GetIntersect(string str1, string str2) |
| | | { |
| | | if (str1 == null || str2 == null) return 0; |
| | | return string.Join("", str1.Intersect(str2)).Count(); |
| | | } |
| | | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | | if (!(Valid())) |
| | | return; |
| | | _FlowmeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | _FlowmeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _FlowmeterVmo.Name = TextEditName.Text.Trim(); |
| | | _FlowmeterVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _FlowmeterVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double MinorLoss)) |
| | | { |
| | | _FlowmeterVmo.MinorLoss = MinorLoss; |
| | |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | |
| | | public void Reset(Vmo.AssetsFlowmeterMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Description = rhs.Description; |
| | | this.Name = rhs.Name; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | |
| | | [DisplayName("名称")] |
| | | [Browsable(true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// </summary> |
| | | [DisplayName("口径(mm)")] |
| | | [Browsable(true)] |
| | | public string Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | /// </summary> |
| | | [DisplayName("材料")] |
| | | [Browsable(true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 系数 |
| | |
| | | _PressmeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _PressmeterVmo.Name = TextEditName.Text.Trim(); |
| | | _PressmeterVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | _PressmeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _PressmeterVmo.Caliber = caliber; |
| | | } |
| | | |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double minorLoss)) |
| | | { |
| | | _PressmeterVmo.MinorLoss = minorLoss; |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)PressmeterCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | |
| | | // |
| | | // selectFlagsPopupCtrl1 |
| | | // |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 80); |
| | | selectFlagsPopupCtrl1.Location = new Point(72, 56); |
| | | selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 20); |
| | | selectFlagsPopupCtrl1.Size = new Size(601, 21); |
| | | selectFlagsPopupCtrl1.TabIndex = 7; |
| | | // |
| | | // popupContainerControl1 |
| | |
| | | // |
| | | // DescriptionTextEdit |
| | | // |
| | | DescriptionTextEdit.Location = new Point(20, 137); |
| | | DescriptionTextEdit.Location = new Point(20, 114); |
| | | DescriptionTextEdit.Name = "DescriptionTextEdit"; |
| | | DescriptionTextEdit.Size = new Size(641, 299); |
| | | DescriptionTextEdit.Size = new Size(641, 322); |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 6; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(266, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(406, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(267, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | | // |
| | | // TextEditKeyWord |
| | | // |
| | |
| | | // |
| | | // TextEditMinorLoss |
| | | // |
| | | TextEditMinorLoss.Location = new Point(72, 56); |
| | | TextEditMinorLoss.Location = new Point(72, 32); |
| | | TextEditMinorLoss.Name = "TextEditMinorLoss"; |
| | | TextEditMinorLoss.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMinorLoss.Properties.PopupControl = popupContainerControl1; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem9, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(681, 482); |
| | |
| | | layoutControlItem1.Text = "<color=red>*</color>型号:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(334, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlGroup5 |
| | | // |
| | | layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); |
| | | layoutControlGroup5.Location = new Point(0, 96); |
| | | layoutControlGroup5.Location = new Point(0, 73); |
| | | layoutControlGroup5.Name = "layoutControlGroup5"; |
| | | layoutControlGroup5.Size = new Size(669, 348); |
| | | layoutControlGroup5.Size = new Size(669, 371); |
| | | layoutControlGroup5.Text = "说明"; |
| | | // |
| | | // layoutControlItem5 |
| | |
| | | layoutControlItem5.Control = DescriptionTextEdit; |
| | | layoutControlItem5.Location = new Point(0, 0); |
| | | layoutControlItem5.Name = "layoutControlItem5"; |
| | | layoutControlItem5.Size = new Size(645, 303); |
| | | layoutControlItem5.Size = new Size(645, 326); |
| | | layoutControlItem5.Text = "说明:"; |
| | | layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextToControlDistance = 0; |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(334, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(335, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem7 |
| | | // |
| | |
| | | // layoutControlItem11 |
| | | // |
| | | layoutControlItem11.Control = TextEditMinorLoss; |
| | | layoutControlItem11.Location = new Point(0, 48); |
| | | layoutControlItem11.Location = new Point(0, 24); |
| | | layoutControlItem11.Name = "layoutControlItem11"; |
| | | layoutControlItem11.Size = new Size(669, 24); |
| | | layoutControlItem11.Text = "局阻系数:"; |
| | |
| | | // layoutControlItem6 |
| | | // |
| | | layoutControlItem6.Control = selectFlagsPopupCtrl1; |
| | | layoutControlItem6.Location = new Point(0, 72); |
| | | layoutControlItem6.Location = new Point(0, 48); |
| | | layoutControlItem6.Name = "layoutControlItem6"; |
| | | layoutControlItem6.Size = new Size(669, 24); |
| | | layoutControlItem6.Size = new Size(669, 25); |
| | | layoutControlItem6.Text = "标签列表:"; |
| | | layoutControlItem6.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)PressmeterCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)Root).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | | private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | | private DevExpress.XtraEditors.TextEdit TextEditKeyWord; |
| | |
| | | var bll = new BLL.AssetsPressmeterCoefficient(); |
| | | _AssetsPressmeterCoefficient = await bll.GetAll(); |
| | | this.PressmeterCoefficientViewModelBindingSource.DataSource = _AssetsPressmeterCoefficient; |
| | | |
| | | _PressmeterVmo = PressmeterVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | | foreach (var item in allMaterial) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_PressmeterVmo.Caliber == null) |
| | | { |
| | | TextEditCaliber.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditCaliber.EditValue = _PressmeterVmo.Caliber.ToString(); |
| | | } |
| | | if (_PressmeterVmo.Material == null) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditMaterial.EditValue = _PressmeterVmo.Material.ToString(); |
| | | } |
| | | this.TextEditName.Text = _PressmeterVmo.Name; |
| | | this.TextEditMinorLoss.Text = _PressmeterVmo.MinorLoss.ToString(); |
| | | this.DescriptionTextEdit.Text = _PressmeterVmo.Description; |
| | |
| | | return true; |
| | | } |
| | | |
| | | //材料选择变化事件 |
| | | private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsPressmeterCoefficient == null) |
| | | return; |
| | | var select = GetCoefficientByMaterial(TextEditMaterial.Text); |
| | | if (select == null) |
| | | { |
| | | this.TextEditMinorLoss.Text = string.Empty; |
| | | return; |
| | | } |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsPressmeterCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsPressmeterCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditMinorLoss.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsPressmeterCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | | AssetsPressmeterCoefficientVmo select = null; |
| | | int maxMatchedChars = 0; |
| | | foreach (var item in _AssetsPressmeterCoefficient) |
| | | { |
| | | int matchedChars = GetIntersect(item.Material, name); |
| | | if (matchedChars > maxMatchedChars) |
| | | { |
| | | maxMatchedChars = matchedChars; |
| | | select = item; |
| | | return select; |
| | | } |
| | | } |
| | | return select; |
| | | } |
| | | |
| | | private int GetIntersect(string str1, string str2) |
| | | { |
| | | if (str1 == null || str2 == null) return 0; |
| | | return string.Join("", str1.Intersect(str2)).Count(); |
| | | } |
| | | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | | if (!(Valid())) |
| | | return; |
| | | _PressmeterVmo.Material = TextEditMaterial.Text.Trim(); |
| | | _PressmeterVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _PressmeterVmo.Name = TextEditName.Text.Trim(); |
| | | _PressmeterVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _PressmeterVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double MinorLoss)) |
| | | { |
| | | _PressmeterVmo.MinorLoss = MinorLoss; |
| | |
| | | public PressmeterViewModel(Vmo.AssetsPressmeterMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.Description = rhs.Description; |
| | | } |
| | | |
| | | public void Reset(Vmo.AssetsPressmeterMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Description = rhs.Description; |
| | | this.Name = rhs.Name; |
| | | this.KeyWord = string.Join(",", rhs.KeyWord); |
| | | this.SortCode = rhs.SortCode; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.Description = rhs.Description; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [DisplayName("名称")] |
| | | [Browsable(true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// </summary> |
| | | [DisplayName("口径(mm)")] |
| | | [Browsable(true)] |
| | | public string Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | | /// </summary> |
| | | [DisplayName("材料")] |
| | | [Browsable(true)] |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 系数 |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)TranslationCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 7; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(264, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(404, 32); |
| | | TextEditMaterial.Location = new Point(72, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(265, 20); |
| | | TextEditMaterial.Size = new Size(597, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem12, layoutControlGroup5, layoutControlItem9, layoutControlItem2, layoutControlItem7, layoutControlItem3 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem12, layoutControlGroup5, layoutControlItem2, layoutControlItem7, layoutControlItem3 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(677, 488); |
| | |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(332, 24); |
| | | layoutControlItem12.Location = new Point(0, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(333, 24); |
| | | layoutControlItem12.Size = new Size(665, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextToControlDistance = 0; |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(332, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)TranslationCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | |
| | | this.TranslationCoefficientViewModelBindingSource.DataSource = _AssetsTranslationCoefficient; |
| | | _TranslationVmo = new Vmo.AssetsTranslationMainVmo(); |
| | | _TranslationVmo.SeriesID = SeriesID; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.ID); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | TextEditCaliber.SelectedIndex = 0; |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(); |
| | | } |
| | |
| | | this.TextEditCoefficient.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsTranslationCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsTranslationCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditCoefficient.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsTranslationCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | |
| | | _TranslationVmo.Name = TextEditName.Text.Trim(); |
| | | _TranslationVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | _TranslationVmo.Material = TextEditMaterial.Text.Trim(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _TranslationVmo.Caliber = caliber; |
| | | } |
| | | |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double minorLoss)) |
| | | { |
| | | _TranslationVmo.MinorLoss = minorLoss; |
| | |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="BluntheadCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="TranslationCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>340, 17</value> |
| | | <value>346, 17</value> |
| | | </metadata> |
| | | <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>495, 17</value> |
| | | <value>501, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); |
| | | TextEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); |
| | | TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); |
| | | TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); |
| | | TextEditMinorLoss = new DevExpress.XtraEditors.PopupContainerEdit(); |
| | |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)TranslationCoefficientViewModelBindingSource).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); |
| | |
| | | layoutControl1.Controls.Add(simpleButton1); |
| | | layoutControl1.Controls.Add(TextEditName); |
| | | layoutControl1.Controls.Add(DescriptionTextEdit); |
| | | layoutControl1.Controls.Add(TextEditCaliber); |
| | | layoutControl1.Controls.Add(TextEditMaterial); |
| | | layoutControl1.Controls.Add(TextEditKeyWord); |
| | | layoutControl1.Controls.Add(TextEditMinorLoss); |
| | |
| | | DescriptionTextEdit.StyleController = layoutControl1; |
| | | DescriptionTextEdit.TabIndex = 6; |
| | | // |
| | | // TextEditCaliber |
| | | // |
| | | TextEditCaliber.Location = new Point(72, 32); |
| | | TextEditCaliber.Name = "TextEditCaliber"; |
| | | TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditCaliber.Size = new Size(266, 20); |
| | | TextEditCaliber.StyleController = layoutControl1; |
| | | TextEditCaliber.TabIndex = 3; |
| | | TextEditCaliber.SelectedIndexChanged += TextEditCaliber_SelectedIndexChanged; |
| | | // |
| | | // TextEditMaterial |
| | | // |
| | | TextEditMaterial.Location = new Point(406, 32); |
| | | TextEditMaterial.Location = new Point(72, 32); |
| | | TextEditMaterial.Name = "TextEditMaterial"; |
| | | TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); |
| | | TextEditMaterial.Size = new Size(267, 20); |
| | | TextEditMaterial.Size = new Size(601, 20); |
| | | TextEditMaterial.StyleController = layoutControl1; |
| | | TextEditMaterial.TabIndex = 4; |
| | | TextEditMaterial.SelectedIndexChanged += TextEditMaterial_SelectedIndexChanged; |
| | |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem9, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem11, layoutControlItem6 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); |
| | | Root.Size = new Size(681, 482); |
| | |
| | | layoutControlItem1.Text = "<color=red>*</color>型号:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem9 |
| | | // |
| | | layoutControlItem9.Control = TextEditCaliber; |
| | | layoutControlItem9.Location = new Point(0, 24); |
| | | layoutControlItem9.Name = "layoutControlItem9"; |
| | | layoutControlItem9.Size = new Size(334, 24); |
| | | layoutControlItem9.Text = "口径:"; |
| | | layoutControlItem9.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlGroup5 |
| | | // |
| | | layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); |
| | |
| | | // layoutControlItem12 |
| | | // |
| | | layoutControlItem12.Control = TextEditMaterial; |
| | | layoutControlItem12.Location = new Point(334, 24); |
| | | layoutControlItem12.Location = new Point(0, 24); |
| | | layoutControlItem12.Name = "layoutControlItem12"; |
| | | layoutControlItem12.Size = new Size(335, 24); |
| | | layoutControlItem12.Size = new Size(669, 24); |
| | | layoutControlItem12.Text = "材料:"; |
| | | layoutControlItem12.TextSize = new Size(52, 14); |
| | | // |
| | |
| | | ((System.ComponentModel.ISupportInitialize)TranslationCoefficientViewModelBindingSource).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)TextEditMinorLoss.Properties).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); |
| | |
| | | private DevExpress.XtraEditors.SimpleButton simpleButton1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraEditors.SimpleButton btnCancel; |
| | |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; |
| | | private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
| | | private DevExpress.Utils.ToolTipController toolTipController1; |
| | |
| | | this.TranslationCoefficientViewModelBindingSource.DataSource = _AssetsTranslationCoefficient; |
| | | |
| | | _TranslationVmo = TranslationVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_TranslationVmo.Caliber == null) |
| | | { |
| | | TextEditCaliber.EditValue = "默认"; |
| | | } |
| | | else |
| | | { |
| | | TextEditCaliber.EditValue = _TranslationVmo.Caliber.ToString(); |
| | | } |
| | | |
| | | if (_TranslationVmo.Material == null) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //口径选择变化事件 |
| | | private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | if (_AssetsTranslationCoefficient == null) |
| | | return; |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | foreach (var item in _AssetsTranslationCoefficient) |
| | | { |
| | | if (item.Caliber.HasValue) |
| | | { |
| | | if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) |
| | | { |
| | | this.TextEditMinorLoss.Text = item.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | | private AssetsTranslationCoefficientVmo GetCoefficientByMaterial(string name) |
| | | { |
| | |
| | | _TranslationVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _TranslationVmo.Name = TextEditName.Text.Trim(); |
| | | _TranslationVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | if (double.TryParse(TextEditCaliber.Text, out double caliber)) |
| | | { |
| | | _TranslationVmo.Caliber = caliber; |
| | | } |
| | | if (double.TryParse(TextEditMinorLoss.Text, out double MinorLoss)) |
| | | { |
| | | _TranslationVmo.MinorLoss = MinorLoss; |
| | |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | |
| | | public void Reset(Vmo.AssetsTranslationMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.Material == null) |
| | | { |
| | | this.Material = "默认"; |
| | |
| | | [DisplayName("名称")] |
| | | [Browsable(true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// </summary> |
| | | [DisplayName("口径(mm)")] |
| | | [Browsable(true)] |
| | | public string Caliber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材料 |
| | |
| | | TankSingleMatchingViewModelBindingSource = new BindingSource(components); |
| | | gridView3 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | colModelType = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colCaliber = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | searchControl1 = new SearchControl(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | colDN = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colMinLevel = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colMinVol = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | ((ISupportInitialize)layoutControl1).BeginInit(); |
| | | layoutControl1.SuspendLayout(); |
| | | ((ISupportInitialize)gridControl3).BeginInit(); |
| | |
| | | // |
| | | gridView3.Appearance.HeaderPanel.Options.UseTextOptions = true; |
| | | gridView3.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; |
| | | gridView3.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colModelType, colMaterial, colCaliber, colMinorLoss }); |
| | | gridView3.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colModelType, colDN, colMaxLevel, colMinLevel, colMinVol, colOverFlow }); |
| | | gridView3.GridControl = gridControl3; |
| | | gridView3.Name = "gridView3"; |
| | | gridView3.OptionsView.ShowGroupPanel = false; |
| | |
| | | colModelType.Visible = true; |
| | | colModelType.VisibleIndex = 0; |
| | | colModelType.Width = 243; |
| | | // |
| | | // colMaterial |
| | | // |
| | | colMaterial.FieldName = "Material"; |
| | | colMaterial.Name = "colMaterial"; |
| | | colMaterial.Visible = true; |
| | | colMaterial.VisibleIndex = 1; |
| | | colMaterial.Width = 184; |
| | | // |
| | | // colCaliber |
| | | // |
| | | colCaliber.FieldName = "Caliber"; |
| | | colCaliber.Name = "colCaliber"; |
| | | colCaliber.Visible = true; |
| | | colCaliber.VisibleIndex = 2; |
| | | colCaliber.Width = 109; |
| | | // |
| | | // colMinorLoss |
| | | // |
| | | colMinorLoss.FieldName = "MinorLoss"; |
| | | colMinorLoss.Name = "colMinorLoss"; |
| | | colMinorLoss.Visible = true; |
| | | colMinorLoss.VisibleIndex = 3; |
| | | colMinorLoss.Width = 115; |
| | | // |
| | | // searchControl1 |
| | | // |
| | |
| | | layoutControlItem5.TextSize = new Size(0, 0); |
| | | layoutControlItem5.TextVisible = false; |
| | | // |
| | | // colDN |
| | | // |
| | | colDN.FieldName = "DN"; |
| | | colDN.Name = "colDN"; |
| | | colDN.Visible = true; |
| | | colDN.VisibleIndex = 1; |
| | | // |
| | | // colMaxLevel |
| | | // |
| | | colMaxLevel.FieldName = "MaxLevel"; |
| | | colMaxLevel.Name = "colMaxLevel"; |
| | | colMaxLevel.Visible = true; |
| | | colMaxLevel.VisibleIndex = 2; |
| | | // |
| | | // colMinLevel |
| | | // |
| | | colMinLevel.FieldName = "MinLevel"; |
| | | colMinLevel.Name = "colMinLevel"; |
| | | colMinLevel.Visible = true; |
| | | colMinLevel.VisibleIndex = 3; |
| | | // |
| | | // colMinVol |
| | | // |
| | | colMinVol.FieldName = "MinVol"; |
| | | colMinVol.Name = "colMinVol"; |
| | | colMinVol.Visible = true; |
| | | colMinVol.VisibleIndex = 4; |
| | | // |
| | | // colOverFlow |
| | | // |
| | | colOverFlow.FieldName = "OverFlow"; |
| | | colOverFlow.Name = "colOverFlow"; |
| | | colOverFlow.Visible = true; |
| | | colOverFlow.VisibleIndex = 5; |
| | | // |
| | | // TankSingleMatchingForm |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private BindingSource TankSingleMatchingViewModelBindingSource; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colModelType; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colMaterial; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colCaliber; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colDN; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colMaxLevel; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colMinLevel; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colMinVol; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colOverFlow; |
| | | } |
| | | } |
| | |
| | | |
| | | public TankSingleMatchingViewModel(Vmo.AssetsTankMainVmo rhs) |
| | | { |
| | | this.Caliber = rhs.Caliber; |
| | | this.ID = rhs.ID; |
| | | this.Material = rhs.Material; |
| | | this.MinLevel = rhs.MinLevel; |
| | | this.MaxLevel = rhs.MaxLevel; |
| | | this.DN = rhs.DN; |
| | | this.OverFlow = rhs.OverFlow; |
| | | this.ModelType = rhs.Name; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public string ModelType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 材质 |
| | | /// 最低水位 |
| | | /// </summary> |
| | | [DisplayName("材质")] |
| | | [DisplayName("最低水位")] |
| | | [Browsable(true)] |
| | | public string Material { get; set; } |
| | | public double MinLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 口径 |
| | | /// 最高水位 |
| | | /// </summary> |
| | | [DisplayName("口径")] |
| | | [DisplayName("最高水位")] |
| | | [Browsable(true)] |
| | | public double? Caliber { get; set; } |
| | | public double MaxLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 损失系数 |
| | | /// 公称直径 |
| | | /// </summary> |
| | | [DisplayName("损失系数")] |
| | | [DisplayName("公称直径")] |
| | | [Browsable(true)] |
| | | public double? MinorLoss { get; set; } |
| | | public double DN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最小容积 |
| | | /// </summary> |
| | | [DisplayName("最小容积")] |
| | | [Browsable(true)] |
| | | public double MinVol { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否允许溢流 |
| | | /// </summary> |
| | | [DisplayName("是否允许溢流")] |
| | | [Browsable(true)] |
| | | public bool OverFlow { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | public MeterSingleMatchingViewModel(Vmo.AssetsMeterMainVmo rhs) |
| | | { |
| | | this.Caliber = rhs.Caliber; |
| | | this.ID = rhs.ID; |
| | | this.Material = rhs.Material; |
| | | this.ModelType = rhs.Name; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | |
| | | |
| | | public FlowmeterSingleMatchingViewModel(Vmo.AssetsFlowmeterMainVmo rhs) |
| | | { |
| | | this.Caliber = rhs.Caliber; |
| | | this.ID = rhs.ID; |
| | | this.Material = rhs.Material; |
| | | this.ModelType = rhs.Name; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | |
| | | |
| | | public PressmeterSingleMatchingViewModel(Vmo.AssetsPressmeterMainVmo rhs) |
| | | { |
| | | this.Caliber = rhs.Caliber; |
| | | this.ID = rhs.ID; |
| | | this.Material = rhs.Material; |
| | | this.ModelType = rhs.Name; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | } |
| | |
| | | |
| | | public TranslationSingleMatchingViewModel(Vmo.AssetsTranslationMainVmo rhs) |
| | | { |
| | | this.Caliber = rhs.Caliber; |
| | | this.ID = rhs.ID; |
| | | this.Material = rhs.Material; |
| | | this.ModelType = rhs.Name; |