Browse Source

修改 SlopFocus 位置

CXS 3 years ago
parent
commit
0db06071d9

+ 6 - 0
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/CStageManage.cs

@@ -722,6 +722,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.SEMStripSeparator].Enabled = false;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = false;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = false;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = false;
                     break;
                 case (int)ContextMenuType.SampleMenu:
                     cmStrip.Items[(int)MenuIndex.AddSample].Enabled = true;
@@ -734,6 +735,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.SEMStripSeparator].Enabled = false;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = false;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = true;
                     break;
                 case (int)ContextMenuType.MeasureMenu:
                     cmStrip.Items[(int)MenuIndex.AddSample].Enabled = true;
@@ -745,6 +747,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.DriveSEMToCurrentLocation].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = IsTrue;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = true;
                     //cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Text = str2;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Tag = MessageState.MeasureBSEPicture;
                     break;
@@ -758,6 +761,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.DriveSEMToCurrentLocation].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = false;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = true;
                     //cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Text = str2;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Tag = MessageState.MeasureBSEPicture;
                     break;
@@ -777,6 +781,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.DriveSEMToCurrentLocation].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = false;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = false;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = false;
                     break;
                 case (int)ContextMenuType.SampleHoleBSEImage:
                     cmStrip.Items[(int)MenuIndex.AddSample].Enabled = true;
@@ -788,6 +793,7 @@ namespace OTSMeasureApp
                     cmStrip.Items[(int)MenuIndex.DriveSEMToCurrentLocation].Enabled = true;
                     cmStrip.Items[(int)MenuIndex.ShootBSEPicture].Enabled = IsTrue;
                     cmStrip.Items[(int)MenuIndex.DeleteBSEPicture].Enabled = true;
+                    cmStrip.Items[(int)MenuIndex.SlopFocus].Enabled = IsTrue;
                     break;
             }
         }

+ 2 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/CreateRectangle.cs

@@ -1039,7 +1039,8 @@ namespace OTSMeasureApp
         DriveSEMToCurrentLocation = 7,
         SEMStripSeparator = 8,
         ShootBSEPicture = 9,
-        DeleteBSEPicture = 10
+        DeleteBSEPicture = 10,
+        SlopFocus=11
     }
     public enum ColorType
     {

+ 12 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.Designer.cs

@@ -44,6 +44,7 @@ namespace OTSMeasureApp
             this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.ShootBSEPicture = new System.Windows.Forms.ToolStripMenuItem();
             this.DeleteBSEPicture = new System.Windows.Forms.ToolStripMenuItem();
+            this.SlopFocusMenuItem=new System.Windows.Forms.ToolStripMenuItem();
             this.dgvFocus = new System.Windows.Forms.DataGridView();
             this.lblFocus = new System.Windows.Forms.Label();
             this.CMStrip.SuspendLayout();
@@ -64,7 +65,8 @@ namespace OTSMeasureApp
             this.DriveSEMToCurrentLocation,
             this.toolStripSeparator2,
             this.ShootBSEPicture,
-            this.DeleteBSEPicture});
+            this.DeleteBSEPicture,
+            this.SlopFocusMenuItem});
             this.CMStrip.Name = "CMStrip";
             this.CMStrip.Size = new System.Drawing.Size(195, 286);
             this.CMStrip.Text = "添加样品";
@@ -150,6 +152,14 @@ namespace OTSMeasureApp
             this.DeleteBSEPicture.Size = new System.Drawing.Size(194, 30);
             this.DeleteBSEPicture.Text = "删除BSE照片";
             // 
+            // SlopFocusMenuItem
+            // 
+            this.SlopFocusMenuItem.Enabled = false;
+            this.SlopFocusMenuItem.Image = global::OTSMeasureApp.Properties.Resources.DeleteSampleImage;
+            this.SlopFocusMenuItem.Name = "SlopFocusMenuItem";
+            this.SlopFocusMenuItem.Size = new System.Drawing.Size(194, 30);
+            this.SlopFocusMenuItem.Text = "斜面焦距";
+            // 
             // dgvFocus
             // 
             this.dgvFocus.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
@@ -214,6 +224,7 @@ namespace OTSMeasureApp
         private System.Windows.Forms.ToolStripMenuItem DriveSEMToCenterLocation;
         private System.Windows.Forms.ToolStripMenuItem DriveSEMToCurrentLocation;
         private System.Windows.Forms.ToolStripMenuItem DeleteBSEPicture;
