Browse Source

修改报告概况bug

CXS 3 years ago
parent
commit
22a3719934
1 changed files with 7 additions and 4 deletions
  1. 7 4
      OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

+ 7 - 4
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -124,10 +124,13 @@ namespace OTSIncAReportGrids
             TimeSpan timeSpan = end - star;
 
             int filedCount = fielddata.GetFiledCount();
-
-            double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
-            double ImagePixelSize= Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["Members"])["ImageScanParam"])["ImagePixelSize"]);
-            double filedsArea = Math.Round(ScanFieldSize * ScanFieldSize / ImagePixelSize * filedCount,2);
+            Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"]);
+            Dictionary<string, object> semDataMsr = (Dictionary<string, object>)sampleMembers["SEMDataMsr"];
+            double scanFieldSize = Convert.ToDouble(semDataMsr["ScanFieldSize"]);
+            Dictionary<string, object> imageScanParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageScanParam"];
+            string ImageResolution = imageScanParam["ImageResolution"].ToString();
+            double wide = Convert.ToDouble(ImageResolution.Split('_')[2]);
+            double filedsArea = Math.Round(scanFieldSize * wide * filedCount, 2);
             int particleArea = fielddata.GetparticleArea();
 
             double ratio = particleArea / filedsArea;