Browse Source

Merge branch 'Release2.3' of http://172.16.3.77:10080/gaoshipeng/OTS2_0 into Release2.3

CXS 3 years ago
parent
commit
f4a5eea098

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/1-OTSInclution/SmplMeasureInclution.cs

@@ -47,7 +47,7 @@ namespace OTSModelSharp
 
             CalculateParticlePos();
       
-            if (pXRayParam.GetUsingXray() == (int)OTS_USING_X_RAY.Yes)
+            if (pXRayParam.GetUsingXray() == true)
             {
                 Thread.Sleep(100);
                 CollectParticlesXrayData();

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

@@ -42,7 +42,7 @@ namespace OTSModelSharp
             CalculateParticlePos();
             COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
             //collect xray data.
-            if (pXRayParam.GetUsingXray() == (int)OTS_USING_X_RAY.Yes)
+            if (pXRayParam.GetUsingXray() == true)
             {
                 Thread.Sleep(100);
                 CollectParticlesXrayData((CFieldDataClean)curFldData);

+ 1 - 3
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSImageProcParam.cs

@@ -65,9 +65,7 @@ namespace OTSDataType
         {
 
             // copy data over
-            //m_oIncArea = a_oSource.m_oIncArea;
-            //m_oBGGray = a_oSource.m_oBGGray;
-            //m_oParticleGray = a_oSource.m_oParticleGray;
+           
             m_oIncArea.SetStart(a_oSource.m_oIncArea.GetStart());
             m_oIncArea.SetEnd(a_oSource.m_oIncArea.GetEnd());
             m_oBGGray.SetStart(a_oSource.m_oBGGray.GetStart());

+ 4 - 3
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -216,8 +216,9 @@ namespace OTSDataType
                     break;
                 case OTS_SAMPLE_PROP_GRID_ITEMS.USING_XRAY:
                     {
-                        int m_UsingXray = a_bValue ? 1 : 0;
-                        m_poMsrParams.GetXRayParam().SetUsingXray(m_UsingXray);
+                        //int m_UsingXray = a_bValue ? 1 : 0;
+                        
+                        m_poMsrParams.GetXRayParam().SetUsingXray(a_bValue);
                     }
                     break;
                 default:
@@ -460,7 +461,7 @@ namespace OTSDataType
                     break;
                 case (int)OTS_SAMPLE_PROP_GRID_ITEMS.USING_XRAY:
                     {
-                        a_bValue = m_poMsrParams.GetXRayParam().GetUsingXray() > 0 ? true : false;
+                        a_bValue = m_poMsrParams.GetXRayParam().GetUsingXray() ;
                     }
                     break;
                 default:

+ 8 - 25
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSXRayParam.cs

@@ -43,7 +43,7 @@ namespace OTSDataType
         private int m_nQutantifyMinSize;
         private int m_nFastXrayTime;
 
-        private int m_nUsingXray;
+        private bool m_nUsingXray;
 
         void Init()
         {
@@ -73,8 +73,8 @@ namespace OTSDataType
             m_nMidAnalyAQTime = a_oSource.m_nMidAnalyAQTime;
             m_nQutantifyMinSize = a_oSource.m_nQutantifyMinSize;
             m_nFastXrayTime = a_oSource.m_nFastXrayTime;
-      
-            m_nUsingXray = a_oSource.m_nUsingXray>0?0:1;
+
+            m_nUsingXray = a_oSource.m_nUsingXray;
         }
         // copy constructor
         public COTSXRayParam(COTSXRayParam a_oSource)
@@ -133,29 +133,10 @@ namespace OTSDataType
         {
             m_nFastXrayTime = a_nFastXrayTime;
         }
-        public void SetLowSearchAQTime(int a_nLowSearchAQTime)
-        {
-            m_nMidSearchAQTime = (int)(a_nLowSearchAQTime * 4 / 3 + 0.5);
-        }
-
-        public void SetHightSearchAQTime(int a_nHighSearchAQTime)
-        {
-            m_nMidSearchAQTime = (int)(a_nHighSearchAQTime * 4 / 5 + 0.5);
-        }
-
-        public void SetLowAnalyAQTime(int a_nLowAnalyAQTime)
-        {
-            m_nMidSearchAQTime = (int)(a_nLowAnalyAQTime * 4 / 3 + 0.5);
-        }
-
-        public void SetHighAnalyAQTime(int a_nHighAnalyAQTime)
-        {
-            m_nMidSearchAQTime = (int)(a_nHighAnalyAQTime * 4 / 5 + 0.5);
-        }
 
  
-        public int GetUsingXray() { return m_nUsingXray; }
-        public void SetUsingXray(int a_nUsingXray)
+        public bool GetUsingXray() { return m_nUsingXray; }
+        public void SetUsingXray(bool a_nUsingXray)
         {
             m_nUsingXray = a_nUsingXray;
         }
@@ -166,7 +147,8 @@ namespace OTSDataType
             xInt xnAnalyExpCount = new xInt();
         
             xInt xnMidAnalyAQTime = new xInt();
-            xInt xnUsingXray = new xInt();
+
+            xBool xnUsingXray = new xBool();
 
     
             Slo slo = new Slo();
@@ -196,6 +178,7 @@ namespace OTSDataType
             else
             {
                 slo.Serialize(false, classDoc, rootNode);
+
                 m_nScanMode = (OTS_X_RAY_SCAN_MODE)Enum.Parse(typeof(OTS_X_RAY_SCAN_MODE),xnScanMode.value());
          
                 m_nAnalyExpCount = xnAnalyExpCount.value();

+ 7 - 6
OTSIncAMeasureApp/0-OTSModel/OTSDataType/SEMStageData.cs

@@ -5,6 +5,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Xml;
+using static OTSDataType.otsdataconst;
 
 namespace OTSDataType
 {
@@ -267,8 +268,8 @@ namespace OTSDataType
         public override void Serialize(bool isStoring, XmlDocument classDoc, XmlNode rootNode)
         {
             xInt xscanFieldSize100 = new xInt();
-            xInt xbXAxisDir = new xInt();
-            xInt xbYAxisDir = new xInt();
+            xString xbXAxisDir = new xString();
+            xString xbYAxisDir = new xString();
             xDouble xMinMag = new xDouble();
             Slo slo = new Slo();
             slo.Register("scanFieldSize", xscanFieldSize100);//it should be "scanFieldSize100" ,but we have used "scanFieldSize" for a long time,here is for compatible with before version.
@@ -281,8 +282,8 @@ namespace OTSDataType
             if (isStoring)
             {
                 xscanFieldSize100.AssignValue(m_nScanFieldSize100);
-                xbXAxisDir.AssignValue((int)m_bXAxisDir);
-                xbYAxisDir.AssignValue((int)m_bYAxisDir);
+                xbXAxisDir.AssignValue(m_bXAxisDir.ToString());
+                xbYAxisDir.AssignValue(m_bYAxisDir.ToString());
                 xMinMag.AssignValue(m_dMinMag);
 
                 slo.Serialize(true, classDoc, rootNode);
@@ -291,8 +292,8 @@ namespace OTSDataType
             {
                 slo.Serialize(false, classDoc, rootNode);
                 m_nScanFieldSize100 = xscanFieldSize100.value();
-                m_bXAxisDir = (otsdataconst.OTS_X_AXIS_DIRECTION)xbXAxisDir.value();
-                m_bYAxisDir = (otsdataconst.OTS_Y_AXIS_DIRECTION)xbYAxisDir.value();
+                m_bXAxisDir = (OTS_X_AXIS_DIRECTION)Enum.Parse(typeof(OTS_X_AXIS_DIRECTION),xbXAxisDir.value());
+                m_bYAxisDir = (OTS_Y_AXIS_DIRECTION)Enum.Parse(typeof(OTS_Y_AXIS_DIRECTION),xbYAxisDir.value());
                 m_dMinMag = xMinMag.value();
             }
         }

+ 3 - 2
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.cs

@@ -9,7 +9,7 @@ using OTSDataType;
 using OTSModelSharp;
 using System.IO;
 using static OTSModelSharp.ResourceManage.ResourceData;
-//using OTSModelSharp.Measure.GetStageInfo;
+
 using static OTSDataType.otsdataconst;
 using OTSModelSharp.Measure.GetStageInfo;
 
@@ -845,7 +845,8 @@ namespace OTSMeasureApp
 
             //是否使用X-ray
             ComboBoxItem enum_usingxray = (ComboBoxItem)IDC_COMBO_USINGXRAYS.SelectedItem;
-            m_cotsxrayprm.SetUsingXray(Convert.ToInt32(enum_usingxray.Value));
+            bool usingxray = (int)(enum_usingxray.Value) == 0 ? true:false;//the combobox downitem is "True==0,false==1",so make a convertion here.
+            m_cotsxrayprm.SetUsingXray(usingxray);
 
             //分析X-ray精度
             ComboBoxItem enum_analyxrayspeed = (ComboBoxItem)IDC_COMBO_ANALYXRAYSPEED.SelectedItem;