Hydro/HStation.Hydro.Core/TransferHelper.cs
@@ -468,6 +468,7 @@ pipe.StartCode = revitPipe.StartCode; pipe.EndCode = revitPipe.EndCode; pipe.LinkStatus = revitPipe.LinkStatus; pipe.Material = revitPipe.Material; pipe.Diameter = revitPipe.Diameter; pipe.Length = revitPipe.Length; pipe.Roughness = revitPipe.Roughness; @@ -487,7 +488,7 @@ { foreach (var revitTranslation in revitModel.Translations) { var translation = new Yw.Model.HydroPipeInfo(); var translation = new Yw.Model.HydroTranslationInfo(); translation.Catalog = Yw.Hydro.ParterCatalog.Translation; translation.Name = revitTranslation.Name; translation.Code = revitTranslation.Code; @@ -499,6 +500,7 @@ translation.LinkStatus = revitTranslation.LinkStatus; translation.Diameter = revitTranslation.Diameter; translation.Length = revitTranslation.Length; translation.Material = revitTranslation.Material; translation.Roughness = revitTranslation.Roughness; translation.MinorLoss = revitTranslation.MinorLoss; translation.ScenePropValueList = revitTranslation.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValuePureInfo() @@ -507,7 +509,7 @@ PropName = x.PropName, PropValue = x.PropValue }).ToList(); hydro.Pipes.Add(translation); hydro.Translations.Add(translation); } } @@ -528,6 +530,7 @@ exchanger.LinkStatus = revitExchanger.LinkStatus; exchanger.Diameter = revitExchanger.Diameter; exchanger.Length = revitExchanger.Length; exchanger.Material = revitExchanger.Material; exchanger.Roughness = revitExchanger.Roughness; exchanger.MinorLoss = revitExchanger.MinorLoss; exchanger.ScenePropValueList = revitExchanger.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValuePureInfo() Service/HStation.Service.Revit.Core/02-parter/03-link/01-pipe/RevitPipe.cs
@@ -16,6 +16,7 @@ public RevitPipe(RevitPipe rhs) : base(rhs) { this.Diameter = rhs.Diameter; this.Material = rhs.Material; this.Length = rhs.Length; this.Roughness = rhs.Roughness; this.MinorLoss = rhs.MinorLoss; @@ -27,6 +28,11 @@ public double Diameter { get; set; } /// <summary> /// 材质 /// </summary> public string Material { get; set; } /// <summary> /// 长度 /// </summary> public double Length { get; set; } Service/HStation.Service.Revit.Core/04-service/01-json/RevitJsonHelper.cs
@@ -807,10 +807,28 @@ pipe.EndQuality = endQuality; } #region 长度 if (jobject[RevitJsonProp.Length].MatchNumeric(out double length)) { pipe.Length = length; pipe.Length = length / 1000f; } if (pipe.Length <= 0) { pipe.Length = Math.Round(pipe.StartPosition.Distance(pipe.EndPosition) / 1000f, 2); } #endregion #region 材质 var jobjectMaterial = jobject[RevitJsonProp.Material]; if (jobjectMaterial != null) { pipe.Material = jobjectMaterial[RevitJsonProp.Name]?.ToString(); } #endregion #region 直径 @@ -839,10 +857,7 @@ { pipe.Roughness = roughness; } if (pipe.Length <= 0) { pipe.Length = pipe.StartPosition.Distance(pipe.EndPosition); } if (pipe.Diameter < 0.1) { pipe.Diameter = 500; @@ -915,6 +930,8 @@ { translation.Diameter = internalDiameter; } if (jobject[RevitJsonProp.MinorLoss].MatchNumeric(out double minorLoss)) { translation.MinorLoss = minorLoss; @@ -923,6 +940,11 @@ { translation.Roughness = roughness; } if (translation.Roughness < 0.1) { translation.Roughness = 110; } if (translation.Length <= 0) { translation.Length = translation.StartPosition.Distance(translation.EndPosition); @@ -931,10 +953,7 @@ { translation.Diameter = 500; } if (translation.Roughness < 0.1) { translation.Roughness = 110; } model.Translations.Add(translation); } break; Service/HStation.Service.Revit.Core/04-service/01-json/model/RevitJsonProp.cs
@@ -92,6 +92,11 @@ public const string VolCurve = "容积曲线"; /// <summary> /// 材质 /// </summary> public const string Material = "材质"; /// <summary> /// 直径(水池、 管段、阀门) /// </summary> public const string Diameter = "直径"; WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/00-core/HydroParterListCtrl.Designer.cs
@@ -29,6 +29,8 @@ private void InitializeComponent() { tabPane1 = new DevExpress.XtraBars.Navigation.TabPane(); tabPageReservoirs = new DevExpress.XtraBars.Navigation.TabNavigationPage(); hydroReservoirListCtrl1 = new HydroReservoirListCtrl(); tabPageJunctions = new DevExpress.XtraBars.Navigation.TabNavigationPage(); hydroJunctionListCtrl1 = new HydroJunctionListCtrl(); tabPageElbows = new DevExpress.XtraBars.Navigation.TabNavigationPage(); @@ -49,8 +51,6 @@ hydroHydrantListCtrl1 = new HydroHydrantListCtrl(); tabPageBlunthead = new DevExpress.XtraBars.Navigation.TabNavigationPage(); hydroBluntheadListCtrl1 = new HydroBluntheadListCtrl(); tabPageReservoirs = new DevExpress.XtraBars.Navigation.TabNavigationPage(); hydroReservoirListCtrl1 = new HydroReservoirListCtrl(); tabPageTanks = new DevExpress.XtraBars.Navigation.TabNavigationPage(); hydroTankListCtrl1 = new HydroTankListCtrl(); tabPageWaterboxs = new DevExpress.XtraBars.Navigation.TabNavigationPage(); @@ -67,6 +67,7 @@ hydroValveListCtrl1 = new HydroValveListCtrl(); ((ISupportInitialize)tabPane1).BeginInit(); tabPane1.SuspendLayout(); tabPageReservoirs.SuspendLayout(); tabPageJunctions.SuspendLayout(); tabPageElbows.SuspendLayout(); tabPageThreelinks.SuspendLayout(); @@ -77,7 +78,6 @@ tabPageNozzles.SuspendLayout(); tabPageHydrants.SuspendLayout(); tabPageBlunthead.SuspendLayout(); tabPageReservoirs.SuspendLayout(); tabPageTanks.SuspendLayout(); tabPageWaterboxs.SuspendLayout(); tabPagePipes.SuspendLayout(); @@ -89,6 +89,7 @@ // // tabPane1 // tabPane1.Controls.Add(tabPageReservoirs); tabPane1.Controls.Add(tabPageJunctions); tabPane1.Controls.Add(tabPageElbows); tabPane1.Controls.Add(tabPageThreelinks); @@ -99,7 +100,6 @@ tabPane1.Controls.Add(tabPageNozzles); tabPane1.Controls.Add(tabPageHydrants); tabPane1.Controls.Add(tabPageBlunthead); tabPane1.Controls.Add(tabPageReservoirs); tabPane1.Controls.Add(tabPageTanks); tabPane1.Controls.Add(tabPageWaterboxs); tabPane1.Controls.Add(tabPagePipes); @@ -110,164 +110,12 @@ tabPane1.Dock = DockStyle.Fill; tabPane1.Location = new Point(0, 0); tabPane1.Name = "tabPane1"; tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { tabPageJunctions, tabPageElbows, tabPageThreelinks, tabPageFourlinks, tabPageMeters, tabPageFlowmeters, tabPagePressmeters, tabPageNozzles, tabPageHydrants, tabPageBlunthead, tabPageReservoirs, tabPageTanks, tabPageWaterboxs, tabPagePipes, tabPageTranslations, tabPageExchangers, tabPagePumps, tabPageValves }); tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { tabPageReservoirs, tabPageTanks, tabPageWaterboxs, tabPagePumps, tabPageValves, tabPagePipes, tabPageExchangers, tabPageTranslations, tabPageHydrants, tabPageNozzles, tabPageElbows, tabPageThreelinks, tabPageFourlinks, tabPageBlunthead, tabPageMeters, tabPageFlowmeters, tabPagePressmeters, tabPageJunctions }); tabPane1.RegularSize = new Size(1028, 629); tabPane1.SelectedPage = tabPageJunctions; tabPane1.Size = new Size(1028, 629); tabPane1.TabIndex = 0; tabPane1.Text = "tabPane1"; // // tabPageJunctions // tabPageJunctions.Caption = "连接节点"; tabPageJunctions.Controls.Add(hydroJunctionListCtrl1); tabPageJunctions.Name = "tabPageJunctions"; tabPageJunctions.Padding = new Padding(0, 1, 0, 0); tabPageJunctions.Size = new Size(1028, 596); // // hydroJunctionListCtrl1 // hydroJunctionListCtrl1.Dock = DockStyle.Fill; hydroJunctionListCtrl1.Location = new Point(0, 1); hydroJunctionListCtrl1.Name = "hydroJunctionListCtrl1"; hydroJunctionListCtrl1.ShowFindPanel = true; hydroJunctionListCtrl1.Size = new Size(1028, 595); hydroJunctionListCtrl1.TabIndex = 0; // // tabPageElbows // tabPageElbows.Caption = "弯头"; tabPageElbows.Controls.Add(hydroElbowListCtrl1); tabPageElbows.Name = "tabPageElbows"; tabPageElbows.Size = new Size(1028, 596); // // hydroElbowListCtrl1 // hydroElbowListCtrl1.Dock = DockStyle.Fill; hydroElbowListCtrl1.Location = new Point(0, 0); hydroElbowListCtrl1.Name = "hydroElbowListCtrl1"; hydroElbowListCtrl1.Size = new Size(1028, 596); hydroElbowListCtrl1.TabIndex = 0; // // tabPageThreelinks // tabPageThreelinks.Caption = "三通"; tabPageThreelinks.Controls.Add(hydroThreelinkListCtrl1); tabPageThreelinks.Name = "tabPageThreelinks"; tabPageThreelinks.Size = new Size(1028, 596); // // hydroThreelinkListCtrl1 // hydroThreelinkListCtrl1.Dock = DockStyle.Fill; hydroThreelinkListCtrl1.Location = new Point(0, 0); hydroThreelinkListCtrl1.Name = "hydroThreelinkListCtrl1"; hydroThreelinkListCtrl1.Size = new Size(1028, 596); hydroThreelinkListCtrl1.TabIndex = 0; // // tabPageFourlinks // tabPageFourlinks.Caption = "四通"; tabPageFourlinks.Controls.Add(hydroFourlinkListCtrl1); tabPageFourlinks.Name = "tabPageFourlinks"; tabPageFourlinks.Size = new Size(1028, 596); // // hydroFourlinkListCtrl1 // hydroFourlinkListCtrl1.Dock = DockStyle.Fill; hydroFourlinkListCtrl1.Location = new Point(0, 0); hydroFourlinkListCtrl1.Name = "hydroFourlinkListCtrl1"; hydroFourlinkListCtrl1.Size = new Size(1028, 596); hydroFourlinkListCtrl1.TabIndex = 0; // // tabPageMeters // tabPageMeters.Caption = "水表"; tabPageMeters.Controls.Add(hydroMeterListCtrl1); tabPageMeters.Name = "tabPageMeters"; tabPageMeters.Size = new Size(1028, 596); // // hydroMeterListCtrl1 // hydroMeterListCtrl1.Dock = DockStyle.Fill; hydroMeterListCtrl1.Location = new Point(0, 0); hydroMeterListCtrl1.Name = "hydroMeterListCtrl1"; hydroMeterListCtrl1.Size = new Size(1028, 596); hydroMeterListCtrl1.TabIndex = 0; // // tabPageFlowmeters // tabPageFlowmeters.Caption = "流量计"; tabPageFlowmeters.Controls.Add(hydroFlowmeterListCtrl1); tabPageFlowmeters.Name = "tabPageFlowmeters"; tabPageFlowmeters.Size = new Size(1028, 596); // // hydroFlowmeterListCtrl1 // hydroFlowmeterListCtrl1.Dock = DockStyle.Fill; hydroFlowmeterListCtrl1.Location = new Point(0, 0); hydroFlowmeterListCtrl1.Name = "hydroFlowmeterListCtrl1"; hydroFlowmeterListCtrl1.Size = new Size(1028, 596); hydroFlowmeterListCtrl1.TabIndex = 0; // // tabPagePressmeters // tabPagePressmeters.Caption = "压力表"; tabPagePressmeters.Controls.Add(hydroPressmeterListCtrl1); tabPagePressmeters.Name = "tabPagePressmeters"; tabPagePressmeters.Size = new Size(1028, 596); // // hydroPressmeterListCtrl1 // hydroPressmeterListCtrl1.Dock = DockStyle.Fill; hydroPressmeterListCtrl1.Location = new Point(0, 0); hydroPressmeterListCtrl1.Name = "hydroPressmeterListCtrl1"; hydroPressmeterListCtrl1.Size = new Size(1028, 596); hydroPressmeterListCtrl1.TabIndex = 0; // // tabPageNozzles // tabPageNozzles.Caption = "喷嘴"; tabPageNozzles.Controls.Add(hydroNozzleListCtrl1); tabPageNozzles.Name = "tabPageNozzles"; tabPageNozzles.Size = new Size(1028, 596); // // hydroNozzleListCtrl1 // hydroNozzleListCtrl1.Dock = DockStyle.Fill; hydroNozzleListCtrl1.Location = new Point(0, 0); hydroNozzleListCtrl1.Name = "hydroNozzleListCtrl1"; hydroNozzleListCtrl1.Size = new Size(1028, 596); hydroNozzleListCtrl1.TabIndex = 0; // // tabPageHydrants // tabPageHydrants.Caption = "消火栓"; tabPageHydrants.Controls.Add(hydroHydrantListCtrl1); tabPageHydrants.Name = "tabPageHydrants"; tabPageHydrants.Size = new Size(1028, 596); // // hydroHydrantListCtrl1 // hydroHydrantListCtrl1.Dock = DockStyle.Fill; hydroHydrantListCtrl1.Location = new Point(0, 0); hydroHydrantListCtrl1.Name = "hydroHydrantListCtrl1"; hydroHydrantListCtrl1.Size = new Size(1028, 596); hydroHydrantListCtrl1.TabIndex = 0; // // tabPageBlunthead // tabPageBlunthead.Caption = "闷头"; tabPageBlunthead.Controls.Add(hydroBluntheadListCtrl1); tabPageBlunthead.Name = "tabPageBlunthead"; tabPageBlunthead.Size = new Size(1028, 596); // // hydroBluntheadListCtrl1 // hydroBluntheadListCtrl1.Dock = DockStyle.Fill; hydroBluntheadListCtrl1.Location = new Point(0, 0); hydroBluntheadListCtrl1.Name = "hydroBluntheadListCtrl1"; hydroBluntheadListCtrl1.Size = new Size(1028, 596); hydroBluntheadListCtrl1.TabIndex = 0; // // tabPageReservoirs // @@ -284,19 +132,170 @@ hydroReservoirListCtrl1.Size = new Size(1028, 596); hydroReservoirListCtrl1.TabIndex = 0; // // tabPageJunctions // tabPageJunctions.Caption = "连接节点"; tabPageJunctions.Controls.Add(hydroJunctionListCtrl1); tabPageJunctions.Name = "tabPageJunctions"; tabPageJunctions.Padding = new Padding(0, 1, 0, 0); tabPageJunctions.Size = new Size(1028, 596); // // hydroJunctionListCtrl1 // hydroJunctionListCtrl1.Dock = DockStyle.Fill; hydroJunctionListCtrl1.Location = new Point(0, 1); hydroJunctionListCtrl1.Name = "hydroJunctionListCtrl1"; hydroJunctionListCtrl1.Size = new Size(1028, 595); hydroJunctionListCtrl1.TabIndex = 0; // // tabPageElbows // tabPageElbows.Caption = "弯头"; tabPageElbows.Controls.Add(hydroElbowListCtrl1); tabPageElbows.Name = "tabPageElbows"; tabPageElbows.Size = new Size(1028, 629); // // hydroElbowListCtrl1 // hydroElbowListCtrl1.Dock = DockStyle.Fill; hydroElbowListCtrl1.Location = new Point(0, 0); hydroElbowListCtrl1.Name = "hydroElbowListCtrl1"; hydroElbowListCtrl1.Size = new Size(1028, 629); hydroElbowListCtrl1.TabIndex = 0; // // tabPageThreelinks // tabPageThreelinks.Caption = "三通"; tabPageThreelinks.Controls.Add(hydroThreelinkListCtrl1); tabPageThreelinks.Name = "tabPageThreelinks"; tabPageThreelinks.Size = new Size(1028, 629); // // hydroThreelinkListCtrl1 // hydroThreelinkListCtrl1.Dock = DockStyle.Fill; hydroThreelinkListCtrl1.Location = new Point(0, 0); hydroThreelinkListCtrl1.Name = "hydroThreelinkListCtrl1"; hydroThreelinkListCtrl1.Size = new Size(1028, 629); hydroThreelinkListCtrl1.TabIndex = 0; // // tabPageFourlinks // tabPageFourlinks.Caption = "四通"; tabPageFourlinks.Controls.Add(hydroFourlinkListCtrl1); tabPageFourlinks.Name = "tabPageFourlinks"; tabPageFourlinks.Size = new Size(1028, 629); // // hydroFourlinkListCtrl1 // hydroFourlinkListCtrl1.Dock = DockStyle.Fill; hydroFourlinkListCtrl1.Location = new Point(0, 0); hydroFourlinkListCtrl1.Name = "hydroFourlinkListCtrl1"; hydroFourlinkListCtrl1.Size = new Size(1028, 629); hydroFourlinkListCtrl1.TabIndex = 0; // // tabPageMeters // tabPageMeters.Caption = "水表"; tabPageMeters.Controls.Add(hydroMeterListCtrl1); tabPageMeters.Name = "tabPageMeters"; tabPageMeters.Size = new Size(1028, 629); // // hydroMeterListCtrl1 // hydroMeterListCtrl1.Dock = DockStyle.Fill; hydroMeterListCtrl1.Location = new Point(0, 0); hydroMeterListCtrl1.Name = "hydroMeterListCtrl1"; hydroMeterListCtrl1.Size = new Size(1028, 629); hydroMeterListCtrl1.TabIndex = 0; // // tabPageFlowmeters // tabPageFlowmeters.Caption = "流量计"; tabPageFlowmeters.Controls.Add(hydroFlowmeterListCtrl1); tabPageFlowmeters.Name = "tabPageFlowmeters"; tabPageFlowmeters.Size = new Size(1028, 629); // // hydroFlowmeterListCtrl1 // hydroFlowmeterListCtrl1.Dock = DockStyle.Fill; hydroFlowmeterListCtrl1.Location = new Point(0, 0); hydroFlowmeterListCtrl1.Name = "hydroFlowmeterListCtrl1"; hydroFlowmeterListCtrl1.Size = new Size(1028, 629); hydroFlowmeterListCtrl1.TabIndex = 0; // // tabPagePressmeters // tabPagePressmeters.Caption = "压力表"; tabPagePressmeters.Controls.Add(hydroPressmeterListCtrl1); tabPagePressmeters.Name = "tabPagePressmeters"; tabPagePressmeters.Size = new Size(1028, 629); // // hydroPressmeterListCtrl1 // hydroPressmeterListCtrl1.Dock = DockStyle.Fill; hydroPressmeterListCtrl1.Location = new Point(0, 0); hydroPressmeterListCtrl1.Name = "hydroPressmeterListCtrl1"; hydroPressmeterListCtrl1.Size = new Size(1028, 629); hydroPressmeterListCtrl1.TabIndex = 0; // // tabPageNozzles // tabPageNozzles.Caption = "喷嘴"; tabPageNozzles.Controls.Add(hydroNozzleListCtrl1); tabPageNozzles.Name = "tabPageNozzles"; tabPageNozzles.Size = new Size(1028, 629); // // hydroNozzleListCtrl1 // hydroNozzleListCtrl1.Dock = DockStyle.Fill; hydroNozzleListCtrl1.Location = new Point(0, 0); hydroNozzleListCtrl1.Name = "hydroNozzleListCtrl1"; hydroNozzleListCtrl1.Size = new Size(1028, 629); hydroNozzleListCtrl1.TabIndex = 0; // // tabPageHydrants // tabPageHydrants.Caption = "消火栓"; tabPageHydrants.Controls.Add(hydroHydrantListCtrl1); tabPageHydrants.Name = "tabPageHydrants"; tabPageHydrants.Size = new Size(1028, 629); // // hydroHydrantListCtrl1 // hydroHydrantListCtrl1.Dock = DockStyle.Fill; hydroHydrantListCtrl1.Location = new Point(0, 0); hydroHydrantListCtrl1.Name = "hydroHydrantListCtrl1"; hydroHydrantListCtrl1.Size = new Size(1028, 629); hydroHydrantListCtrl1.TabIndex = 0; // // tabPageBlunthead // tabPageBlunthead.Caption = "闷头"; tabPageBlunthead.Controls.Add(hydroBluntheadListCtrl1); tabPageBlunthead.Name = "tabPageBlunthead"; tabPageBlunthead.Size = new Size(1028, 629); // // hydroBluntheadListCtrl1 // hydroBluntheadListCtrl1.Dock = DockStyle.Fill; hydroBluntheadListCtrl1.Location = new Point(0, 0); hydroBluntheadListCtrl1.Name = "hydroBluntheadListCtrl1"; hydroBluntheadListCtrl1.Size = new Size(1028, 629); hydroBluntheadListCtrl1.TabIndex = 0; // // tabPageTanks // tabPageTanks.Caption = "水池"; tabPageTanks.Controls.Add(hydroTankListCtrl1); tabPageTanks.Name = "tabPageTanks"; tabPageTanks.Size = new Size(1028, 596); tabPageTanks.Size = new Size(1028, 629); // // hydroTankListCtrl1 // hydroTankListCtrl1.Dock = DockStyle.Fill; hydroTankListCtrl1.Location = new Point(0, 0); hydroTankListCtrl1.Name = "hydroTankListCtrl1"; hydroTankListCtrl1.Size = new Size(1028, 596); hydroTankListCtrl1.Size = new Size(1028, 629); hydroTankListCtrl1.TabIndex = 0; // // tabPageWaterboxs @@ -304,14 +303,14 @@ tabPageWaterboxs.Caption = "水箱"; tabPageWaterboxs.Controls.Add(hydroWaterboxListCtrl1); tabPageWaterboxs.Name = "tabPageWaterboxs"; tabPageWaterboxs.Size = new Size(1028, 596); tabPageWaterboxs.Size = new Size(1028, 629); // // hydroWaterboxListCtrl1 // hydroWaterboxListCtrl1.Dock = DockStyle.Fill; hydroWaterboxListCtrl1.Location = new Point(0, 0); hydroWaterboxListCtrl1.Name = "hydroWaterboxListCtrl1"; hydroWaterboxListCtrl1.Size = new Size(1028, 596); hydroWaterboxListCtrl1.Size = new Size(1028, 629); hydroWaterboxListCtrl1.TabIndex = 0; // // tabPagePipes @@ -319,14 +318,14 @@ tabPagePipes.Caption = "管道"; tabPagePipes.Controls.Add(hydroPipeListCtrl1); tabPagePipes.Name = "tabPagePipes"; tabPagePipes.Size = new Size(1028, 596); tabPagePipes.Size = new Size(1028, 629); // // hydroPipeListCtrl1 // hydroPipeListCtrl1.Dock = DockStyle.Fill; hydroPipeListCtrl1.Location = new Point(0, 0); hydroPipeListCtrl1.Name = "hydroPipeListCtrl1"; hydroPipeListCtrl1.Size = new Size(1028, 596); hydroPipeListCtrl1.Size = new Size(1028, 629); hydroPipeListCtrl1.TabIndex = 0; // // tabPageTranslations @@ -349,14 +348,14 @@ tabPageExchangers.Caption = "换热器"; tabPageExchangers.Controls.Add(hydroExchangerListCtrl1); tabPageExchangers.Name = "tabPageExchangers"; tabPageExchangers.Size = new Size(1028, 596); tabPageExchangers.Size = new Size(1028, 629); // // hydroExchangerListCtrl1 // hydroExchangerListCtrl1.Dock = DockStyle.Fill; hydroExchangerListCtrl1.Location = new Point(0, 0); hydroExchangerListCtrl1.Name = "hydroExchangerListCtrl1"; hydroExchangerListCtrl1.Size = new Size(1028, 596); hydroExchangerListCtrl1.Size = new Size(1028, 629); hydroExchangerListCtrl1.TabIndex = 0; // // tabPagePumps @@ -364,14 +363,14 @@ tabPagePumps.Caption = "水泵"; tabPagePumps.Controls.Add(hydroPumpListCtrl1); tabPagePumps.Name = "tabPagePumps"; tabPagePumps.Size = new Size(1028, 596); tabPagePumps.Size = new Size(1028, 629); // // hydroPumpListCtrl1 // hydroPumpListCtrl1.Dock = DockStyle.Fill; hydroPumpListCtrl1.Location = new Point(0, 0); hydroPumpListCtrl1.Name = "hydroPumpListCtrl1"; hydroPumpListCtrl1.Size = new Size(1028, 596); hydroPumpListCtrl1.Size = new Size(1028, 629); hydroPumpListCtrl1.TabIndex = 0; // // tabPageValves @@ -379,14 +378,14 @@ tabPageValves.Caption = "阀门"; tabPageValves.Controls.Add(hydroValveListCtrl1); tabPageValves.Name = "tabPageValves"; tabPageValves.Size = new Size(1028, 596); tabPageValves.Size = new Size(1028, 629); // // hydroValveListCtrl1 // hydroValveListCtrl1.Dock = DockStyle.Fill; hydroValveListCtrl1.Location = new Point(0, 0); hydroValveListCtrl1.Name = "hydroValveListCtrl1"; hydroValveListCtrl1.Size = new Size(1028, 596); hydroValveListCtrl1.Size = new Size(1028, 629); hydroValveListCtrl1.TabIndex = 0; // // HydroParterListCtrl @@ -398,6 +397,7 @@ Size = new Size(1028, 629); ((ISupportInitialize)tabPane1).EndInit(); tabPane1.ResumeLayout(false); tabPageReservoirs.ResumeLayout(false); tabPageJunctions.ResumeLayout(false); tabPageElbows.ResumeLayout(false); tabPageThreelinks.ResumeLayout(false); @@ -408,7 +408,6 @@ tabPageNozzles.ResumeLayout(false); tabPageHydrants.ResumeLayout(false); tabPageBlunthead.ResumeLayout(false); tabPageReservoirs.ResumeLayout(false); tabPageTanks.ResumeLayout(false); tabPageWaterboxs.ResumeLayout(false); tabPagePipes.ResumeLayout(false); 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; } } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/13-pipe/HydroPipeListCtrl.Designer.cs
@@ -33,6 +33,7 @@ hydroPipeViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colCode = new DevExpress.XtraGrid.Columns.GridColumn(); colDbLocked = new DevExpress.XtraGrid.Columns.GridColumn(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colFlagsString = new DevExpress.XtraGrid.Columns.GridColumn(); colStartCode = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -40,6 +41,7 @@ colLinkStatus = new DevExpress.XtraGrid.Columns.GridColumn(); colDiameter = new DevExpress.XtraGrid.Columns.GridColumn(); colLength = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); colRoughness = new DevExpress.XtraGrid.Columns.GridColumn(); colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -59,13 +61,9 @@ gridControl1.TabIndex = 0; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // hydroPipeViewModelBindingSource // hydroPipeViewModelBindingSource.DataSource = typeof(HydroPipeViewModel); // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colRoughness, colMinorLoss, colDescription }); gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colMaterial, colRoughness, colMinorLoss, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsFind.AlwaysVisible = true; @@ -78,75 +76,89 @@ colCode.Visible = true; colCode.VisibleIndex = 0; // // colDbLocked // colDbLocked.FieldName = "DbLocked"; colDbLocked.Name = "colDbLocked"; colDbLocked.Visible = true; colDbLocked.VisibleIndex = 1; // // colName // colName.FieldName = "Name"; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 1; colName.VisibleIndex = 2; // // colFlagsString // colFlagsString.FieldName = "FlagsString"; colFlagsString.Name = "colFlagsString"; colFlagsString.Visible = true; colFlagsString.VisibleIndex = 2; colFlagsString.VisibleIndex = 3; // // colStartCode // colStartCode.FieldName = "StartCode"; colStartCode.Name = "colStartCode"; colStartCode.Visible = true; colStartCode.VisibleIndex = 3; colStartCode.VisibleIndex = 4; // // colEndCode // colEndCode.FieldName = "EndCode"; colEndCode.Name = "colEndCode"; colEndCode.Visible = true; colEndCode.VisibleIndex = 4; colEndCode.VisibleIndex = 5; // // colLinkStatus // colLinkStatus.FieldName = "LinkStatus"; colLinkStatus.Name = "colLinkStatus"; colLinkStatus.Visible = true; colLinkStatus.VisibleIndex = 5; colLinkStatus.VisibleIndex = 6; // // colDiameter // colDiameter.FieldName = "Diameter"; colDiameter.Name = "colDiameter"; colDiameter.Visible = true; colDiameter.VisibleIndex = 6; colDiameter.VisibleIndex = 7; // // colLength // colLength.FieldName = "Length"; colLength.Name = "colLength"; colLength.Visible = true; colLength.VisibleIndex = 7; colLength.VisibleIndex = 8; // // colMaterial // colMaterial.FieldName = "Material"; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 9; // // colRoughness // colRoughness.FieldName = "Roughness"; colRoughness.Name = "colRoughness"; colRoughness.Visible = true; colRoughness.VisibleIndex = 8; colRoughness.VisibleIndex = 10; // // colMinorLoss // colMinorLoss.FieldName = "MinorLoss"; colMinorLoss.Name = "colMinorLoss"; colMinorLoss.Visible = true; colMinorLoss.VisibleIndex = 9; colMinorLoss.VisibleIndex = 11; // // colDescription // colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 10; colDescription.VisibleIndex = 12; // // HydroPipeListCtrl // @@ -177,5 +189,7 @@ private DevExpress.XtraGrid.Columns.GridColumn colLength; private DevExpress.XtraGrid.Columns.GridColumn colRoughness; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; private DevExpress.XtraGrid.Columns.GridColumn colDbLocked; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/13-pipe/HydroPipeListCtrl.cs
@@ -31,7 +31,6 @@ /// <summary> /// 绑定数据 /// </summary> /// <param name="allPipeList"></param> public void SetBindingData(List<Yw.Model.HydroPipeInfo> allPipeList) { _allBindingList = new List<HydroPipeViewModel>(); WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/13-pipe/HydroPipeViewModel.cs
@@ -1,6 +1,4 @@ using Yw.Model; namespace Yw.WinFrmUI namespace Yw.WinFrmUI { /// <summary> /// @@ -29,6 +27,7 @@ this.LinkStatus = rhs.LinkStatus; this.Diameter = rhs.Diameter; this.Length = rhs.Length; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; this.Roughness = rhs.Roughness; @@ -120,6 +119,13 @@ public double Length { get; set; } /// <summary> /// 材质 /// </summary> [DisplayName("材质")] [Display(Name = "材质")] public string Material { get; set; } /// <summary> /// 粗糙系数 /// </summary> [DisplayName("粗糙系数")] WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/14-exchanger/HydroExchangerListCtrl.Designer.cs
@@ -43,6 +43,8 @@ colRoughness = new DevExpress.XtraGrid.Columns.GridColumn(); colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colDbLocked = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)hydroExchangerViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); @@ -65,7 +67,7 @@ // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colRoughness, colMinorLoss, colDescription }); gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colMaterial, colRoughness, colMinorLoss, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsFind.AlwaysVisible = true; @@ -76,77 +78,91 @@ colCode.FieldName = "Code"; colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 0; colCode.VisibleIndex = 1; // // colName // colName.FieldName = "Name"; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 1; colName.VisibleIndex = 2; // // colFlagsString // colFlagsString.FieldName = "FlagsString"; colFlagsString.Name = "colFlagsString"; colFlagsString.Visible = true; colFlagsString.VisibleIndex = 2; colFlagsString.VisibleIndex = 3; // // colStartCode // colStartCode.FieldName = "StartCode"; colStartCode.Name = "colStartCode"; colStartCode.Visible = true; colStartCode.VisibleIndex = 3; colStartCode.VisibleIndex = 4; // // colEndCode // colEndCode.FieldName = "EndCode"; colEndCode.Name = "colEndCode"; colEndCode.Visible = true; colEndCode.VisibleIndex = 4; colEndCode.VisibleIndex = 5; // // colLinkStatus // colLinkStatus.FieldName = "LinkStatus"; colLinkStatus.Name = "colLinkStatus"; colLinkStatus.Visible = true; colLinkStatus.VisibleIndex = 5; colLinkStatus.VisibleIndex = 6; // // colDiameter // colDiameter.FieldName = "Diameter"; colDiameter.Name = "colDiameter"; colDiameter.Visible = true; colDiameter.VisibleIndex = 6; colDiameter.VisibleIndex = 7; // // colLength // colLength.FieldName = "Length"; colLength.Name = "colLength"; colLength.Visible = true; colLength.VisibleIndex = 7; colLength.VisibleIndex = 8; // // colRoughness // colRoughness.FieldName = "Roughness"; colRoughness.Name = "colRoughness"; colRoughness.Visible = true; colRoughness.VisibleIndex = 8; colRoughness.VisibleIndex = 10; // // colMinorLoss // colMinorLoss.FieldName = "MinorLoss"; colMinorLoss.Name = "colMinorLoss"; colMinorLoss.Visible = true; colMinorLoss.VisibleIndex = 9; colMinorLoss.VisibleIndex = 11; // // colDescription // colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 10; colDescription.VisibleIndex = 12; // // colDbLocked // colDbLocked.FieldName = "DbLocked"; colDbLocked.Name = "colDbLocked"; colDbLocked.Visible = true; colDbLocked.VisibleIndex = 0; // // colMaterial // colMaterial.FieldName = "Material"; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 9; // // HydroExchangerListCtrl // @@ -177,5 +193,7 @@ private DevExpress.XtraGrid.Columns.GridColumn colLength; private DevExpress.XtraGrid.Columns.GridColumn colRoughness; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; private DevExpress.XtraGrid.Columns.GridColumn colDbLocked; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/14-exchanger/HydroExchangerViewModel.cs
@@ -27,6 +27,7 @@ this.LinkStatus = rhs.LinkStatus; this.Diameter = rhs.Diameter; this.Length = rhs.Length; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; this.Roughness = rhs.Roughness; @@ -118,6 +119,13 @@ public double Length { get; set; } /// <summary> /// 材质 /// </summary> [DisplayName("材质")] [Display(Name = "材质")] public string Material { get; set; } /// <summary> /// 粗糙系数 /// </summary> [DisplayName("粗糙系数")] WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/15-translation/HydroTranslationListCtrl.Designer.cs
@@ -43,6 +43,8 @@ colRoughness = new DevExpress.XtraGrid.Columns.GridColumn(); colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colDbLocked = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)hydroTranslationViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); @@ -65,7 +67,7 @@ // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colRoughness, colMinorLoss, colDescription }); gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colFlagsString, colStartCode, colEndCode, colLinkStatus, colDiameter, colLength, colMaterial, colRoughness, colMinorLoss, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsFind.AlwaysVisible = true; @@ -76,77 +78,91 @@ colCode.FieldName = "Code"; colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 0; colCode.VisibleIndex = 1; // // colName // colName.FieldName = "Name"; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 1; colName.VisibleIndex = 2; // // colFlagsString // colFlagsString.FieldName = "FlagsString"; colFlagsString.Name = "colFlagsString"; colFlagsString.Visible = true; colFlagsString.VisibleIndex = 2; colFlagsString.VisibleIndex = 3; // // colStartCode // colStartCode.FieldName = "StartCode"; colStartCode.Name = "colStartCode"; colStartCode.Visible = true; colStartCode.VisibleIndex = 3; colStartCode.VisibleIndex = 4; // // colEndCode // colEndCode.FieldName = "EndCode"; colEndCode.Name = "colEndCode"; colEndCode.Visible = true; colEndCode.VisibleIndex = 4; colEndCode.VisibleIndex = 5; // // colLinkStatus // colLinkStatus.FieldName = "LinkStatus"; colLinkStatus.Name = "colLinkStatus"; colLinkStatus.Visible = true; colLinkStatus.VisibleIndex = 5; colLinkStatus.VisibleIndex = 6; // // colDiameter // colDiameter.FieldName = "Diameter"; colDiameter.Name = "colDiameter"; colDiameter.Visible = true; colDiameter.VisibleIndex = 6; colDiameter.VisibleIndex = 7; // // colLength // colLength.FieldName = "Length"; colLength.Name = "colLength"; colLength.Visible = true; colLength.VisibleIndex = 7; colLength.VisibleIndex = 8; // // colRoughness // colRoughness.FieldName = "Roughness"; colRoughness.Name = "colRoughness"; colRoughness.Visible = true; colRoughness.VisibleIndex = 8; colRoughness.VisibleIndex = 10; // // colMinorLoss // colMinorLoss.FieldName = "MinorLoss"; colMinorLoss.Name = "colMinorLoss"; colMinorLoss.Visible = true; colMinorLoss.VisibleIndex = 9; colMinorLoss.VisibleIndex = 11; // // colDescription // colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 10; colDescription.VisibleIndex = 12; // // colDbLocked // colDbLocked.FieldName = "DbLocked"; colDbLocked.Name = "colDbLocked"; colDbLocked.Visible = true; colDbLocked.VisibleIndex = 0; // // colMaterial // colMaterial.FieldName = "Material"; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 9; // // HydroTranslationListCtrl // @@ -177,5 +193,7 @@ private DevExpress.XtraGrid.Columns.GridColumn colRoughness; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; private BindingSource hydroTranslationViewModelBindingSource; private DevExpress.XtraGrid.Columns.GridColumn colDbLocked; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-parter/15-translation/HydroTranslationViewModel.cs
@@ -27,6 +27,7 @@ this.LinkStatus = rhs.LinkStatus; this.Diameter = rhs.Diameter; this.Length = rhs.Length; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; this.Roughness = rhs.Roughness; @@ -118,6 +119,13 @@ public double Length { get; set; } /// <summary> /// 材质 /// </summary> [DisplayName("材质")] [Display(Name = "材质")] public string Material { get; set; } /// <summary> /// 粗糙系数 /// </summary> [DisplayName("粗糙系数")]