Browse Source

remove useless code in CSmplMsrResult.cs

gsp 8 months ago
parent
commit
7534049cda

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSStage.stg

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="4">
+<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="3">
   <Collection RegName="Stagelist">
     <Member strName="圆形九圆孔50mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0:ROUND" />

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

@@ -30,7 +30,7 @@ namespace OTSDataType
         private CSEMDataMsr m_poSEMDataMsr;
         private CMsrSampleStatus m_Status;
         private CMsrResultItems m_poMsrResults;
-        private MEMBRANE_TYPE m_membraneType;
+        //private MEMBRANE_TYPE m_membraneType;
         private List<COTSField> m_listFieldData;
         public CFieldPositionHelper pFieldMgr=new CFieldPositionHelper();
         public COTSSample()
@@ -50,7 +50,7 @@ namespace OTSDataType
             m_poSEMDataMsr = new CSEMDataMsr();
             m_Status = new CMsrSampleStatus();
             m_poMsrResults = new CMsrResultItems();
-            m_membraneType = MEMBRANE_TYPE.Abrasive;
+            //m_membraneType = MEMBRANE_TYPE.Abrasive;
             m_listFieldData = new List<COTSField>();
            
         }

+ 12 - 10
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -614,27 +614,27 @@ namespace OTSModelSharp
 
 
 
-                var pSEMDataUsing = new CSEMDataGnr();
-                log.Info("Get Kv, Brightness and Contrast!");
-                GetSEMDataGnrFromHw(ref pSEMDataUsing);
+                //var pSEMDataUsing = new CSEMDataGnr();
+                //log.Info("Get Kv, Brightness and Contrast!");
+                //GetSEMDataGnrFromHw(ref pSEMDataUsing);
 
 
-                m_pSampleRstFile.SetSEMGnr(pSEMDataUsing);
+                //m_pSampleRstFile.SetSEMGnr(pSEMDataUsing);
 
                 // record SEM data
                 COTSMsrPrjResultData pProjMgrFile = m_pMsrThread.GetProjResultData();
 
 
-                CSEMStageData pSEMStageData = pProjMgrFile.GetSEMStageData();
+                //CSEMStageData pSEMStageData = pProjMgrFile.GetSEMStageData();
 
 
-                m_pSampleRstFile.SetSEMStageData(pSEMStageData);
+                //m_pSampleRstFile.SetSEMStageData(pSEMStageData);
 
                 // record stage
-                CStage pStage = pProjMgrFile.GetStage();
+                //CStage pStage = pProjMgrFile.GetStage();
 
 
-                m_pSampleRstFile.SetSEMStage(pStage);
+                //m_pSampleRstFile.SetSEMStage(pStage);
 
 
                 //-----save the static measure result file data into xml file and the dynamic data of every field will be saved into sqlite database
@@ -1114,10 +1114,12 @@ namespace OTSModelSharp
                 // set current time to current time
                 pStatus.ComputeTime(OTS_MSR_TIME_TYPE.START);
 
+                var pSEMCtrl = m_pMsrThread.GetSEMController();
+                var pSEMDataMsr = m_HolePreviewSample.GetSEMDataMsr();
 
-
+                double dMinMag = pSEMDataMsr.GetMagnification();
                 // get SEM controller to set magnification and working distance
-                if (!SetSEMDataMrs(m_HolePreviewSample))
+                if (!pSEMCtrl.SetMagnification(dMinMag))
                 {
                     log.Error("DoHolePreview: fail to set SEM data.");
                     pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);

+ 59 - 59
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMsrResult.cs

@@ -43,18 +43,18 @@ namespace OTSModelSharp
         public int SMPL_MSR_RESULT_FILE_MARK = 'S' + 'M' + 'P' + 'L' + 'M' + 'S' + 'R' + 'R' + 'E' + 'S' + 'U' + 'L' + 'T';
 
         // sample measure result file version
-        public string SMPL_MSR_RESULT_FILE_VERSION = ("2.0.0");
+        public string SMPL_MSR_RESULT_FILE_VERSION = ("3.2.0");
 
         // sample measure result file extension
         //----------定义----------------------
         // file version string
         string m_strFileVersion;
         // SEM sample stage
-        CSEMStageData m_pSEMStageData;
-        // sample stage
-        CStage m_pStage;
+        //CSEMStageData m_pSEMStageData;
+        //// sample stage
+        //CStage m_pStage;
       
-        CSEMDataGnr m_pSEMData;
+        //CSEMDataGnr m_pSEMData;
         // sample setting
         COTSSample m_pSample;
         // switch
