tangxu
2025-01-13 4f7cb65b079d88d5a829688b24d26d5145c5df47
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs
@@ -9,6 +9,7 @@
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
{
@@ -17,6 +18,24 @@
        ParasInfoDockPanel _parasDockPanel = null;
        LogListDockPanel _logListDockPanel = null;
        LayersDockPanel _layersDockPanel = null;
        SectAreaDockPanel _sectAreaDockPanel = null;
        //参数控件
        ctrlHdrBaseInfo _ctrlHdrBaseInfo = null;
        ctrlSectionBundleInfo _ctrlSectionBundleInfo = null;
        ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null;
        ctrlSetOutflowParas _ctrlSetOutflowParas = null;
        ctrlSetOutflowType _ctrlSetOutflowType = null;
        ctrlThicknessParas _ctrlThicknessParas = null;
        //参数
        ViewModel.HdrBaseInfo _hdrBaseInfo = null;
        ViewModel.GeomBaseInfo _geomBaseInfo = null;
        ViewModel.SectionBundleInfo _sectionBundleInfo = null;
        ViewModel.OtuflowParas _outflowParas = null;
        ViewModel.eOutflowStyle _outflowType = ViewModel.eOutflowStyle.未知;
        private double _bodyThickness = 0;
        public MainViewPage()
        {
            InitializeComponent();
@@ -34,10 +53,11 @@
            DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper.ThemeProvider.Theme.Colors.HeaderBackground = Color.SteelBlue;
            DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper.ThemeProvider.Theme.Colors.GreyBackground = Color.White;
            //ThemeProvider.Theme.Colors.DarkBackground = Color.White;
            MainDockPanel.RightDockWidth = 335;
            MainDockPanel.BottomDockHeight = 210;
        }
@@ -52,10 +72,23 @@
            _logListDockPanel = new LogListDockPanel();
            _logListDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom;
            _parasDockPanel = new ParasInfoDockPanel();
            _sectAreaDockPanel = new SectAreaDockPanel();
            _sectAreaDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom;
            _sectAreaDockPanel.OnRefreshSingleSectArea  += (sect_index , sect_area) =>
            {
                this._ctrlSectionBundleInfo.RefreshSingleSectArea(sect_index, sect_area);
                //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();
@@ -75,10 +108,11 @@
                //              
                if (arg2 != null)
                {
                    this.SetParasCtrl(arg2.ID);
                    if(arg1 == null || arg1.ID < arg2.ID)
                        this.SetParasCtrl(arg2.ID, DPumpHydr.ViewModel.eWizardStepDiretion.前进);
                    else
                        this.SetParasCtrl(arg2.ID, DPumpHydr.ViewModel.eWizardStepDiretion.后退);
                    //
                    this._stepTreeDockPanel.SetFocusedNode(arg2.ID);
                }
@@ -90,36 +124,26 @@
            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;
            this._occDesign3dCtrl = new OccDesignCtrlDockPanel();
            this._occDesign3dCtrl.Size = new System.Drawing.Size(1000, 1000);
            this._occDesign3dCtrl.Name = "OccDesignCtrl";
            this._occDesign3dCtrl.Dock = DockStyle.Fill;
            this._occDesign3dCtrl.DockText = "三维设计";
            this._occDesign3dCtrl.Initial(true);
            this._occDesign2dCtrl = new OccDesignCtrlDockPanel();
            this._occDesign2dCtrl.Size = new System.Drawing.Size(1000, 1000);
            this._occDesign2dCtrl.Name = "OccDesignCtrl";
            this._occDesign2dCtrl.Dock = DockStyle.Fill;
            this._occDesign2dCtrl.DockText = "二维视图";
            this._occDesign2dCtrl.Initial(false );
            InitialDesginPanel();
            MainDockPanel.AddContent(_occDesign2dCtrl);
            MainDockPanel.AddContent(_occDesign3dCtrl);
            InitialStepNodes();
@@ -128,16 +152,16 @@
        #region 步骤操作
        //页面跳转前
        bool stepTreeListCtrl1_BeforeStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.TreeStepNode CurrentStepNode,
            DPumpHydr.WinFrmUI.Base.TreeStepNode NextStepNode)
        bool stepTreeListCtrl1_BeforeStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode,
            DPumpHydr.WinFrmUI.Base.StepTreeNodePara NextStepNode)
        {
            return true;
        }
        //页面跳转后
        void stepTreeListCtrl1_SelectedStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.TreeStepNode BeforeStepNode,
            DPumpHydr.WinFrmUI.Base.TreeStepNode CurrentStepNode)
        void stepTreeListCtrl1_SelectedStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara BeforeStepNode,
            DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode)
        {
            //if (CurrentStepNode.Name == "StepHydParas")
            //{