From 28152aec3c4ff451586615aed5cc23e26b320cae Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 27 九月 2024 17:08:39 +0800 Subject: [PATCH] 组件列表修改 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.cs | 281 ++++++++++++++++++++++++++++++++----------------------- 1 files changed, 162 insertions(+), 119 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.cs index 4af07c1..61801eb 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.cs @@ -164,109 +164,28 @@ /// </summary> public void SetBindingData(Yw.Model.HydroModelInfo rhs) { - this.hydroJunctionListCtrl1.SetBindingData(rhs.Junctions); - this.hydroNozzleListCtrl1.SetBindingData(rhs.Nozzles); - this.hydroHydrantListCtrl1.SetBindingData(rhs.Hydrants); - this.hydroElbowListCtrl1.SetBindingData(rhs.Elbows); - this.hydroThreelinkListCtrl1.SetBindingData(rhs.Threelinks); - this.hydroFourlinkListCtrl1.SetBindingData(rhs.Fourlinks); - this.hydroMeterListCtrl1.SetBindingData(rhs.Meters); - this.hydroFlowmeterListCtrl1.SetBindingData(rhs.Flowmeters); - this.hydroPressmeterListCtrl1.SetBindingData(rhs.Pressmeters); - this.hydroBluntheadListCtrl1.SetBindingData(rhs.Bluntheads); this.hydroReservoirListCtrl1.SetBindingData(rhs.Reservoirs); this.hydroTankListCtrl1.SetBindingData(rhs.Tanks); this.hydroWaterboxListCtrl1.SetBindingData(rhs.Waterboxs); - + this.hydroPumpListCtrl1.SetBindingData(rhs.Pumps); + this.hydroValveListCtrl1.SetBindingData(rhs.Valves); this.hydroPipeListCtrl1.SetBindingData(rhs.Pipes); this.hydroExchangerListCtrl1.SetBindingData(rhs.Exchangers); this.hydroTranslationListCtrl1.SetBindingData(rhs.Translations); - this.hydroPumpListCtrl1.SetBindingData(rhs.Pumps); - this.hydroValveListCtrl1.SetBindingData(rhs.Valves); + this.hydroHydrantListCtrl1.SetBindingData(rhs.Hydrants); + this.hydroNozzleListCtrl1.SetBindingData(rhs.Nozzles); + this.hydroElbowListCtrl1.SetBindingData(rhs.Elbows); + this.hydroThreelinkListCtrl1.SetBindingData(rhs.Threelinks); + this.hydroFourlinkListCtrl1.SetBindingData(rhs.Fourlinks); + this.hydroBluntheadListCtrl1.SetBindingData(rhs.Bluntheads); + this.hydroMeterListCtrl1.SetBindingData(rhs.Meters); + this.hydroFlowmeterListCtrl1.SetBindingData(rhs.Flowmeters); + this.hydroPressmeterListCtrl1.SetBindingData(rhs.Pressmeters); + this.hydroJunctionListCtrl1.SetBindingData(rhs.Junctions); if (this.HidePageWhenListIsNull) { - if (rhs.Junctions == null || rhs.Junctions.Count < 1) - { - this.tabPageJunctions.PageVisible = false; - } - else - { - this.tabPageJunctions.PageVisible = true; - } - if (rhs.Nozzles == null || rhs.Nozzles.Count < 1) - { - this.tabPageNozzles.PageVisible = false; - } - else - { - this.tabPageNozzles.PageVisible = true; - } - if (rhs.Hydrants == null || rhs.Hydrants.Count < 1) - { - this.tabPageHydrants.PageVisible = false; - } - else - { - this.tabPageHydrants.PageVisible = true; - } - if (rhs.Elbows == null || rhs.Elbows.Count < 1) - { - this.tabPageElbows.PageVisible = false; - } - else - { - this.tabPageElbows.PageVisible = true; - } - if (rhs.Threelinks == null || rhs.Threelinks.Count < 1) - { - this.tabPageThreelinks.PageVisible = false; - } - else - { - this.tabPageThreelinks.PageVisible = true; - } - if (rhs.Fourlinks == null || rhs.Fourlinks.Count < 1) - { - this.tabPageFourlinks.PageVisible = false; - } - else - { - this.tabPageFourlinks.PageVisible = true; - } - if (rhs.Meters == null || rhs.Meters.Count < 1) - { - this.tabPageMeters.PageVisible = false; - } - else - { - this.tabPageMeters.PageVisible = true; - } - if (rhs.Flowmeters == null || rhs.Flowmeters.Count < 1) - { - this.tabPageFlowmeters.PageVisible = false; - } - else - { - this.tabPageFlowmeters.PageVisible = true; - } - if (rhs.Pressmeters == null || rhs.Pressmeters.Count < 1) - { - this.tabPagePressmeters.PageVisible = false; - } - else - { - this.tabPagePressmeters.PageVisible = true; - } - if (rhs.Bluntheads == null || rhs.Bluntheads.Count < 1) - { - this.tabPageBlunthead.PageVisible = false; - } - else - { - this.tabPageBlunthead.PageVisible = true; - } - + //姘村簱 if (rhs.Reservoirs == null || rhs.Reservoirs.Count < 1) { this.tabPageReservoirs.PageVisible = false; @@ -275,6 +194,8 @@ { this.tabPageReservoirs.PageVisible = true; } + + //姘存睜 if (rhs.Tanks == null || rhs.Tanks.Count < 1) { this.tabPageTanks.PageVisible = false; @@ -283,6 +204,8 @@ { this.tabPageTanks.PageVisible = true; } + + //姘寸 if (rhs.Waterboxs == null || rhs.Waterboxs.Count < 1) { this.tabPageWaterboxs.PageVisible = false; @@ -292,31 +215,7 @@ this.tabPageWaterboxs.PageVisible = true; } - - if (rhs.Pipes == null || rhs.Pipes.Count < 1) - { - this.tabPagePipes.PageVisible = false; - } - else - { - this.tabPagePipes.PageVisible = true; - } - if (rhs.Translations == null || rhs.Translations.Count < 1) - { - this.tabPageTranslations.PageVisible = false; - } - else - { - this.tabPageTranslations.PageVisible = true; - } - if (rhs.Exchangers == null || rhs.Exchangers.Count < 1) - { - this.tabPageExchangers.PageVisible = false; - } - else - { - this.tabPageExchangers.PageVisible = true; - } + //姘存车 if (rhs.Pumps == null || rhs.Pumps.Count < 1) { this.tabPagePumps.PageVisible = false; @@ -325,6 +224,8 @@ { this.tabPagePumps.PageVisible = true; } + + //闃�闂� if (rhs.Valves == null || rhs.Valves.Count < 1) { this.tabPageValves.PageVisible = false; @@ -333,6 +234,148 @@ { this.tabPageValves.PageVisible = true; } + + //绠¢亾 + if (rhs.Pipes == null || rhs.Pipes.Count < 1) + { + this.tabPagePipes.PageVisible = false; + } + else + { + this.tabPagePipes.PageVisible = true; + } + + //鎹㈢儹鍣� + if (rhs.Exchangers == null || rhs.Exchangers.Count < 1) + { + this.tabPageExchangers.PageVisible = false; + } + else + { + this.tabPageExchangers.PageVisible = true; + } + + //杩囨浮浠� + if (rhs.Translations == null || rhs.Translations.Count < 1) + { + this.tabPageTranslations.PageVisible = false; + } + else + { + this.tabPageTranslations.PageVisible = true; + } + + //娑堢伀鏍� + if (rhs.Hydrants == null || rhs.Hydrants.Count < 1) + { + this.tabPageHydrants.PageVisible = false; + } + else + { + this.tabPageHydrants.PageVisible = true; + } + + //鍠峰槾 + if (rhs.Nozzles == null || rhs.Nozzles.Count < 1) + { + this.tabPageNozzles.PageVisible = false; + } + else + { + this.tabPageNozzles.PageVisible = true; + } + + //寮ご + if (rhs.Elbows == null || rhs.Elbows.Count < 1) + { + this.tabPageElbows.PageVisible = false; + } + else + { + this.tabPageElbows.PageVisible = true; + } + + //涓夐�� + if (rhs.Threelinks == null || rhs.Threelinks.Count < 1) + { + this.tabPageThreelinks.PageVisible = false; + } + else + { + this.tabPageThreelinks.PageVisible = true; + } + + //鍥涢�� + if (rhs.Fourlinks == null || rhs.Fourlinks.Count < 1) + { + this.tabPageFourlinks.PageVisible = false; + } + else + { + this.tabPageFourlinks.PageVisible = true; + } + + //闂峰ご + if (rhs.Bluntheads == null || rhs.Bluntheads.Count < 1) + { + this.tabPageBlunthead.PageVisible = false; + } + else + { + this.tabPageBlunthead.PageVisible = true; + } + + //姘磋〃 + if (rhs.Meters == null || rhs.Meters.Count < 1) + { + this.tabPageMeters.PageVisible = false; + } + else + { + this.tabPageMeters.PageVisible = true; + } + + //娴侀噺璁� + if (rhs.Flowmeters == null || rhs.Flowmeters.Count < 1) + { + this.tabPageFlowmeters.PageVisible = false; + } + else + { + this.tabPageFlowmeters.PageVisible = true; + } + + //鍘嬪姏琛� + if (rhs.Pressmeters == null || rhs.Pressmeters.Count < 1) + { + this.tabPagePressmeters.PageVisible = false; + } + else + { + this.tabPagePressmeters.PageVisible = true; + } + + //杩炴帴鑺傜偣 + if (rhs.Junctions == null || rhs.Junctions.Count < 1) + { + this.tabPageJunctions.PageVisible = false; + } + else + { + this.tabPageJunctions.PageVisible = true; + } + + + + + + + + + + + + } } -- Gitblit v1.9.3