@@ -91,11 +91,11 @@ namespace OTSModelSharp
         
             m_strFileVersion = ("");
       
-            m_pSEMStageData = new CSEMStageData();
+            //m_pSEMStageData = new CSEMStageData();
            
-            m_pStage = new CStage();
+            //m_pStage = new CStage();
  
-            m_pSEMData = new CSEMDataGnr();
+            //m_pSEMData = new CSEMDataGnr();
       
             m_bSwitch = false;
            
@@ -130,37 +130,37 @@ namespace OTSModelSharp
         //{
         //    return m_pSEMStageData;
         //}
-        public void SetSEMStageData(CSEMStageData a_pSEMStageData)
-        {
+        //public void SetSEMStageData(CSEMStageData a_pSEMStageData)
+        //{
          
-            m_pSEMStageData = a_pSEMStageData;
-        }
-        // sample stage
-        public CStage GetStage()
-        {
-            return m_pStage;
-        }
-        public void SetStage(CStage a_pStage)
-        {
-            if (a_pStage != null)
-            {
-                return;
-            }
-            m_pStage = a_pStage;
-        }
-        // SEM condition
-        public CSEMDataGnr GetSEMStage()
-        {
-            return m_pSEMData;
-        }
-        public void SetSEMStage(CSEMDataGnr a_pSEMData)
-        {
-            if (a_pSEMData != null)
-            {
-                return;
-            }
-            m_pSEMData = a_pSEMData;
-        }
+        //    m_pSEMStageData = a_pSEMStageData;
+        //}
+        //// sample stage
+        //public CStage GetStage()
+        //{
+        //    return m_pStage;
+        //}
+        //public void SetStage(CStage a_pStage)
+        //{
+        //    if (a_pStage != null)
+        //    {
+        //        return;
+        //    }
+        //    m_pStage = a_pStage;
+        //}
+        //// SEM condition
+        //public CSEMDataGnr GetSEMStage()
+        //{
+        //    return m_pSEMData;
+        //}
+        //public void SetSEMStage(CSEMDataGnr a_pSEMData)
+        //{
+        //    if (a_pSEMData != null)
+        //    {
+        //        return;
+        //    }
+        //    m_pSEMData = a_pSEMData;
+        //}
 
  
 
@@ -175,11 +175,11 @@ namespace OTSModelSharp
             slo.Register("FileMark", xnFileMark);
             slo.Register("Version", xnVersion);
             slo.Register("Switch", xbSwitch);
-            slo.Register("SEMStageData", m_pSEMStageData);
+            //slo.Register("SEMStageData", m_pSEMStageData);
             //slo.Register("Stage", m_pStage);
             //slo.Register("SEMData", m_pSEMData);
             slo.Register("Sample", m_pSample);
-            slo.Register("Fields", xfields);
+            //slo.Register("Fields", xfields);
             if (isStoring)
             {
                 xnFileMark.AssignValue(SMPL_MSR_RESULT_FILE_MARK);
@@ -317,30 +317,30 @@ namespace OTSModelSharp
         }
        
        
-        public void SetSEMGnr(CSEMDataGnr a_pSEMGnr)
-        {
+        //public void SetSEMGnr(CSEMDataGnr a_pSEMGnr)
+        //{
          
-            if (a_pSEMGnr == null)
-            {
-                logger.Info("input a invalid SEM general data pointer.");
-                return;
-            }
+        //    if (a_pSEMGnr == null)
+        //    {
+        //        logger.Info("input a invalid SEM general data pointer.");
+        //        return;
+        //    }
 
 
-           m_pSEMData= a_pSEMGnr;
-        }
+        //   m_pSEMData= a_pSEMGnr;
+        //}
 
-        public void SetSEMStage(CStage a_pStage)
-        {
-            //ASSERT(a_pStage);
-            if (a_pStage == null)
-            {
-                logger.Info("input a invalid stage pointer.");
-                return;
-            }
+        //public void SetSEMStage(CStage a_pStage)
+        //{
+        //    //ASSERT(a_pStage);
+        //    if (a_pStage == null)
+        //    {
+        //        logger.Info("input a invalid stage pointer.");
+        //        return;
+        //    }
       
-            m_pStage= a_pStage;
-        }
+        //    m_pStage= a_pStage;
+        //}
        
       
     }

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/VisualGDIObjects/CMeasureArea.cs

@@ -197,7 +197,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel.VisualGDIObjects
 
             if (subItems.Count != 0)
             {
-                NLog.LogManager.GetCurrentClassLogger().Warn(subItems.Count);
+                
                 foreach (var g in subItems)
                 {
                     g.PositionAltering(location, ifZoomCoord);