Browse Source

处理清洁度启动时大小颗粒分类,存取数据库、界面X-ray显示等 bug

shiyanshi 4 năm trước cách đây
mục cha
commit
e8889527d5

+ 11 - 11
OTSIncAMeasureApp/0-OTSModel/Measure/2-OTSCleanliness/SmplMeasureCleanliness.cs

@@ -30,19 +30,19 @@ namespace OTSModelSharp
             int nNewFieldId;
             nNewFieldId = m_pSampleRstFile.GetIdForANewField();
             //first step:remove background of the bse image and compound all the finded particles.
-            CFieldDataClean curFldDataMgr = new CFieldDataClean( a_BSEImg,m_Sample.CalculatePixelSize());
-            curFldDataMgr.SetId(nNewFieldId);
-            curFldDataMgr.SetPosition(fldCenter);
+            curFldData = new CFieldDataClean( a_BSEImg,m_Sample.CalculatePixelSize());
+            curFldData.SetId(nNewFieldId);
+            curFldData.SetPosition(fldCenter);
             GetOriginalParticles();
  
             // second step :filter the finded particles.
-            FilterParticles(curFldDataMgr);
+            FilterParticles((CFieldDataClean)curFldData);
             COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
             //collect xray data.
             if (pXRayParam.GetUsingXray() == (int)OTS_USING_X_RAY.Yes)
             {
                 Thread.Sleep(100);
-                CollectParticlesXrayData(curFldDataMgr);
+                CollectParticlesXrayData((CFieldDataClean)curFldData);
                 Thread.Sleep(100);
             }
       
@@ -50,17 +50,17 @@ namespace OTSModelSharp
             //special treatment.
             //ParticleSpecialTreatment();
             loger.Info("Begin to Calculate the image property of every particle!");
-            var analysisparts = curFldDataMgr.ListBigParticles;
-            curFldDataMgr.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
+            var analysisparts = curFldData.ListAnalysisParticles;
+            curFldData.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
 
-            ClassifyParticles(curFldDataMgr);
+            ClassifyParticles(curFldData.ListAnalysisParticles);
 
   
 
             // save field files
             m_Sample.GetMsrStatus() .SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
 
-            StartSaveFileThread(curFldDataMgr);
+            StartSaveFileThread(curFldData);
 
             return true;
 
@@ -386,7 +386,7 @@ namespace OTSModelSharp
 
 
 
-            pDBFileMgr.BeginTransaction();
+            //pDBFileMgr.BeginTransaction();
             pDBFileMgr.SaveStatusDataToDB();
 
             if (!pDBFileMgr.SaveIncADataToDB(f.ListAnalysisParticles, f.GetPosition()))
@@ -453,7 +453,7 @@ namespace OTSModelSharp
                 smallPartDB.SaveAKindOfSmallParticle(smallp, new CPosXrayClr(), new System.Drawing.Point(0, 0));
             }
 
-            pDBFileMgr.CommitTransaction();
+            //pDBFileMgr.CommitTransaction();
 
             return true;
         }

+ 4 - 0
OTSIncAMeasureApp/0-OTSModel/Measure/GetParticleData/IncAFileMgr.cs

@@ -244,6 +244,10 @@ namespace OTSModelSharp
         }
        public bool SaveIncADataToDB(List<COTSParticleClr> m_listParticle , System.Drawing.Point m_FieldPos)
         {
+            if (m_listParticle.Count == 0)
+            {
+                return true;
+            }
             BeginTransaction();
 
             foreach (var pParticle in m_listParticle)

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -1570,7 +1570,7 @@ namespace OTSDataType
                             //using xray
                             poPropItem = new CPropItem();
                             nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.USING_XRAY;
-                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.BOOL, false, bShow);
                             a_listPropItems.Add(poPropItem);
 
                             // scan mode 

+ 1 - 0
OTSIncAReportApp/frmMeasureRstMgr.cs

@@ -349,6 +349,7 @@ namespace OTSIncAReportApp
                 m_ReportApp.DisCurrentPicProperty();
                 //根据标签索引 显示默认的数据图表for test
                 m_ReportApp.m_DataMgrFun.ShowsTheDefaultPic();//显示图表
+
             }
             else
             {

+ 1 - 0
OTSIncAReportApp/frmReportApp.cs

@@ -293,6 +293,7 @@ namespace OTSIncAReportApp
                 }
             }
 
+
         }
 
         #endregion