Selaa lähdekoodia

Adjust the code framework

cxs 4 viikkoa sitten
vanhempi
commit
e57aef8bae

+ 8 - 7
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ListOfSimilarParticles.cs

@@ -374,13 +374,14 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                             Bitmap bmap = null;
                             if (subt != null && subt != "" && subt != "IsSubParticle")
                             {
-                                double ScanFieldSize = _particlesGridDevidePage.result.GetScanFieldSizeX();
-                                string filePatht = _particlesGridDevidePage.result.FilePath + "\\FIELD_FILES\\";
-                                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                                Bitmap tempbit = _particlesGridDevidePage.fldImgAccess.ReadImageFile(imagePatht);
-                                int pixw = tempbit.Width;
-                                double xs = pixw / ScanFieldSize;
-                                bmap = _particlesGridDevidePage.fldImgAccess.GetBitmapForMergedParticle(subt, xs, _particlesGridDevidePage.result.FilePath, tempbit.Height, tempbit.Width);
+                                double xs = _particlesGridDevidePage.result.GetPixelSize();
+                                int width = _particlesGridDevidePage.result.GetImageWidth();
+                                int height = _particlesGridDevidePage.result.GetImageHeight();
+
+
+                                string vs = "," + subt.Replace(':', '-') + ",";
+                                DataTable dataTable = _particlesGridDevidePage.Particledata.GetParticleAllForBig(vs);//组成拼接颗粒的子颗粒
+                                bmap = _particlesGridDevidePage.fldImgAccess.GetBitmapForMergedParticle(subt, xs, _particlesGridDevidePage.result.FilePath, height, width, dataTable);
                                 if (bmap != null)
                                 {
                                     string[] str = subt.Split(',');

+ 3 - 6
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -484,6 +484,8 @@ namespace OTSIncAReportGrids
             {
                 if (ElementTypeSort[0] == "")
                 {
+                    
+                    
                     ElementTypeSort.RemoveAt(0);
                     break;
                 }
@@ -519,11 +521,6 @@ namespace OTSIncAReportGrids
                             Bitmap bmap = null;
                             if (subt != null && subt != "" && subt != "IsSubParticle")
                             {
-                                //double ScanFieldSize = result.GetScanFieldSizeX();
-                                //string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                                //string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                                //Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
-                                //int pixw = tempbit.Width;
                                 double xs = result.GetPixelSize();
                                 int width = result.GetImageWidth(); 
                                 int height = result.GetImageHeight();
@@ -531,7 +528,7 @@ namespace OTSIncAReportGrids
                                
                                 string vs = "," + subt.Replace(':', '-') + ",";
                                 DataTable dataTable = Particledata.GetParticleAllForBig(vs);//组成拼接颗粒的子颗粒
-                                bmap = fldImgAccess.GetBitmapForMergedParticle(subt, xs, result.FilePath, height, width);
+                                bmap = fldImgAccess.GetBitmapForMergedParticle(subt, xs, result.FilePath, height, width, dataTable);
                                 if (bmap != null)
                                 {
                                     string[] str = subt.Split(',');

+ 1 - 0
OTSIncAReportApp/3-ServiceCenter/DataOperation/ImageAccess/FieldImage.cs

@@ -5,6 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
+using System.Drawing.Imaging;
 using System.IO;
 
 namespace OTSIncAReportApp._3_ServiceCenter.DataOperation.DataAccess