chenn
2025-03-28 9dba1b6adc0bbb4aa8cc531f4e6d822bf1a56be3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
 
namespace DPumpHydr.WinFrmUI.Volute
{
    public partial class MainViewPage
    {
        ctrlSectionBundleInfo _ctrlSectionBundleInfo = null;
        ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null;
 
     
        ViewModel.SectionBundleInfo _sectionBundleInfo = null;
 
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        private bool SaveParaStep2()
        {
            string error_info;
            var sectionBaseInfo = _ctrlSectionBundleInfo.GetBindingData(out error_info);
            if (sectionBaseInfo == null)
            {
                MessageBox.Show(error_info);
                return false;
            }
            _sectionBundleInfo = sectionBaseInfo;
            return true;
        }
    
        /// <summary>
        /// 
        /// </summary>
        /// <param name="last_step_id"></param>
        private void EnterStep2(long last_step_id)
        {
            if (_hdrBaseInfo == null || _geomBaseInfo == null)
                return;
 
    
 
            this._occDesign2dCtrl.RemoveThicknessBody();
            this._occDesign2dCtrl.RemoveWaterBody();
            this._occDesign2dCtrl.RemoveSectCurve910(); this._occDesign2dCtrl.RemoveMidCurve();
            this._occDesign2dCtrl.SetAllSectionCurveVisible(true);
            this._occDesign2dCtrl.FitView();
 
            this._occDesign3dCtrl.RemoveThicknessBody();
            this._occDesign3dCtrl.RemoveWaterBody();
            this._occDesign3dCtrl.RemoveSectCurve910();
            this._occDesign3dCtrl.RemoveMidCurve();
            this._occDesign3dCtrl.SetAllSectionCurveVisible(true);
 
            this._occDesign3dCtrl.FitView();
 
 
            CreateSectionStepCtrl();
 
 
            _isHaveCreateWaterBody3d = false;
 
 
 
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.前进;
            if (last_step_id > this._stepTreeDockPanel.Step_ID_Section18_Full)
                step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.后退;
 
            _ctrlSectionBundleInfo.ShowPage(_hdrBaseInfo, _geomBaseInfo, step_direction,true);
 
            DockStepParaCtrl(_ctrlSectionBundleInfo);
 
 
 
 
            this._sectAreaDockPanel.RefreshControl();
            this._sectAreaDockPanel.Visible = true;
        }
        private void CreateSectionStepCtrl()
        {
            if (_ctrlSectionBundleInfo == null)
            {
                _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
                _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
                _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
                _ctrlSectionBundleInfo.OnHightLightSectCurve += HightLightSectCurve;
                _ctrlSectionBundleInfo.OnNextStep += () =>
                {
                    GoNextStep();
                };
            }
        }
        /// <summary>
        /// 更新1-8
        /// </summary>
        /// <param name="bundle"></param>
        private List<int> RefreshSectShapeWhole18(ViewModel.SectionBundleInfo bundle)
        {
            var ret = this._occDesign3dCtrl.RefreshAllSectShape18(bundle);
            this._occDesign2dCtrl.RefreshAllSectShape18(bundle);
            this._sectAreaDockPanel.SetArea18(bundle);
            if (ret == null || ret.Count() == 0)
            {
                this._sectionBundleInfo = bundle;
            }
            return ret;
        }
 
        /// <summary>
        /// 高亮某个截面
        /// </summary>
        /// <param name="sectIndex"></param>
        private void HightLightSectCurve(int sectIndex)
        {
            this._occDesign2dCtrl.HightLightSectCurve(sectIndex);
            this._occDesign3dCtrl.HightLightSectCurve(sectIndex);
        }
 
        //更新单个断面
        private void RefreshSectShapeSingle18(ViewModel.SectionShapePara para)
        {
            this._sectionBundleInfo.FromSectionShapePara(para);
 
            this._occDesign3dCtrl.RefreshSingleSectShape18(para);
 
            this._occDesign2dCtrl.RefreshSingleSectShape18(para);
 
            this._sectAreaDockPanel.SetArea18(para);
        }
 
    }
}