瀏覽代碼

修改报告概况bug

CXS 3 年之前
父節點
當前提交
22a3719934
共有 1 個文件被更改,包括 7 次插入4 次删除
  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;