Client/DesktopMain/DPumpHydr.DesktopMain.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/DPumpHydr.WinFrmUI.Volute.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/DPumpHydr.WinFrmUI.Volute.csproj.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainDialog.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_OcctDemo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Client/DesktopMain/DPumpHydr.DesktopMain.csproj
@@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net8.0-windows7.0</TargetFramework> <UseWindowsForms>true</UseWindowsForms> <Company>上海义维流体科技有限公司</Company> </PropertyGroup> WinFrmUI/DPumpHydr.WinFrmUI.Volute/DPumpHydr.WinFrmUI.Volute.csproj
@@ -7,7 +7,6 @@ </PropertyGroup> <ItemGroup> <Compile Remove="MainViewPage_OcctDemo.cs" /> <Compile Remove="StepControl\LayersCtrl.cs" /> <Compile Remove="StepControl\LayersCtrl.Designer.cs" /> <Compile Remove="StepControl\StepTreeListCtrl.cs" /> @@ -28,6 +27,12 @@ </ItemGroup> <ItemGroup> <Reference Include="HydrEngineCSharp"> <HintPath>..\..\Library\HydrEngineCSharp.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <Compile Update="DebugRLT\DebugPage.cs"> <SubType>UserControl</SubType> </Compile> WinFrmUI/DPumpHydr.WinFrmUI.Volute/DPumpHydr.WinFrmUI.Volute.csproj.user
@@ -32,9 +32,15 @@ <Compile Update="MainViewPage_InitialRibbon.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="MainViewPage_OcctDemo.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="MainViewPage_StepInfo.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="Occ\OccDesignCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="StepControl\Form1.cs"> <SubType>Form</SubType> </Compile> WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainDialog.cs
@@ -21,6 +21,7 @@ private void MainDialog_Load(object sender, EventArgs e) { MainViewPage page = new MainViewPage(); page.InitWindow(); page.Name = "MainViewPage"; page.Dock = DockStyle.Fill; this.Controls.Add(page); WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs
@@ -4,7 +4,8 @@ using System.Windows.Forms; using System.IO; using System.Text; using System.Drawing; using System.Drawing; using HydrEngineCSharp; namespace DPumpHydr.WinFrmUI.Volute { @@ -17,28 +18,25 @@ //InitWindow(); InitialRibbonForm(); } ctrlHdrBaseInfo _ctrlHdrBaseInfo = null; ctrlGeomBaseInfo _ctrlGeomBaseInfo = null; ctrlSectionBaseInfo _ctrlSectionBaseInfo = null; ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null; ctrlSetOutflowStyle _ctrlSetOutflowStyle = null; ctrlSetOutflowDim _ctrlSetOutflowDim = null; public void InitWindow() { InitialRibbonForm(); //InitialStepNodes(); InitialOcccCtrl(); // SetParasCtrl(Step_ID_Hdr_Base_Info); // SetParasCtrl(Step_ID_Hdr_Base_Info); // _currentStepID = Step_ID_Hdr_Base_Info; // _currentStepID = Step_ID_Hdr_Base_Info; } #region 步骤操作 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs
@@ -9,10 +9,7 @@ namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage { { /// <summary> /// 控件声明 /// </summary> @@ -93,7 +90,7 @@ #endregion private bool _isInitialOk = false; private void InitialRibbonForm() { bool isButtonMoreVisible = false; @@ -234,48 +231,60 @@ ribbonPanel视图.Name = "ribbonPanel视图"; ribbonPanel视图.ButtonMoreVisible = isButtonMoreVisible; ////左视图按钮 RBtn左视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage左视图 = "View-Left.png"; RBtn左视图.Image = GlobalResource.BuildImage(RBtnimage左视图, 40, 40); //左视图按钮 RBtn左视图 = new System.Windows.Forms.RibbonButton(); RBtn左视图.Image = GlobalResource.BuildImage("View-Left.png", 40, 40); RBtn左视图.Name = "RBtn左视图"; RBtn左视图.Text = "左视图"; RBtn左视图.Click+=(sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.LEFT); }; ////右视图按钮 RBtn右视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage右视图 = "View-Right.png"; RBtn右视图.Image = GlobalResource.BuildImage(RBtnimage右视图, 40, 40); RBtn右视图 = new System.Windows.Forms.RibbonButton(); RBtn右视图.Image = GlobalResource.BuildImage("View-Right.png", 40, 40); RBtn右视图.Name = "RBtn右视图"; RBtn右视图.Text = "右视图"; RBtn右视图.Click += (sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.RIGHT); }; ////俯视图按钮 RBtn俯视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage俯视图 = "View-Top.png"; RBtn俯视图.Image = GlobalResource.BuildImage(RBtnimage俯视图, 40, 40); RBtn俯视图 = new System.Windows.Forms.RibbonButton(); RBtn俯视图.Image = GlobalResource.BuildImage("View-Top.png", 40, 40); RBtn俯视图.Name = "RBtn俯视图"; RBtn俯视图.Text = "俯视图"; RBtn俯视图.Click += (sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.TOP); }; ////仰视图按钮 RBtn仰视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage仰视图 = "View-Bottom.png"; RBtn仰视图.Image = GlobalResource.BuildImage(RBtnimage仰视图, 40, 40); RBtn仰视图 = new System.Windows.Forms.RibbonButton(); RBtn仰视图.Image = GlobalResource.BuildImage("View-Bottom.png", 40, 40); RBtn仰视图.Name = "RBtn仰视图"; RBtn仰视图.Text = "仰视图"; RBtn仰视图.Click += (sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.BOTTOM); }; ////正视图按钮 RBtn正视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage正视图 = "View-Front.png"; RBtn正视图.Image = GlobalResource.BuildImage(RBtnimage正视图, 40, 40); RBtn正视图 = new System.Windows.Forms.RibbonButton(); RBtn正视图.Image = GlobalResource.BuildImage("View-Front.png", 40, 40); RBtn正视图.Name = "RBtn正视图"; RBtn正视图.Text = "正视图"; RBtn仰视图.Click += (sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.FRONT); }; ////后视图按钮 RBtn后视图 = new System.Windows.Forms.RibbonButton(); var RBtnimage后视图 = "View-Back.png"; RBtn后视图.Image = GlobalResource.BuildImage(RBtnimage后视图, 40, 40); RBtn后视图 = new System.Windows.Forms.RibbonButton(); RBtn后视图.Image = GlobalResource.BuildImage("View-Back.png", 40, 40); RBtn后视图.Name = "RBtn后视图"; RBtn后视图.Text = "后视图"; RBtn后视图.Click += (sender, e) => { this._occDesignCtrl.SetViewDirect(Model.eViewDirect.BACK); }; @@ -758,8 +767,14 @@ Rbtn开始.Click += (sender, e) => { Rbtn下一步.Visible = true; Rbtn取消.Visible = true; InitialStepNodes(); if(_isInitialOk == false) { //this.panelParas.Controls.Clear(); _isInitialOk = true; this._occDesignCtrl.Initial(); InitialStepNodes(); } Rbtn开始.Visible = false; }; Rbtn完成 = new System.Windows.Forms.RibbonButton(); WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_OcctDemo.cs
@@ -1,285 +1,24 @@ using DevExpress.XtraEditors; using System; using System; using System.Collections.Generic; using System.Windows.Forms; using GCOCC; using System.IO; using System.Text; using System.Linq; namespace HydrCAD.WinFrmUI.Impeller namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage : TabbedMdiXtraForm { GCOCC_Point3d ShroundLine1Start; GCOCC_Point3d ShroundLine1End; GCOCC_Point3d ShroundLine2Control; GCOCC_Point3d ShroundLine2End; GCOCC_Point3d ShroundLine3End; GCOCC_Point3d OutletLineEnd; GCOCC_Point3d InletLineStart; GCOCC_Point3d HubLine1End; GCOCC_Point3d HubLine2Control; GCOCC_Point3d HubLine2End; public partial class MainViewPage { OccDesignCtrl _occDesignCtrl; GCOCC.LineData ShroundLine1; GCOCC.LineData ShroundLine2; GCOCC.LineData ShroundLine3; GCOCC.LineData OutletLine; GCOCC.LineData InletLine; GCOCC.LineData HubLine1; GCOCC.LineData HubLine2; GCOCC.LineData HubLine3; List<GCOCC.LineData> lines = new List<GCOCC.LineData>(); //GCDemo data; private void InitOcctDemo() private void InitialOcccCtrl() { //data = new GCDemo(); ShroundLine1Start = new GCOCC_Point3d(0, 50, 0); ShroundLine1End = new GCOCC_Point3d(6.43625613, 50, 0); ShroundLine2Control = new GCOCC_Point3d(15.43528266, 53.2753778, 0); ShroundLine2End = new GCOCC_Point3d(20.22356467, 61.56892551, 0); ShroundLine3End = new GCOCC_Point3d(27, 100, 0); OutletLineEnd = new GCOCC_Point3d(45, 100, 0); InletLineStart = new GCOCC_Point3d(0, 15, 0); HubLine1End = new GCOCC_Point3d(12.57235685, 15, 0); HubLine2Control = new GCOCC_Point3d(37.96045984, 25.90758985, 0); HubLine2End = new GCOCC_Point3d(47.52439057, 51.83175847, 0); ShroundLine1 = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { ShroundLine1Start, ShroundLine1End }); ShroundLine2 = new GCOCC.LineData(LineType.Arc, new GCOCC_Point3d[] { ShroundLine1End, ShroundLine2Control, ShroundLine2End }); ShroundLine3 = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { ShroundLine2End, ShroundLine3End }); OutletLine = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { ShroundLine3End, OutletLineEnd }); InletLine = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { InletLineStart, ShroundLine1Start }); HubLine1 = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { InletLineStart, HubLine1End }); HubLine2 = new GCOCC.LineData(LineType.Arc, new GCOCC_Point3d[] { HubLine1End, HubLine2Control, HubLine2End }); HubLine3 = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { HubLine2End, OutletLineEnd }); //Read(System.IO.Path.Combine(@"D:\WorkData\Pump3D\DPumpHdrV1.0\out", "GridPints.txt")); _occViewer2d = new HydrCAD.WinFrmUI.Viewer.OccBaseViewer(); _occViewer2d.Dock = DockStyle.Fill; _occViewer2d.Name = "OCCViewer2d1"; this.Controls.Add(_occViewer2d); _occDesignCtrl = new OccDesignCtrl(); _occDesignCtrl.Size = new System.Drawing.Size(1000, 1000); _occDesignCtrl.Name = "OccDesignCtrl"; _occDesignCtrl.Dock = DockStyle.Fill; this.panelParas.Controls.Add( _occDesignCtrl ); } /// <summary> /// 轴面投影图 /// </summary> public void CreateAxialProjectionDiagram() { lines.Add(ShroundLine1); lines.Add(ShroundLine2); lines.Add(ShroundLine3); lines.Add(OutletLine); lines.Add(InletLine); lines.Add(HubLine1); lines.Add(HubLine2); lines.Add(HubLine3); _occViewer2d.View.Draw2dLines(lines.ToArray(), 1); } List<GCOCC.LineData> _passLines = null; /// <summary> /// 过流断面 /// </summary> public void CreatCrossSection() { int flow_num = 10; _passLines = new List<GCOCC.LineData>(); List<GCOCC.LineData> shroundLines = new List<GCOCC.LineData> { ShroundLine1, ShroundLine2, ShroundLine3 }; List<GCOCC.LineData> hubLines = new List<GCOCC.LineData> { HubLine1, HubLine2, HubLine3 }; var circles = GCOCC_MathMethord.GetMidArcBetweenTwoGroupLinesTest(shroundLines.ToArray(), hubLines.ToArray(), flow_num); List<GCOCC.GCOCC_Point2d> starts = new List<GCOCC_Point2d>(); List<GCOCC.GCOCC_Point2d> mids = new List<GCOCC_Point2d>(); List<GCOCC.GCOCC_Point2d> ends = new List<GCOCC_Point2d>(); //var circles = GCOCC_MathMethord.GetMidArcBetweenTwoGroupLines(shroundLines.ToArray(), hubLines.ToArray(), Convert.ToInt32(Numbers.Text)); foreach (var c in circles) { GCOCC_Point3d start = new GCOCC_Point3d(c._start.X, c._start.Y, 0); GCOCC_Point3d end = new GCOCC_Point3d(c._end.X, c._end.Y, 0); GCOCC_Point3d mid = new GCOCC_Point3d(c._mid.X, c._mid.Y, 0); starts.Add(new GCOCC_Point2d(c._start.X, c._start.Y)); mids.Add(new GCOCC_Point2d(c._mid.X, c._mid.Y)); ends.Add(new GCOCC_Point2d(c._end.X, c._end.Y)); var isLine = GCOCC_MathMethord.CheckIf3PointsOnALine(start, end, mid); GCOCC.LineData l = null; if (isLine) { l = new GCOCC.LineData(LineType.Straight, new GCOCC_Point3d[] { start, end }); } else { l = new GCOCC.LineData(LineType.Arc, new GCOCC_Point3d[] { start, mid, end }); } _passLines.Add(l); } //View.DrawPoints(starts,"Ps"); //View.DrawPoints(mids,"Pc"); //View.DrawPoints(ends,"Ph"); //View.DrawLines(_passLines, 1); _occViewer2d.View.Draw2dLines(_passLines.ToArray(), 1); } List<GCOCC.LineData> _midFlowCurve = new List<GCOCC.LineData>(); /// <summary> /// 中间流线 /// </summary> public void CreateMiddleFlowCurve() { if (_passLines == null || _passLines.Count < 3) return; var pts = GCOCC.GCOCC_MathMethord.GetMidPointsFromPassLines(_passLines.ToArray()); ShroundLine3End = new GCOCC_Point3d(27, 100, 0); OutletLineEnd = new GCOCC_Point3d(45, 100, 0); pts.Add(new GCOCC_Point2d((ShroundLine3End.X + OutletLineEnd.X) / 2, (ShroundLine3End.Y + OutletLineEnd.Y) / 2)); List<GCOCC_Point3d> pt3ds = new List<GCOCC_Point3d>(); foreach (var item in pts) { GCOCC_Point3d p3d = item.ConvertToPoint3d(); pt3ds.Add(p3d); } var midLine = new GCOCC.LineData(LineType.BSpline, pt3ds.ToArray()); _midFlowCurve.Add(midLine); //View.DrawPoints(pts); _occViewer2d.View.Draw2dLines(_midFlowCurve.ToArray(), 1); } List<DividedPointData> shroundPoints = new List<DividedPointData>(); List<DividedPointData> midPoints = new List<DividedPointData>(); List<DividedPointData> hubPoints = new List<DividedPointData>(); /// <summary> /// 流线分点 /// </summary> public void CreateStreamlineDividingPoint() { if (_midFlowCurve == null || _midFlowCurve.Count == 0) return; double Angles = 2.5; List<GCOCC.LineData> shroundLines = new List<GCOCC.LineData> { ShroundLine1, ShroundLine2, ShroundLine3 }; shroundPoints = GCOCC_MathMethord.GetPointsFromStreamLine(shroundLines.ToArray(), Angles); shroundPoints.Insert(0, new DividedPointData(new GCOCC_Point2d(ShroundLine3End.X, ShroundLine3End.Y), 0, 0, true, 0, 0)); List<GCOCC_Point2d> pts = new List<GCOCC_Point2d>(); shroundPoints.ForEach(x => pts.Add(x.Point)); _occViewer2d.View.Draw2dPointsWithIndex(pts.ToArray(), null); List<GCOCC.LineData> hubLines = new List<GCOCC.LineData> { HubLine1, HubLine2, HubLine3 }; hubPoints = GCOCC_MathMethord.GetPointsFromStreamLine(hubLines.ToArray(), Angles); hubPoints.Insert(0, new DividedPointData(new GCOCC_Point2d(OutletLineEnd.X, OutletLineEnd.Y), 0, 0, true, 0, 0)); List<GCOCC_Point2d> pts2 = new List<GCOCC_Point2d>(); hubPoints.ForEach(x => pts2.Add(x.Point)); _occViewer2d.View.Draw2dPointsWithIndex(pts2.ToArray(), null); midPoints = GCOCC_MathMethord.GetPointsFromStreamLine(_midFlowCurve.ToArray(), Angles); midPoints.Insert(0, new DividedPointData(new GCOCC_Point2d(OutletLineEnd.X, OutletLineEnd.Y), 0, 0, true, 0, 0)); List<GCOCC_Point2d> pts3 = new List<GCOCC_Point2d>(); midPoints.ForEach(x => pts3.Add(x.Point)); _occViewer2d.View.Draw2dPointsWithIndex(pts3.ToArray(), null); } List<HydrCAD.Model.GridPoint> shroundGridPoints = new List<HydrCAD.Model.GridPoint>();//方格网前盖板流线点集合, 分点坐标 和旋转角度 List<HydrCAD.Model.GridPoint> hubGridPoints = new List<HydrCAD.Model.GridPoint>();//后盖板 List<HydrCAD.Model.GridPoint> midGridPoints = new List<HydrCAD.Model.GridPoint>();//中间流线 List<PointRotateData> shroundRotateDatas = new List<PointRotateData>();//前盖板流线 轴面图坐标 和旋转角度 List<PointRotateData> hubRotateDatas = new List<PointRotateData>();//后盖板 List<PointRotateData> midRotateDatas = new List<PointRotateData>();//中间流线 /// <summary> /// 映射方格网 /// </summary> public void CreateMappingGrid() { if (shroundGridPoints == null || shroundGridPoints.Count == 0) return; List<GCOCC.LineData> shroundLines = new List<GCOCC.LineData> { ShroundLine1, ShroundLine2, ShroundLine3 }; List<double> shroundGridY = new List<double>(); shroundGridPoints.ForEach(x => shroundGridY.Add(x.Y)); var shroundMapPoints = GCOCC_MathMethord.MapGridPointsToStreamLinePoints(shroundLines.ToArray(), shroundPoints, shroundGridY); for (int i = 0; i < shroundMapPoints.Count; i++) { GCOCC_Point3d pt = new GCOCC_Point3d() { X = shroundMapPoints[i].X, Y = shroundMapPoints[i].Y, Z = 0 }; PointRotateData data = new PointRotateData(pt, 2.5 * i); shroundRotateDatas.Add(data); } List<GCOCC.LineData> hubLines = new List<GCOCC.LineData> { HubLine1, HubLine2, HubLine3 }; List<double> hubGridY = new List<double>(); hubGridPoints.ForEach(x => hubGridY.Add(x.Y)); var hubMapPoints = GCOCC_MathMethord.MapGridPointsToStreamLinePoints(hubLines.ToArray(), hubPoints, hubGridY); for (int i = 0; i < hubMapPoints.Count; i++) { GCOCC_Point3d pt = new GCOCC_Point3d() { X = hubMapPoints[i].X, Y = hubMapPoints[i].Y, Z = 0 }; PointRotateData data = new PointRotateData(pt, 2.5 * i); hubRotateDatas.Add(data); } List<double> midGridY = new List<double>(); midGridPoints.ForEach(x => midGridY.Add(x.Y)); var midMapPoints = GCOCC_MathMethord.MapGridPointsToStreamLinePoints(_midFlowCurve.ToArray(), midPoints, midGridY); for (int i = 0; i < midMapPoints.Count; i++) { GCOCC_Point3d pt = new GCOCC_Point3d() { X = midMapPoints[i].X, Y = midMapPoints[i].Y, Z = 0 }; PointRotateData data = new PointRotateData(pt, 2.5 * i); midRotateDatas.Add(data); } } List<GCOCC_Point3d> shroundRotatedPoints; List<GCOCC_Point3d> hubRotatedPoints; List<GCOCC_Point3d> midRotatedPoints; /// <summary> /// 叶片设计面造型 /// </summary> public void CreateWorkSheet() { if (shroundRotateDatas == null || shroundRotateDatas.Count == 0) return; shroundRotatedPoints = GCOCC_MathMethord.RotatePoint(shroundRotateDatas); _occViewer2d.View.Draw3dPoints(shroundRotatedPoints.ToArray()); hubRotatedPoints = GCOCC_MathMethord.RotatePoint(hubRotateDatas); _occViewer2d.View.Draw3dPoints(hubRotatedPoints.ToArray()); midRotatedPoints = GCOCC_MathMethord.RotatePoint(midRotateDatas); _occViewer2d.View.Draw3dPoints(midRotatedPoints.ToArray()); GCOCC.LineData sline = new GCOCC.LineData(LineType.BSpline, shroundRotatedPoints.ToArray()); GCOCC.LineData hline = new GCOCC.LineData(LineType.BSpline, hubRotatedPoints.ToArray()); GCOCC.LineData mline = new GCOCC.LineData(LineType.BSpline, midRotatedPoints.ToArray()); //_occViewer2d.View.MakeSurfaceAcrossSplines2(new List<GCOCC.LineData>() { sline, mline, hline }.ToArray()); } WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -1,17 +1,22 @@ using System; using System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; using System.Text; using System.Linq; using DPumpHydr.WinFrmUI.Volute.ViewModel; using System.Security.Policy; namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage { // ctrlHdrBaseInfo _ctrlHdrBaseInfo = null; ctrlGeomBaseInfo _ctrlGeomBaseInfo = null; ctrlSectionBaseInfo _ctrlSectionBaseInfo = null; ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null; ctrlSetOutflowStyle _ctrlSetOutflowStyle = null; ctrlSetOutflowDim _ctrlSetOutflowDim = null; //基础信息 private readonly string Group_Name_Base_Info = "BaseInfo"; private readonly int Group_ID_Base_Info = -1;//组ID @@ -60,16 +65,16 @@ ViewModel.SectionBaseInfo _sectionBaseInfo = null; ViewModel.SectionShapePara _sectionShapePara = null; DPumpHydr.WinFrmUI.Volute.TreeStepNode next_step = null; int index; int _currentSectIndex; /// <summary> /// 下一步核心 /// </summary> /// <returns></returns> private bool GoNextStepCore() { if (_currentStepID != Step_ID_Section18_Dim || index>8 || index<=1) if (_currentStepID != Step_ID_Section18_Dim || _currentSectIndex>8 || _currentSectIndex<=1) { index = 9; _currentSectIndex = 9; next_step = (from x in _allStepNodes where x.ID > _currentStepID orderby x.ID @@ -128,12 +133,12 @@ } _sectionBaseInfo = sectionBaseInfo; _sectionBaseInfo.InitialAllParameters(_hdrBaseInfo, _geomBaseInfo); index--; _currentSectIndex--; if (_sectionShapePara == null) { _sectionShapePara = new ViewModel.SectionShapePara(); } _sectionShapePara.Initialparameters(index, _sectionBaseInfo); _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } //1-8断面进行下一步点击 if (_currentStepID == Step_ID_Section18_Dim) @@ -147,12 +152,12 @@ } _sectionShapePara = sectionShapeInfo18; _sectionShapePara.CalcHeightByArea(_sectionBaseInfo.ShapeType); _sectionBaseInfo.EditSingleShape(_sectionShapePara, index); if(index != 9) _sectionBaseInfo.EditSingleShape(_sectionShapePara, _currentSectIndex); if(_currentSectIndex != 9) { index--; _currentSectIndex--; } _sectionShapePara.Initialparameters(index, _sectionBaseInfo); _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } SetParasCtrl(next_step.ID); @@ -186,17 +191,17 @@ //} if (_currentStepID == Step_ID_Hdr_Base_Info) return false; if(_currentStepID == Step_ID_Section18_Dim && index >=1 &&index < 8) if(_currentStepID == Step_ID_Section18_Dim && _currentSectIndex >=1 &&_currentSectIndex < 8) { index++; _sectionShapePara.Initialparameters(index, _sectionBaseInfo); _currentSectIndex++; _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); SetParasCtrl(Step_ID_Section18_Dim); return true; } if(_currentStepID == Step_ID_Outflow_Style) { index = 1; _sectionShapePara.Initialparameters(index, _sectionBaseInfo); _currentSectIndex = 1; _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } var prev_step = (from x in _allStepNodes where x.ID < _currentStepID @@ -491,7 +496,7 @@ _ctrlHdrBaseInfo.Dock = DockStyle.Right; _ctrlHdrBaseInfo.SetBindingData(hdrBaseInfo); } this.panelParas.Controls.Clear(); //this.panelParas.Controls.Clear();//不能清理 this.panelParas.Controls.Add(_ctrlHdrBaseInfo); this._currentStepID = Step_ID_Hdr_Base_Info; //this.stepTreeListCtrl.SetStepSource(_allStepNodes, 1);