浏览代码

Merge branch 'dev' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into dev

gsp 3 年之前
父节点
当前提交
63db0ffb85

+ 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;

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

@@ -3207,6 +3207,15 @@ namespace OTSMeasureApp
                     break;
                 case "DeleteBSEPicture":
                     DeleteHoleBSEImageData();
+                    break;
+                case "SlopFocusMenuItem":
+                    _5_OTSMeasureStatuImageFun.SlopFocus slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus();
+                    slopFocus.Show();
+                    if (slopFocus.result)
+                    {
+                        m_MeasureAppForm.m_ProjParam.GetWorkSample().GetMsrParams().SlopParam = slopFocus.GetCSlopFocusParam();
+                    }
+                    
                     break;
             }
         }

+ 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();
-            }
-        }
     }
 }
 

+ 8 - 8
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.Designer.cs

@@ -206,7 +206,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox1.Controls.Add(this.tB_FirstPointX);
             this.groupBox1.Controls.Add(this.label3);
             this.groupBox1.Controls.Add(this.tB_FirstPointY);
-            this.groupBox1.Location = new System.Drawing.Point(15, 76);
+            this.groupBox1.Location = new System.Drawing.Point(15, 59);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Size = new System.Drawing.Size(749, 89);
             this.groupBox1.TabIndex = 19;
@@ -238,7 +238,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox2.Controls.Add(this.tB_SecondPointX);
             this.groupBox2.Controls.Add(this.label4);
             this.groupBox2.Controls.Add(this.bn_SecondPoint);
-            this.groupBox2.Location = new System.Drawing.Point(15, 219);
+            this.groupBox2.Location = new System.Drawing.Point(15, 181);
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.Size = new System.Drawing.Size(749, 95);
             this.groupBox2.TabIndex = 7;
@@ -270,7 +270,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox3.Controls.Add(this.tB_ThirdPointX);
             this.groupBox3.Controls.Add(this.tB_ThirdPointY);
             this.groupBox3.Controls.Add(this.label7);
-            this.groupBox3.Location = new System.Drawing.Point(15, 365);
+            this.groupBox3.Location = new System.Drawing.Point(15, 311);
             this.groupBox3.Name = "groupBox3";
             this.groupBox3.Size = new System.Drawing.Size(749, 93);
             this.groupBox3.TabIndex = 13;
@@ -295,7 +295,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // bn_OK
             // 
-            this.bn_OK.Location = new System.Drawing.Point(667, 486);
+            this.bn_OK.Location = new System.Drawing.Point(667, 428);
             this.bn_OK.Name = "bn_OK";
             this.bn_OK.Size = new System.Drawing.Size(97, 32);
             this.bn_OK.TabIndex = 20;
@@ -305,7 +305,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // bn_Cancel
             // 
-            this.bn_Cancel.Location = new System.Drawing.Point(537, 486);
+            this.bn_Cancel.Location = new System.Drawing.Point(537, 428);
             this.bn_Cancel.Name = "bn_Cancel";
             this.bn_Cancel.Size = new System.Drawing.Size(91, 32);
             this.bn_Cancel.TabIndex = 21;
@@ -317,7 +317,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(773, 525);
+            this.ClientSize = new System.Drawing.Size(773, 482);
             this.ControlBox = false;
             this.Controls.Add(this.bn_Cancel);
             this.Controls.Add(this.bn_OK);
@@ -326,9 +326,9 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.cB_enable);
             this.MaximizeBox = false;
-            this.MaximumSize = new System.Drawing.Size(791, 572);
+            this.MaximumSize = new System.Drawing.Size(791, 529);
             this.MinimizeBox = false;
-            this.MinimumSize = new System.Drawing.Size(791, 572);
+            this.MinimumSize = new System.Drawing.Size(791, 529);
             this.Name = "SlopFocus";
             this.ShowInTaskbar = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

+ 11 - 6
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.cs

@@ -16,9 +16,10 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
     public partial class SlopFocus : Form
     {
         COTSControlFunExport cfun;
-        CSlopFocusParam slopFocusParam = new CSlopFocusParam();
-
-        public SlopFocus()
+        CSlopFocusParam slopFocusParam;
+        bool m_result=false;
+        public bool result {get => m_result; set => m_result = value; }
+    public SlopFocus()
         {
             InitializeComponent();
         }
@@ -42,6 +43,10 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
                 MessageBox.Show("Please select different points!");
                 return;
             }
+            if(slopFocusParam==null)
+            {
+                slopFocusParam = new CSlopFocusParam();
+            }
             slopFocusParam.IsUsingSlopParam = cB_enable.Checked;
             slopFocusParam.FirstPoint = new Point(iPX1, iPY1);
             slopFocusParam.FirstWD = dPW1;
@@ -49,7 +54,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             slopFocusParam.SecondWD = dPW2;
             slopFocusParam.ThirdPoint = new Point(iPX3, iPY3);
             slopFocusParam.ThirdWD = dPW3;
-            this.DialogResult = DialogResult.OK;
+            m_result=true;
         }
 
         private void SlopFocus_Load(object sender, EventArgs e)
@@ -67,8 +72,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))
@@ -132,6 +136,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
 
         private void bn_Cancel_Click(object sender, EventArgs e)
         {
+            m_result = false;
             this.Close();
         }
     }