yangyin
2024-12-25 df88a15b84a7eee09c870dab8c0f5facd6c18c6e
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
 
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Text;
using System.Drawing;
using HydrEngineCSharp;
using DPumpHydr.WinFrmUI.RLT.Native;
using DPumpHydr.WinFrmUI.RLT.Docking.Crown;
using DPumpHydr.WinFrmUI.Volute.TempCtrl;
using static DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper;
 
namespace DPumpHydr.WinFrmUI.Volute
{
    public partial class MainViewPage : System.Windows.Forms.UserControl
    {
        ParasInfoDockPanel _parasDockPanel = null;
        LogListDockPanel _logListDockPanel = null;
        LayersDockPanel _layersDockPanel = null;
        SectAreaDockPanel _sectAreaDockPanel = null;
        public MainViewPage()
        {
            InitializeComponent();
 
            //InitWindow();
 
            Application.AddMessageFilter(new ControlScrollFilter());
 
            // Add the dock content drag message filter to handle moving dock content around.
            Application.AddMessageFilter(MainDockPanel.DockContentDragFilter);
 
            // Add the dock panel message filter to filter through for dock panel splitter
            // input before letting events pass through to the rest of the application.
            Application.AddMessageFilter(MainDockPanel.DockResizeFilter);
 
 
 
            ThemeProvider.Theme.Colors.HeaderBackground = Color.SteelBlue;
            ThemeProvider.Theme.Colors.GreyBackground = Color.White;
            //ThemeProvider.Theme.Colors.DarkBackground = Color.White;
            MainDockPanel.RightDockWidth = 320;
            MainDockPanel.BottomDockHeight = 210;
        }
 
 
 
 
        public void InitWindow()
        {
            InitialRibbonForm();
 
 
 
            _logListDockPanel = new LogListDockPanel();
            _logListDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom;
 
            _sectAreaDockPanel = new SectAreaDockPanel();
            _sectAreaDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom;
            _sectAreaDockPanel.OnRefreshSingleSectBundle += (bundle , selectedPointIndex) =>
            {
                
                this._ctrlSectionBundleInfo.RefreshSectPara(bundle, selectedPointIndex);
                if(this._stepTreeDockPanel.CurrentStepID > this._stepTreeDockPanel.Step_ID_Section18_Full)
                {
                    this._ctrlSectionShapeInfo18.RefreshSectPara(bundle.ToSectionShapePara(selectedPointIndex));
                }
            };
 
 
            _parasDockPanel = new ParasInfoDockPanel(); 
            _parasDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Right;
 
            _layersDockPanel = new LayersDockPanel();
            _layersDockPanel.InitialInfo();
            _layersDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Left;
 
            _stepTreeDockPanel = new StepTreeDockPanel();
            _stepTreeDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Left;
            this._stepTreeDockPanel.BeforeSelectedNodeChangedEvent += (arg1, arg2) =>
            { 
                if (arg1 != null && SaveStepParas(arg1.ID) == false)
                {
                    return false;
                }
          
                return true;
            };
 
            this._stepTreeDockPanel.AfterSelectedNodeChangedEvent += (arg1, arg2) =>
            {
                //              
                if (arg2 != null)
                {
                    this.SetParasCtrl(arg2.ID);
 
 
 
                    //
                    this._stepTreeDockPanel.SetFocusedNode(arg2.ID);
                }
 
                CheckStepBtnStatus();
 
                return true;
            };
 
 
            MainDockPanel.AddContent(_logListDockPanel);
            MainDockPanel.AddContent(_sectAreaDockPanel);
 
            MainDockPanel.AddContent(_parasDockPanel);
            MainDockPanel.AddContent(_layersDockPanel);
            MainDockPanel.AddContent(_stepTreeDockPanel);
            
            MainDockPanel.AddContent(_stepTreeDockPanel, _layersDockPanel.DockGroup);
            MainDockPanel.AddContent(_sectAreaDockPanel, _logListDockPanel.DockGroup);
 
            RBtn后退.Enabled = false;
            Rbtn前进.Enabled = true;
            Rbtn下一步.Enabled = true;
            Rbtn上一步.Enabled = false;
            Rbtn完成.Enabled = false;
 
 
            InitialDesginPanel();
 
 
       
 
            InitialStepNodes();
 
        }
 
        #region 步骤操作
 
        //页面跳转前
        bool stepTreeListCtrl1_BeforeStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode,
            DPumpHydr.WinFrmUI.Base.StepTreeNodePara NextStepNode)
        {
 
            return true;
        }
 
        //页面跳转后
        void stepTreeListCtrl1_SelectedStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara BeforeStepNode,
            DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode)
        {
            //if (CurrentStepNode.Name == "StepHydParas")
            //{
            //    DPumpHydr.WinFrmUI.Volute.frmHdrBaseInfo frm = new DPumpHydr.WinFrmUI.Volute.frmHdrBaseInfo();
            //    frm.Show();
            //}
            //if (CurrentStepNode.Name == "StepGeomParas")
            //{
            //    DPumpHydr.WinFrmUI.Volute.frmGeomBaseInfo frm = new DPumpHydr.WinFrmUI.Volute.frmGeomBaseInfo();
            //    frm.Show();
            //}
        }
 
 
        #endregion
 
 
 
 
 
 
 
 
        protected string GetTranslateString(string text)
        {
            return text;
        }
 
 
    }
}