Explorar el Código

change area and QuantifyMinSize to double

CXS hace 3 años
padre
commit
53d97ad642

+ 4 - 4
OTS.sln

@@ -437,8 +437,8 @@ Global
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.projectconfig|x86.Build.0 = Release|Any CPU
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|Any CPU.ActiveCfg = Release|Any CPU
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|Any CPU.Build.0 = Release|Any CPU
-		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.ActiveCfg = Release|Any CPU
-		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.ActiveCfg = Release_oxford50|x64
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.Build.0 = Release_oxford50|x64
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x86.ActiveCfg = Release|Any CPU
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x86.Build.0 = Release|Any CPU
 		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -461,8 +461,8 @@ Global
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.projectconfig|x86.Build.0 = Release|Any CPU
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|Any CPU.ActiveCfg = Release|Any CPU
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|Any CPU.Build.0 = Release|Any CPU
-		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x64.ActiveCfg = Release|Any CPU
-		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x64.Build.0 = Release|Any CPU
+		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x64.ActiveCfg = Release_oxford50|x64
+		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x64.Build.0 = Release_oxford50|x64
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x86.ActiveCfg = Release|Any CPU
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release_oxford50|x86.Build.0 = Release|Any CPU
 		{2A6A6643-02DC-4361-9C8B-0BBBF8BE79BE}.Release|Any CPU.ActiveCfg = Release|Any CPU

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

@@ -150,7 +150,7 @@ namespace OTSModelSharp
             }
             //2) according to the quantify threshold size value saperate the analysis particles into two group :the bigparticles and the smallparticles.
 
-            int quantifyThreshold = m_Sample.GetMsrParams().GetXRayParam().GetQuantifyMinSize();
+            double quantifyThreshold = m_Sample.GetMsrParams().GetXRayParam().GetQuantifyMinSize();
 
             var smallparts = fld.ListSmallParticles;
             var bigparts = fld.ListBigParticles;

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

@@ -294,6 +294,15 @@ namespace OTSDataType
                         m_poMsrParams.GetImageProcessParam().SetIncAreaRange(oIncArea);
                     }
                     break;
+                case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_QUANTIFY_MINSIZE:
+                    {
+                        if (0 >= a_dValue)
+                        {
+                            return false;
+                        }
+                        m_poMsrParams.GetXRayParam().SetQuantifyMinSize(a_dValue);
+                    }
+                    break;
 
                 // read only property, tread as default. 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.WORKING_DISTANCE:
@@ -581,11 +590,6 @@ namespace OTSDataType
                         a_nValue = m_poMsrParams.GetImageScanParam().GetFieldSmallParticlesPercentage();
                     }
                     break;
-                case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_QUANTIFY_MINSIZE:
-                    {
-                        a_nValue = m_poMsrParams.GetXRayParam().GetQuantifyMinSize();
-                    }
-                    break;
                 case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_FASTTIME:
                     {
                         a_nValue = m_poMsrParams.GetXRayParam().GetFastXrayTime();
@@ -789,15 +793,6 @@ namespace OTSDataType
                         m_poMsrParams.GetImageScanParam().SetFieldSmallParticlePercentage(a_nValue);
                     }
                     break;
-                case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_QUANTIFY_MINSIZE:
-                    {
-                        if (0 >= a_nValue)
-                        {
-                            return false;
-                        }
-                        m_poMsrParams.GetXRayParam().SetQuantifyMinSize(a_nValue);
-                    }
-                    break;
                 case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_FASTTIME:
                     {
                         if (0 >= a_nValue)
@@ -1101,7 +1096,7 @@ namespace OTSDataType
                             //quantify size
                             poPropItem = new CPropItem();
                             nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_QUANTIFY_MINSIZE;
-                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.DOUBLE, false, bShow);
                             a_listPropItems.Add(poPropItem);
                             // scan mode 
 
@@ -2010,6 +2005,11 @@ namespace OTSDataType
                         a_dValue = m_poMsrResults.GetTotalParticleArea();
                     }
                     break;
