소스 검색

修复bug

zty 2 년 전
부모
커밋
3a9c8dfc9d

+ 7 - 4
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -628,11 +628,14 @@ namespace OTSModelSharp
                 var FldDatas = m_Sample.GetFieldsData();
 
                 List<string> KeyNameList = new List<string>();
-                if (m_EDSHardwareMgr.eds.GetEDSName() == "EDS Bruker" && m_Sample.GetMsrParams().GetXRayParam().GetUseFilter())
+                if (m_EDSHardwareMgr.eds != null)
                 {
-                    string DBAddress = Application.StartupPath + "\\Config\\SysData\\" + m_Sample.GetMsrParams().GetSTDName() + ".db";
-                    SQLiteHelper sQLiteHelper = new SQLiteHelper(DBAddress);//
-                    KeyNameList = sQLiteHelper.GetDBKeyElementList("ClassifySTD", "KeyElementList");
+                    if (m_EDSHardwareMgr.eds.GetEDSName() == "EDS Bruker" && m_Sample.GetMsrParams().GetXRayParam().GetUseFilter())
+                    {
+                        string DBAddress = Application.StartupPath + "\\Config\\SysData\\" + m_Sample.GetMsrParams().GetSTDName() + ".db";
+                        SQLiteHelper sQLiteHelper = new SQLiteHelper(DBAddress);//
+                        KeyNameList = sQLiteHelper.GetDBKeyElementList("ClassifySTD", "KeyElementList");
+                    }
                 }
 
                 for (int i = 0; i < FldDatas.Count; ++i)

+ 1 - 6
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -1352,17 +1352,12 @@ namespace OTSIncAReportGraph.Controls
                             CMenuStrip.Items[(int)RightButtonMenu.ImportSTDDb].Visible = true;
                      CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = true;
 
-                        CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = true;<<<<<<< .mine
-
-
-
+                        CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = true;
 
-=======
                             CMenuStrip.Items[(int)RightButtonMenu.ImportSTDDb].Visible = true;
                      
 
                         CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = true;
->>>>>>> .theirs
                         m_ParticleSegmentation.ParticleData = dp.objParticleData;
                     }
                     if (((DisplayParticle)item).IsSelect)

+ 19 - 105
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -821,106 +821,9 @@ namespace OTSIncAReportGrids
                         {
                             if (particles.Columns.Contains("SubParticles"))
                             {
-<<<<<<< .mine
-                                double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
-                                string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                                //然后将取出的数据,转换成Bitmap对象
-                                Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
-                                int pixw = tempbit.Width;
-                                double xs = pixw / ScanFieldSize;
-                                //取得方向
-                                Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resultFile.ResultInfo["Sample"])["Members"]);
-                                Dictionary<string, object> ImageProcessParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageProcessParam"];
-                                Dictionary<string, object> SEMStageData = (Dictionary<string, object>)result.ResultInfo["SEMStageData"];
-                                string leftOrRight = SEMStageData["xAxisDir"].ToString().Split(':')[1];
-                                string downOrUp = SEMStageData["yAxisDir"].ToString().Split(':')[1];
-                                string isCombin = ImageProcessParam["PartCombin"].ToString();
-                                string overlap = ImageProcessParam["OverlapParam"].ToString();
-
-=======
                                 string subt = particles.Rows[i]["SubParticles"].ToString();
                                 if (subt != null && subt != "")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> .theirs
-double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
-                                string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                                //然后将取出的数据,转换成Bitmap对象
-                                Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
-                                int pixw = tempbit.Width;
-                                double xs = pixw / ScanFieldSize;
-                                //取得方向
-                                Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resultFile.ResultInfo["Sample"])["Members"]);
-                                Dictionary<string, object> ImageProcessParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageProcessParam"];
-                                Dictionary<string, object> SEMStageData = (Dictionary<string, object>)result.ResultInfo["SEMStageData"];
-                                string leftOrRight = SEMStageData["xAxisDir"].ToString().Split(':')[1];
-                                string downOrUp = SEMStageData["yAxisDir"].ToString().Split(':')[1];
-                                string isCombin = ImageProcessParam["PartCombin"].ToString();
-                                string overlap = ImageProcessParam["OverlapParam"].ToString();
-
-                                particleM = particleM + "," + subt;
-                                Bitmap bmap = null;
-                                if (isCombin == "true")
-                                {
-                                    bmap = Particledata.GetBitmapForBigCombin(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, leftOrRight, downOrUp, overlap);
-                                }
-                                else
-                                {
-                                    bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width);
-                                }
-
-                                if (bmap != null)<<<<<<< .mine
-                                Bitmap bmap = null;
-                                if (isCombin == "true")
-                                {
-                                    bmap = Particledata.GetBitmapForBigCombin(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, leftOrRight, downOrUp, overlap);
-                                }
-                                else
-                                {
-                                    bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width);
-                                }
-
-                                if (bmap != null)
-=======
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> .theirs
-                                {
-<<<<<<< .mine
-                                    string[] str = subt.Split(',');
-                                    bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
-                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20; ;
-                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
-                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
-                                    dgV_ParticlesDevidePage.Rows[add_rowindex].DefaultCellStyle.ForeColor = Color.Chocolate;
-                                }
-                                else
                                 {
-                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
-=======
                                     double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
                                     string filePatht = result.FilePath + "\\FIELD_FILES\\";
                                     string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
@@ -928,18 +831,30 @@ double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionar
                                     Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
                                     int pixw = tempbit.Width;
                                     double xs = pixw / ScanFieldSize;
-
-
-
->>>>>>> .theirs
-
+                                    //取得方向
+                                    Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resultFile.ResultInfo["Sample"])["Members"]);
+                                    Dictionary<string, object> ImageProcessParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageProcessParam"];
+                                    Dictionary<string, object> SEMStageData = (Dictionary<string, object>)result.ResultInfo["SEMStageData"];
+                                    string leftOrRight = SEMStageData["xAxisDir"].ToString().Split(':')[1];
+                                    string downOrUp = SEMStageData["yAxisDir"].ToString().Split(':')[1];
+                                    string isCombin = ImageProcessParam["PartCombin"].ToString();
+                                    string overlap = ImageProcessParam["OverlapParam"].ToString();
                                     particleM = particleM + "," + subt;
-                                    Bitmap bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width);
+                                    Bitmap bmap = null;
+                                    if (isCombin == "true")
+                                    {
+                                        bmap = Particledata.GetBitmapForBigCombin(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, leftOrRight, downOrUp, overlap);
+                                    }
+                                    else
+                                    {
+                                        bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width);
+                                    }
+
                                     if (bmap != null)
                                     {
                                         string[] str = subt.Split(',');
                                         bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
-                                        dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
+                                        dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20; ;
                                         dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
                                         dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
                                         dgV_ParticlesDevidePage.Rows[add_rowindex].DefaultCellStyle.ForeColor = Color.Chocolate;
@@ -947,7 +862,6 @@ double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionar
                                     else
                                     {
                                         dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
-
                                         dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
                                     }
                                 }