Browse Source

修改报告显示放大倍数显示错误的bug

zhangjiaxin 1 year ago
parent
commit
7d392286b5

+ 8 - 0
OTSCommon/ReportModel/ResultFile.cs

@@ -51,6 +51,14 @@ public    enum OTS_Y_AXIS_DIRECTION
             float ScanFieldSizeX100 = float.Parse(SEMDataMsr["ScanFieldSize100"].ToString());
             return ScanFieldSizeX100;
         }
+        public float GetMeasurementMagnification()
+        {
+            Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)ResultInfo["Sample"])["Members"]);
+            Dictionary<string, object> SEMDataMsr = (Dictionary<string, object>)sampleMembers["SEMDataMsr"];
+            //Dictionary<string, object> SEMStageData = (Dictionary<string, object>)ResultInfo["SEMStageData"];
+            float ScanMagnification = float.Parse(SEMDataMsr["Magnification"].ToString());
+            return ScanMagnification;
+        }
         public float GetScanFieldSizeY()
         {
             Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)ResultInfo["Sample"])["Members"]);

+ 14 - 8
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -140,9 +140,13 @@ namespace OTSIncAReportGrids
             int particleArea = fielddata.GetparticleArea();
 
             double ratio = Math.Round(particleArea / filedsArea*1000,3);
-            float ScanFieldSize100 = resfile.GetScanFieldSizeX100();
-            float ScanFieldSize = resfile.GetScanFieldSizeX();
-            double Magnification = ScanFieldSize100 * 100 / ScanFieldSize;
+            //float ScanFieldSize100 = resfile.GetScanFieldSizeX100();
+            //float ScanFieldSize = resfile.GetScanFieldSizeX();
+
+
+            //double Magnification = ScanFieldSize100 * 100 / ScanFieldSize;
+
+            double Magnification= resfile.GetMeasurementMagnification();
             //报告参数文件
             string xmlpath = Application.StartupPath + RptConfigFile.m_ReportMgrParamFile;
             DataSet ds = XMLoperate.GetXmlData(xmlpath, "XMLData");
@@ -217,11 +221,13 @@ namespace OTSIncAReportGrids
             }
             TimeSpan timeSpan = end - star;
             int all_FiledCount = resfile.GetTotalFields();
-            //当前屏幕尺寸/µm
-            double ScanFieldSize = resfile.GetScanFieldSizeX();
-            //100倍时屏幕尺寸/µm
-            double ScanFieldSize100 = resfile.GetScanFieldSizeX100();
-            double  Magnification = ScanFieldSize100 / ScanFieldSize * 100;
+            ////当前屏幕尺寸/µm
+            //double ScanFieldSize = resfile.GetScanFieldSizeX();
+            ////100倍时屏幕尺寸/µm
+            //double ScanFieldSize100 = resfile.GetScanFieldSizeX100();
+            //double  Magnification = ScanFieldSize100 / ScanFieldSize * 100;
+
+            double Magnification = resfile.GetMeasurementMagnification();
             int filedCount = fielddata.GetFiledCount();
             //Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"]);
             //Dictionary<string, object> semDataMsr = (Dictionary<string, object>)sampleMembers["SEMDataMsr"];