From ce0cdf82989d5fead5618d1988a7d1aba9746d57 Mon Sep 17 00:00:00 2001
From: chenn <gu.beic@qq.com>
Date: 星期五, 11 四月 2025 16:56:01 +0800
Subject: [PATCH] 2d标注隐藏与显示;1-8断面隐藏与显示强制刷新

---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs  |    2 ++
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs |   24 ++++++++++++++++++++++++
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs      |   17 ++++++++++++++++-
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs      |    6 +++++-
 4 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
index 75055a1..09da50d 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
@@ -142,6 +142,7 @@
                 this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
                 this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
 
+                RbtnChk鏍囨敞.Visible = true;
                 _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Outflow_Paras);
 
                 #endregion
@@ -156,6 +157,7 @@
                 _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Thickness);
                 GoNextStep();
 
+                RbtnChk鏍囨敞.Visible = true;
                 #endregion
             }
         }
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs
index 37c5176..6a75352 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_InitialRibbon.cs
@@ -84,6 +84,7 @@
 
         private System.Windows.Forms.RibbonCheckBox RbtnChk鎴潰18;
         private System.Windows.Forms.RibbonCheckBox RbtnChk鏍囨敞;
+        //private System.Windows.Forms.RibbonCheckBox RbtnChk鎴潰910;
 
         private System.Windows.Forms.RibbonButton Rbtn鏁版嵁瀵煎嚭XML;
         private System.Windows.Forms.RibbonButton Rbtn鏁版嵁瀵煎叆XML;
@@ -925,12 +926,32 @@
                 if (RbtnChk鎴潰18.Checked)
                 {
                     this._occDesign3dCtrl.SetAllSectionCurveVisible(true );
+                    this._occDesign3dCtrl.Invalidate(true);
                 }
                 else
                 {
                     this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
+                    this._occDesign3dCtrl.Invalidate(true);
                 }
             };
+            //RbtnChk鎴潰910 = new System.Windows.Forms.RibbonCheckBox();
+            //RbtnChk鎴潰910.Checked = false ;
+            ////RbtnChk鎴潰18.Image = GlobalResource.BuildImage("circle-check.png", 40, 40);
+            //RbtnChk鎴潰910.Name = "RbtnChk鎴潰910";
+            //RbtnChk鎴潰910.Text = "鎴潰9銆�10";
+            //RbtnChk鎴潰910.Visible = true;
+            //RbtnChk鎴潰910.CheckBoxCheckChanged += (sender, e) => {
+            //    if (RbtnChk鎴潰910.Checked)
+            //    {
+            //        this._occDesign3dCtrl.SetAllSection910CurveVisible(true );
+            //        this._occDesign3dCtrl.Invalidate(true);
+            //    }
+            //    else
+            //    {
+            //        this._occDesign3dCtrl.SetAllSection910CurveVisible(false);
+            //        this._occDesign3dCtrl.Invalidate(true);
+            //    }
+            //};
 
             RbtnChk鏍囨敞 = new System.Windows.Forms.RibbonCheckBox();
             RbtnChk鏍囨敞.Checked = false;
@@ -941,10 +962,12 @@
                 if (!RbtnChk鏍囨敞.Checked)
                 {
                     this._occDesign2dCtrl.SetDimVisible(true);
+                    this._occDesign2dCtrl.Invalidate(true);
                 }
                 else
                 {
                     this._occDesign2dCtrl.SetDimVisible(false);
+                    this._occDesign2dCtrl.Invalidate(true);
                 }
             };
 
@@ -1011,6 +1034,7 @@
             ribbonPanel鏁版嵁瀵煎叆.Items.Add(Rbtn鏁版嵁瀵煎叆XML);
 
             ribbonPanel缁勪欢鏄剧ず.Items.Add(RbtnChk鎴潰18);
+            //ribbonPanel缁勪欢鏄剧ず.Items.Add(RbtnChk鎴潰910);
             ribbonPanel缁勪欢鏄剧ず.Items.Add(RbtnChk鏍囨敞);
 
             RGroup涓嬫媺妗�.Items.Add(RBox鍥惧眰);
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
index 0a34d75..1d77492 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -65,7 +65,6 @@
         private bool ChangeStep(long current_step_id, long next_step_id)
         {
             RbtnChk鎴潰18.Visible = false;
-            RbtnChk鏍囨敞.Visible = false;
             if (current_step_id == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info)
             {
                 if (!SaveParaStep1())
@@ -101,6 +100,8 @@
                 if (next_step_id < current_step_id && next_step_id != 0)
                 {//鍒犻櫎鍔犲帤浣�
                     this._occDesign3dCtrl.RemoveThicknessBody( );
+
+                    this._occDesign3dCtrl.Invalidate(true);
                 }
             }
 
@@ -111,6 +112,8 @@
             this._stepTreeDockPanel.SetFocusedNode(next_step_id);
 
 
+            if (next_step_id != this._stepTreeDockPanel.Step_ID_Thickness)
+                RbtnChk鏍囨敞.Visible = false;
 
             Rbtn鏁版嵁瀵煎嚭STP.Visible = false;
             Rbtn鏁版嵁瀵煎嚭IGS.Visible = false;
@@ -146,6 +149,7 @@
             
             else if (next_step_id == this._stepTreeDockPanel.Step_ID_Thickness)
             {
+                RbtnChk鏍囨敞.Visible = true;
                 this.RBtn鍚庨��.Enabled = true;
                 this.Rbtn鍓嶈繘.Enabled = false;
 
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
index e158035..dbf6152 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
@@ -352,7 +352,7 @@
         }
 
         /// <summary>
-        /// 
+        /// 显示/隐藏1-8断面
         /// </summary>
         /// <param name="isVisible"></param>
         public void SetAllSectionCurveVisible(bool isVisible)
@@ -367,6 +367,21 @@
             }
         }
         /// <summary>
+         /// 显示/隐藏9、10断面
+         /// </summary>
+         /// <param name="isVisible"></param>
+        public void SetAllSection910CurveVisible(bool isVisible)
+        {
+            for (int i = 10; i >= 9; i--)
+            {
+                string wstrShapeNameI = string.Format("SectShape_{0}", i);
+                if (isVisible)
+                    pDisplayView.showVoluteCurve(wstrShapeNameI);
+                else
+                    pDisplayView.hideVoluteCurve(wstrShapeNameI);
+            }
+        }
+        /// <summary>
         /// 
         /// </summary>
         /// <param name="sectIndex"></param>

--
Gitblit v1.9.3