| | |
| | | /// </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; |
| | |
| | | { |
| | | this.tabPageReservoirs.PageVisible = true; |
| | | } |
| | | |
| | | //水池 |
| | | if (rhs.Tanks == null || rhs.Tanks.Count < 1) |
| | | { |
| | | this.tabPageTanks.PageVisible = false; |
| | |
| | | { |
| | | this.tabPageTanks.PageVisible = true; |
| | | } |
| | | |
| | | //水箱 |
| | | if (rhs.Waterboxs == null || rhs.Waterboxs.Count < 1) |
| | | { |
| | | this.tabPageWaterboxs.PageVisible = false; |
| | |
| | | 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; |
| | |
| | | { |
| | | this.tabPagePumps.PageVisible = true; |
| | | } |
| | | |
| | | //阀门 |
| | | if (rhs.Valves == null || rhs.Valves.Count < 1) |
| | | { |
| | | this.tabPageValves.PageVisible = false; |
| | |
| | | { |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |