Sfoglia il codice sorgente

optimize the workflow when do the "ReadSEMDataAndSetToCurrentSample"

GSP 1 settimana fa
parent
commit
31e3c5499e

+ 3 - 1
Bin/x64/Debug/Config/ProData/HistoryPrj.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData>
-  <PathName>C:\Users\zym\Desktop\otsRst\Untitled13\Untitled13.prj</PathName>
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled14\Untitled14.prj</PathName>
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled15\Untitled15.prj</PathName>
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled16\Untitled16.prj</PathName>
@@ -8,4 +7,7 @@
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled18\Untitled18.prj</PathName>
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled19\Untitled19.prj</PathName>
   <PathName>C:\Users\zym\Desktop\otsRst\Untitled20\Untitled20.prj</PathName>
+  <PathName>C:\Users\zym\Desktop\otsRst\Untitled21\Untitled21.prj</PathName>
+  <PathName>C:\Users\zym\Desktop\otsRst\Untitled22\Untitled22.prj</PathName>
+  <PathName>C:\Users\zym\Desktop\otsRst\Untitled23\Untitled23.prj</PathName>
 </XMLData>

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

@@ -217,13 +217,13 @@ namespace OTSMeasureApp
                     //驱动SEM到中心位置
                     SetSEMToCenterPoint();
                     ReadSEMDataAndSetToCurrentSample();
-                    PrepareVisualMeasureField(GetWorkingVisualSample());
+                    //PrepareVisualMeasureField(GetWorkingVisualSample());
                     break;
                 case "DriveSEMToCurrentLocation":
                     //驱动SEM到当前位置
                     SetSEMCurrentLocation();
                     ReadSEMDataAndSetToCurrentSample();
-                    PrepareVisualMeasureField(GetWorkingVisualSample());
+                    //PrepareVisualMeasureField(GetWorkingVisualSample());
                     break;
                 case "SetSEMCenterLocation":
                     //将测量区域移到SEM当前位置
@@ -2868,14 +2868,56 @@ namespace OTSMeasureApp
                 double bri = semParameters[2];
                 double contra = semParameters[3];
                 double kv = semParameters[4];
-                if (mag != 0 && wd != 0)
+                double mag0 = 100;
+                double wd0 = 10;    
+                double bri0 = 10;
+                double contra0 = 10;
+                double kv0 = 10;
+                m_MeasureAppForm.m_ProjParam.GetWorkingSampleSEMData(ref wd0, ref mag0, ref bri0, ref contra0, ref kv0);
+                if ((mag > 500) && (mag != mag0))
                 {
-                    //设置样品文件中的电镜参数 
-                    m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag, bri, contra, kv);
+                    var rst = MessageBox.Show("Change Magnification to: " + mag.ToString("F2") + "\n" + "Previous Magnification: " + mag0.ToString("F2"), "SEM Data Info", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+                    if (rst == DialogResult.Yes)
+                    {
+                        if (mag != 0 && wd != 0)
+                        {
+                            //设置样品文件中的电镜参数 
+                            m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag, bri, contra, kv);
 
-                    //将右键SEM数据菜单设置为可编辑状态
-                    CMStrip.Items[(int)MenuIndex.SetSemData].Enabled = true;
+                            //将右键SEM数据菜单设置为可编辑状态
+                            CMStrip.Items[(int)MenuIndex.SetSemData].Enabled = true;
+
+                        }
+                    }
+                    else
+                    {
+                        if (wd != 0)
+                        {
+                            m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag0, bri, contra, kv);
+
+                            //将右键SEM数据菜单设置为可编辑状态
+                            CMStrip.Items[(int)MenuIndex.SetSemData].Enabled = true;
+
+                        }
 
+                    }
+                }
+                else 
+                {
+                    if (mag != 0 && wd != 0)
+                    {
+                        //设置样品文件中的电镜参数 
+                        m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag, bri, contra, kv);
+
+                        //将右键SEM数据菜单设置为可编辑状态
+                        CMStrip.Items[(int)MenuIndex.SetSemData].Enabled = true;
+
+                    }
+
+                }
+
+
+               
                 }
 
 
@@ -2884,7 +2926,7 @@ namespace OTSMeasureApp
             #endregion
 
 
-        }
+        
         #region 获取Filed帧图
         public List<CVisualFieldGDIObject> GetOTSFieldVisualRects(CVisualSampleArea sam)
         {

+ 7 - 3
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -316,6 +316,11 @@ namespace OTSMeasureApp
 
             control_Ruler.Visible = true;
             panelXray.Visible = false;
+            //read working distance and set to current sample
+            ISemController sem = SemController.GetSEMController();
+            double wd = 10;
+            sem.GetWorkingDistance(ref wd);
+            m_MeasureAppForm.m_ProjParam.GetResultData().GetWorkingSample().GetSEMDataMsr().SetWorkingDistance(wd);
 
 
         }
@@ -367,8 +372,7 @@ namespace OTSMeasureApp
                 myFld.Sample = m_MeasureAppForm.m_ProjParam.GetResultData().GetWorkingSample();
 
             }
-
-
+         
             return rst;
 
 
@@ -394,7 +398,7 @@ namespace OTSMeasureApp
             IScanController cfun = ScanController.GetScanController();
             ISemController sem = SemController.GetSEMController();
 
-
+           
             try
             {
                 //连接电镜