+        private System.Windows.Forms.ToolStripMenuItem SlopFocusMenuItem;
         private Control_Ruler control_Ruler2;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
         private System.Windows.Forms.ToolStripMenuItem ShootBSEPicture;

+ 8 - 0
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -3208,6 +3208,14 @@ namespace OTSMeasureApp
                 case "DeleteBSEPicture":
                     DeleteHoleBSEImageData();
                     break;
+                case "SlopFocusMenuItem":
+                    _5_OTSMeasureStatuImageFun.SlopFocus slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus();
+                    DialogResult result = slopFocus.ShowDialog();
+                    if (result == DialogResult.OK)
+                    {
+                        m_MeasureAppForm.m_ProjParam.GetWorkSample().GetMsrParams().SlopParam = slopFocus.GetCSlopFocusParam();
+                    }
+                    break;
             }
         }
         protected override bool ProcessDialogKey(Keys keyData)

+ 2 - 12
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.Designer.cs

@@ -47,7 +47,6 @@
             this.MenuItemLineScam = new System.Windows.Forms.ToolStripMenuItem();
             this.PointScanElementMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.ExportScanInfoMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.SlopFocusMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.myChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.panelXray = new System.Windows.Forms.Panel();
             ((System.ComponentModel.ISupportInitialize)(this.pbBSEImage)).BeginInit();
@@ -85,10 +84,9 @@
             this.toolStripSeparator2,
             this.MenuItemLineScam,
             this.PointScanElementMenuItem,
-            this.ExportScanInfoMenuItem,
-            this.SlopFocusMenuItem});
+            this.ExportScanInfoMenuItem});
             this.contextMenuStrip1.Name = "contextMenuStrip1";
-            this.contextMenuStrip1.Size = new System.Drawing.Size(285, 308);
+            this.contextMenuStrip1.Size = new System.Drawing.Size(285, 256);
             this.contextMenuStrip1.Opened += new System.EventHandler(this.contextMenuStrip1_Opened);
             // 
             // SampleParaLock
@@ -173,13 +171,6 @@
             this.ExportScanInfoMenuItem.Text = "输出X-Ray信息";
             this.ExportScanInfoMenuItem.Click += new System.EventHandler(this.ExportScanInfoMenuItem_Click);
             // 
-            // SlopFocusMenuItem
-            // 
-            this.SlopFocusMenuItem.Name = "SlopFocusMenuItem";
-            this.SlopFocusMenuItem.Size = new System.Drawing.Size(284, 24);
-            this.SlopFocusMenuItem.Text = "斜面焦距";
-            this.SlopFocusMenuItem.Click += new System.EventHandler(this.SlopFocusMenuItem_Click);
-            // 
             // myChart
             // 
             chartArea1.AlignmentStyle = System.Windows.Forms.DataVisualization.Charting.AreaAlignmentStyles.None;
@@ -264,6 +255,5 @@
         private System.Windows.Forms.ToolStripMenuItem ExportScanInfoMenuItem;
         private System.Windows.Forms.ToolStripMenuItem ViewStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
-        private System.Windows.Forms.ToolStripMenuItem SlopFocusMenuItem;
     }
 }

+ 0 - 11
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -684,7 +684,6 @@ namespace OTSMeasureApp
             IsShowGrayLevelLine = false;
             ViewStripMenuItem.Enabled = isEnabled;
             toolStripMenuItem1.Enabled = true;
-            SlopFocusMenuItem.Enabled = isEnabled;
             this.Cursor = Cursors.Default;
             this.Validate();
         }
@@ -1959,16 +1958,6 @@ namespace OTSMeasureApp
                 return;
             }
         }
-
-        private void SlopFocusMenuItem_Click(object sender, EventArgs e)
-        {
-            _5_OTSMeasureStatuImageFun.SlopFocus slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus();
-            DialogResult result = slopFocus.ShowDialog();
-            if (result == DialogResult.OK)
-            {
-                m_MeasureAppForm.m_ProjParam.GetWorkSample().GetMsrParams().SlopParam = slopFocus.GetCSlopFocusParam();
-            }
-        }
     }
 }
 

+ 1 - 2
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.cs

@@ -67,8 +67,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             //c = 20;
             //cfun.SetSemPositionXY(a, b, c);
             //cfun.SetSemWorkingDistance(c);
-
-            double Px = 0;
+                        double Px = 0;
             double Py = 0;
             double Pr = 0;
             if(cfun.GetSemPositionXY(ref Px,ref Py,ref Pr))