ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterInfoUpdateExtensions.cs ÐÞ¸Ä |
| | |
| | | /// <summary> |
| | | /// æ´æ°å±æ§ |
| | | /// </summary> |
| | | public static void UpdateProperty(this Yw.Model.HydroParterInfo rhs, List<Yw.Model.HydroParterInfo> allPaterList, HydroParterPropertyViewModel propertyViewModel) |
| | | public static void UpdateProperty(this Yw.Model.HydroParterInfo rhs, List<Yw.Model.HydroParterInfo> allPaterList, HydroParterViewModel propertyViewModel) |
| | | { |
| | | if (rhs == null) |
| | | { |
| | |
| | | //èç¹ |
| | | if (rhs is Yw.Model.HydroNodeInfo hydroNodeInfo) |
| | | { |
| | | if (propertyViewModel is HydroNodePropertyViewModel hydroNodePropertyViewModel) |
| | | if (propertyViewModel is HydroNodeViewModel hydroNodePropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æ°´æº |
| | | if (rhs is Yw.Model.HydroSourceInfo hydroSourceInfo) |
| | | { |
| | | if (propertyViewModel is HydroSourcePropertyViewModel hydroSourcePropertyViewModel) |
| | | if (propertyViewModel is HydroSourceViewModel hydroSourcePropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æ°´åº |
| | | if (rhs is Yw.Model.HydroReservoirInfo hydroReservoirInfo) |
| | | { |
| | | if (propertyViewModel is HydroReservoirPropertyViewModel hydroReservoirPropertyViewModel) |
| | | if (propertyViewModel is HydroReservoirViewModel hydroReservoirPropertyViewModel) |
| | | { |
| | | hydroReservoirInfo.PoolElev = hydroReservoirPropertyViewModel.PoolElev; |
| | | hydroReservoirInfo.UpdatePropStatus(nameof(hydroReservoirInfo.PoolElev), hydroReservoirPropertyViewModel, nameof(hydroReservoirPropertyViewModel.PoolElev)); |
| | |
| | | //æ°´æ± |
| | | if (rhs is Yw.Model.HydroTankInfo hydroTankInfo) |
| | | { |
| | | if (propertyViewModel is HydroTankPropertyViewModel hydroTankPropertyViewModel) |
| | | if (propertyViewModel is HydroTankViewModel hydroTankPropertyViewModel) |
| | | { |
| | | hydroTankInfo.PoolElev = hydroTankPropertyViewModel.PoolElev; |
| | | hydroTankInfo.UpdatePropStatus(nameof(hydroTankInfo.PoolElev), hydroTankPropertyViewModel, nameof(hydroTankPropertyViewModel.PoolElev)); |
| | |
| | | //æ°´ç®± |
| | | if (rhs is Yw.Model.HydroWaterboxInfo hydroWaterboxInfo) |
| | | { |
| | | if (propertyViewModel is HydroWaterboxPropertyViewModel hydroWaterboxPropertyViewModel) |
| | | if (propertyViewModel is HydroWaterboxViewModel hydroWaterboxPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //è¿æ¥èç¹ |
| | | if (rhs is Yw.Model.HydroJunctionInfo hydroJunctionInfo) |
| | | { |
| | | if (propertyViewModel is HydroJunctionPropertyViewModel hydroJunctionPropertyViewModel) |
| | | if (propertyViewModel is HydroJunctionViewModel hydroJunctionPropertyViewModel) |
| | | { |
| | | hydroJunctionInfo.Elev = hydroJunctionPropertyViewModel.Elev; |
| | | hydroJunctionInfo.UpdatePropStatus(nameof(hydroJunctionInfo.Elev), hydroJunctionPropertyViewModel, nameof(hydroJunctionPropertyViewModel.Elev)); |
| | |
| | | //æ©æ£å¨ |
| | | if (rhs is Yw.Model.HydroEmitterInfo hydroEmitterInfo) |
| | | { |
| | | if (propertyViewModel is HydroEmitterPropertyViewModel hydroEmitterPropertyViewModel) |
| | | if (propertyViewModel is HydroEmitterViewModel hydroEmitterPropertyViewModel) |
| | | { |
| | | hydroEmitterInfo.Coefficient = hydroEmitterPropertyViewModel.Coefficient; |
| | | hydroEmitterInfo.UpdatePropStatus(nameof(hydroEmitterInfo.Coefficient), hydroEmitterPropertyViewModel, nameof(hydroEmitterPropertyViewModel.Coefficient)); |
| | |
| | | //å·å´ |
| | | if (rhs is Yw.Model.HydroNozzleInfo hydroNozzleInfo) |
| | | { |
| | | if (propertyViewModel is HydroNozzlePropertyViewModel hydroNozzlePropertyViewModel) |
| | | if (propertyViewModel is HydroNozzleViewModel hydroNozzlePropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æ¶ç«æ |
| | | if (rhs is Yw.Model.HydroHydrantInfo hydroHydrantInfo) |
| | | { |
| | | if (propertyViewModel is HydroHydrantPropertyViewModel hydroHydrantPropertyViewModel) |
| | | if (propertyViewModel is HydroHydrantViewModel hydroHydrantPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //è¿æ¥ä»¶ |
| | | if (rhs is Yw.Model.HydroCouplingInfo hydroConnectInfo) |
| | | { |
| | | if (propertyViewModel is HydroCouplingPropertyViewModel hydroCouplingPropertyViewModel) |
| | | if (propertyViewModel is HydroCouplingViewModel hydroCouplingPropertyViewModel) |
| | | { |
| | | hydroConnectInfo.Material = hydroCouplingPropertyViewModel.Material; |
| | | hydroConnectInfo.UpdatePropStatus(nameof(hydroConnectInfo.Material), hydroCouplingPropertyViewModel, nameof(hydroCouplingPropertyViewModel.Material)); |
| | |
| | | //é·å¤´ |
| | | if (rhs is Yw.Model.HydroBluntheadInfo hydroBluntheadInfo) |
| | | { |
| | | if (propertyViewModel is HydroBluntheadPropertyViewModel hydroBluntheadPropertyViewModel) |
| | | if (propertyViewModel is HydroBluntheadViewModel hydroBluntheadPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //弯头 |
| | | if (rhs is Yw.Model.HydroElbowInfo hydroElbowInfo) |
| | | { |
| | | if (propertyViewModel is HydroElbowPropertyViewModel hydroElbowPropertyViewModel) |
| | | if (propertyViewModel is HydroElbowViewModel hydroElbowPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //ä¸é |
| | | if (rhs is Yw.Model.HydroThreelinkInfo hydroThreelinkInfo) |
| | | { |
| | | if (propertyViewModel is HydroThreelinkPropertyViewModel hydroThreelinkPropertyViewModel) |
| | | if (propertyViewModel is HydroThreelinkViewModel hydroThreelinkPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //åé |
| | | if (rhs is Yw.Model.HydroFourlinkInfo hydroFourlinkInfo) |
| | | { |
| | | if (propertyViewModel is HydroFourlinkPropertyViewModel hydroFourlinkPropertyViewModel) |
| | | if (propertyViewModel is HydroFourlinkViewModel hydroFourlinkPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //水表 |
| | | if (rhs is Yw.Model.HydroMeterInfo hydroMeterInfo) |
| | | { |
| | | if (propertyViewModel is HydroMeterPropertyViewModel hydroMeterPropertyViewModel) |
| | | if (propertyViewModel is HydroMeterViewModel hydroMeterPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æµé计 |
| | | if (rhs is Yw.Model.HydroFlowmeterInfo hydroFlowmeterInfo) |
| | | { |
| | | if (propertyViewModel is HydroFlowmeterPropertyViewModel hydroFlowmeterPropertyViewModel) |
| | | if (propertyViewModel is HydroFlowmeterViewModel hydroFlowmeterPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //åå表 |
| | | if (rhs is Yw.Model.HydroPressmeterInfo hydroPressmeterInfo) |
| | | { |
| | | if (propertyViewModel is HydroPressmeterPropertyViewModel hydroPressmeterPropertyViewModel) |
| | | if (propertyViewModel is HydroPressmeterViewModel hydroPressmeterPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //管段 |
| | | if (rhs is Yw.Model.HydroLinkInfo hydroLinkInfo) |
| | | { |
| | | if (propertyViewModel is HydroLinkPropertyViewModel hydroLinkPropertyViewModel) |
| | | if (propertyViewModel is HydroLinkViewModel hydroLinkPropertyViewModel) |
| | | { |
| | | hydroLinkInfo.StartCode = hydroLinkPropertyViewModel.StartCode; |
| | | hydroLinkInfo.UpdatePropStatus(nameof(hydroLinkInfo.StartCode), hydroLinkPropertyViewModel, nameof(hydroLinkPropertyViewModel.StartCode)); |
| | |
| | | //管é |
| | | if (rhs is Yw.Model.HydroPipeInfo hydroPipeInfo) |
| | | { |
| | | if (propertyViewModel is HydroPipePropertyViewModel hydroPipePropertyViewModel) |
| | | if (propertyViewModel is HydroPipeViewModel hydroPipePropertyViewModel) |
| | | { |
| | | hydroPipeInfo.Diameter = hydroPipePropertyViewModel.Diameter; |
| | | hydroPipeInfo.UpdatePropStatus(nameof(hydroPipeInfo.Diameter), hydroPipePropertyViewModel, nameof(hydroPipePropertyViewModel.Diameter)); |
| | |
| | | //è¿æ¸¡ä»¶ |
| | | if (rhs is Yw.Model.HydroTranslationInfo hydroTranslationInfo) |
| | | { |
| | | if (propertyViewModel is HydroTranslationPropertyViewModel hydroTranslationPropertyViewModel) |
| | | if (propertyViewModel is HydroTranslationViewModel hydroTranslationPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æ¢çå¨ |
| | | if (rhs is Yw.Model.HydroExchangerInfo hydroExchangerInfo) |
| | | { |
| | | if (propertyViewModel is HydroExchangerPropertyViewModel hydroExchangerPropertyViewModel) |
| | | if (propertyViewModel is HydroExchangerViewModel hydroExchangerPropertyViewModel) |
| | | { |
| | | |
| | | } |
| | |
| | | //æ°´æ³µ |
| | | if (rhs is Yw.Model.HydroPumpInfo hydroPumpInfo) |
| | | { |
| | | if (propertyViewModel is HydroPumpPropertyViewModel hydroPumpPropertyViewModel) |
| | | if (propertyViewModel is HydroPumpViewModel hydroPumpPropertyViewModel) |
| | | { |
| | | hydroPumpInfo.RatedP = hydroPumpPropertyViewModel.RatedP; |
| | | hydroPumpInfo.UpdatePropStatus(nameof(hydroPumpInfo.RatedP), hydroPumpPropertyViewModel, nameof(hydroPumpPropertyViewModel.RatedP)); |
| | |
| | | //éé¨ |
| | | if (rhs is Yw.Model.HydroValveInfo hydroValveInfo) |
| | | { |
| | | if (propertyViewModel is HydroValvePropertyViewModel hydroValvePropertyViewModel) |
| | | if (propertyViewModel is HydroValveViewModel hydroValvePropertyViewModel) |
| | | { |
| | | hydroValveInfo.Diameter = hydroValvePropertyViewModel.Diameter; |
| | | hydroValveInfo.UpdatePropStatus(nameof(hydroValveInfo.Diameter), hydroValvePropertyViewModel, nameof(hydroValvePropertyViewModel.Diameter)); |