+                case OTS_SAMPLE_PROP_GRID_ITEMS.XRAY_QUANTIFY_MINSIZE:
+                    {
+                        a_dValue = m_poMsrParams.GetXRayParam().GetQuantifyMinSize();
+                    }
+                    break;
 
                 default:
                     {

+ 5 - 5
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSXRayParam.cs

@@ -31,7 +31,7 @@ namespace OTSDataType
         // x-ray speed analysis
         const int DEFAULE_XRAY_ANALY_MID_TIME = 1000;
 
-        const int DEFAULE_XRAY_QUANTIFY_MINSIZE = 50;
+        const double DEFAULE_XRAY_QUANTIFY_MINSIZE = 50;
 
         const int DEFAULE_FASTXRAYTIME = 100;
         private OTS_X_RAY_SCAN_MODE m_nScanMode;
@@ -40,7 +40,7 @@ namespace OTSDataType
         private int m_nAnalyExpCount;
         private int m_nMidSearchAQTime;
         private int m_nMidAnalyAQTime;
-        private int m_nQutantifyMinSize;
+        private double m_nQutantifyMinSize;
         private int m_nFastXrayTime;
 
         private bool m_nUsingXray;
@@ -121,8 +121,8 @@ namespace OTSDataType
      
 
 
-        public int GetQuantifyMinSize() { return m_nQutantifyMinSize; }
-        public void SetQuantifyMinSize(int a_nQuantifyMinSize)
+        public double GetQuantifyMinSize() { return m_nQutantifyMinSize; }
+        public void SetQuantifyMinSize(double a_nQuantifyMinSize)
         {
             m_nQutantifyMinSize = a_nQuantifyMinSize;
         }
@@ -148,7 +148,7 @@ namespace OTSDataType
 
             xInt xSmallPartAQTime = new xInt();
 
-            xInt xQuantifyMinSize = new xInt();
+            xDouble xQuantifyMinSize = new xDouble();
 
             xBool xnUsingXray = new xBool();
 

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

@@ -840,7 +840,7 @@ namespace OTSMeasureApp
             //分析X-ray计数期望值
             m_cotsxrayprm.SetAnalyExpCount(Convert.ToInt32(IDC_EDIT_ANALYXRAYAIMVALUE.Text));
 
-            m_cotsxrayprm.SetQuantifyMinSize(Convert.ToInt32(IDC_EDIT_QuantifyMinSize.Text));
+            m_cotsxrayprm.SetQuantifyMinSize(Convert.ToDouble(IDC_EDIT_QuantifyMinSize.Text));
 
             m_cotsxrayprm.SetFastXrayTime(Convert.ToInt32(IDC_EDIT_SmallPartAQTime.Text));
             //m_cotsxrayprm.SetShowScanMode(IDC_XRAY_MODE_SWITCH.Checked);
@@ -1480,7 +1480,7 @@ namespace OTSMeasureApp
                 return false;
             }
 
-            if (false == rg.Match(IDC_EDIT_QuantifyMinSize.Text.Trim()).Success)
+            if (false == rgPositiveDecimals.Match(IDC_EDIT_QuantifyMinSize.Text.Trim()).Success)
             {
                 IDC_EDIT_QuantifyMinSize.Focus();
                 IDC_EDIT_QuantifyMinSize.SelectAll();
@@ -1496,16 +1496,7 @@ namespace OTSMeasureApp
                 MessageBox.Show(message, "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 return false;
             }
-            //测量区域面积mm2
-            if (false == rg.Match(tBMeasArea.Text.Trim()).Success)
-            {
-                tBMeasArea.Focus();
-                tBMeasArea.SelectAll();
-                MessageBox.Show("Please enter the correct value format!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
-                return false;
-            }
-
-
+            
             pat = @"^[0-9]+(\.[0-9]{1,3})?$";  //只能输入,1到3位小数的正数
             rg = new Regex(pat);
             //最小放大倍数

+ 40 - 0
OTSRegister/OTSRegister.csproj

@@ -32,6 +32,46 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Release_oxford50\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Release_oxford50\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />

+ 40 - 0
RegistrationAuthorization/RegistrationAuthorization.csproj

@@ -32,6 +32,46 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Release_oxford50\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\bin\x64\Release_oxford50\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />