From f1efcbcf48fa6fc7dede2c5c7e91cc953b367fe0 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 05 十二月 2024 09:58:02 +0800 Subject: [PATCH] 增加匹配应用方法,用于视图 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 166 insertions(+), 0 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs index b83614e..d9cedf2 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs @@ -2,6 +2,7 @@ using System.Windows.Media.Imaging; using Yw.DAL.Basic; using Yw.EPAnet; +using Yw.Hydro; using Yw.Model; namespace Yw.WinFrmUI @@ -953,6 +954,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroTankViewModel visualViewModel, HydroTankMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroTankInfo visual, HydroTankMatchingViewModel matching) { if (hydroInfo == null) @@ -1058,6 +1069,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroBluntheadViewModel visualViewModel, HydroBluntheadMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroBluntheadInfo visual, HydroBluntheadMatchingViewModel matching) { if (hydroInfo == null) @@ -1115,6 +1136,16 @@ #endregion #region 寮ご + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroElbowViewModel visualViewModel, HydroElbowMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1195,6 +1226,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroThreelinkViewModel visualViewModel, HydroThreelinkMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroThreelinkInfo visual, HydroThreelinkMatchingViewModel matching) { if (hydroInfo == null) @@ -1268,6 +1309,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroFourlinkViewModel visualViewModel, HydroFourlinkMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFourlinkInfo visual, HydroFourlinkMatchingViewModel matching) { if (hydroInfo == null) @@ -1325,6 +1376,16 @@ #endregion #region 鍠峰ご + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroNozzleViewModel visualViewModel, HydroNozzleMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1396,6 +1457,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroHydrantViewModel visualViewModel, HydroHydrantMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroHydrantInfo visual, HydroHydrantMatchingViewModel matching) { if (hydroInfo == null) @@ -1463,6 +1534,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroMeterViewModel visualViewModel, HydroMeterMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroMeterInfo visual, HydroMeterMatchingViewModel matching) { if (hydroInfo == null) @@ -1508,6 +1589,16 @@ #endregion #region 娴侀噺璁� + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroFlowmeterViewModel visualViewModel, HydroFlowmeterMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1561,6 +1652,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroPressmeterViewModel visualViewModel, HydroPressmeterMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPressmeterInfo visual, HydroPressmeterMatchingViewModel matching) { if (hydroInfo == null) @@ -1606,6 +1707,16 @@ #endregion #region 绠¢亾 + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroPipeViewModel visualViewModel, HydroPipeMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1675,6 +1786,16 @@ #endregion #region 杩囨浮浠� + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroTranslationViewModel visualViewModel, HydroTranslationMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1756,6 +1877,16 @@ #endregion #region 姘存车 + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroPumpViewModel visualViewModel, HydroPumpMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -1933,6 +2064,16 @@ #endregion #region 闃�闂� + + /// <summary> + /// 搴旂敤 + /// </summary> + public static bool Apply(HydroValveViewModel visualViewModel, HydroValveMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } /// <summary> /// 搴旂敤 @@ -2125,6 +2266,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroExchangerViewModel visualViewModel, HydroExchangerMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroExchangerInfo visual, HydroExchangerMatchingViewModel matching) { if (hydroInfo == null) @@ -2219,6 +2370,16 @@ /// <summary> /// 搴旂敤 /// </summary> + public static bool Apply(HydroCompressorViewModel visualViewModel, HydroCompressorMatchingViewModel matching) + { + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + visualViewModel.UpdateProperty(); + return bol; + } + + /// <summary> + /// 搴旂敤 + /// </summary> public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroCompressorInfo visual, HydroCompressorMatchingViewModel matching) { if (hydroInfo == null) @@ -2247,26 +2408,31 @@ if (!string.IsNullOrEmpty(matching.MatchingModelType)) { visual.ModelType = matching.MatchingModelType; + visual.UpdatePropStatus(nameof(visual.ModelType), ePropStatus.Normal, "鍖归厤淇"); result = true; } if (!string.IsNullOrEmpty(matching.MatchingDbId)) { visual.DbId = matching.MatchingDbId; + visual.UpdatePropStatus(nameof(visual.DbId), ePropStatus.Normal, "鍖归厤淇"); result = true; } if (!string.IsNullOrEmpty(matching.MatchingMaterial)) { visual.Material = matching.MatchingMaterial; + visual.UpdatePropStatus(nameof(visual.Material), ePropStatus.Normal, "鍖归厤淇"); result = true; } if (matching.MatchingDiameter.HasValue) { visual.Diameter = matching.MatchingDiameter.Value; + visual.UpdatePropStatus(nameof(visual.Diameter), ePropStatus.Normal, "鍖归厤淇"); result = true; } if (matching.MatchingMinorLoss.HasValue) { visual.MinorLoss = matching.MatchingMinorLoss.Value; + visual.UpdatePropStatus(nameof(visual.MinorLoss), ePropStatus.Normal, "鍖归厤淇"); result = true; } -- Gitblit v1.9.3