Jelajahi Sumber

Merge branch 'Release2.3' into ZJX

zhangjiaxin 3 tahun lalu
induk
melakukan
460431f175

+ 1 - 0
Bin/x64/Debug/Resources/XMLData/ResourceForMeasureSourceGrid-EN.xml

@@ -91,6 +91,7 @@
 			<member itemKey="20036" itemName="" itemText="QuantifyThreshold(EqualCircle/um)" description="进行X-ray quantify 分析的最小颗粒尺寸"/>
 			<member itemKey="20037" itemName="" itemText="FastX-ray(Ms)" description="进行X-ray quantify 分析的最小颗粒尺寸"/>
 			<member itemKey="20038" itemName="" itemText="Collect X-ray" description="Whether to collect X-ray during the detection process"/>
+			<member itemKey="20039" itemName="" itemText="XrayLimit"/>
 			<member itemKey="20185" itemName="" itemText="Spot Scan"/>
 			<member itemKey="20186" itemName="" itemText="Plane Scan"/>
 			<member itemKey="20200" itemName="" itemText="Yes" description=""/>

+ 2 - 1
Bin/x64/Debug/Resources/XMLData/ResourceForMeasureSourceGrid-ZH.xml

@@ -92,6 +92,7 @@
 			<member itemKey="20036" itemName="" itemText="分析阈值(等效圆直径/微米)" description="进行X-ray quantify 分析的最小颗粒尺寸"/>
 			<member itemKey="20037" itemName="" itemText="小颗粒x-ray时间(毫秒)" description="进行X-ray quantify 分析的最小颗粒尺寸"/>
 			<member itemKey="20038" itemName="" itemText="是否采集X-ray" description="检测过程中是否对颗粒进行X-ray采集"/>
+			<member itemKey="20039" itemName="" itemText="数量限值"/>
 			<member itemKey="20185" itemName="" itemText="点扫描" description=""/>
             <member itemKey="20186" itemName="" itemText="面扫描" description=""/>
 			<member itemKey="20200" itemName="" itemText="是" description=""/>
@@ -102,7 +103,7 @@
 			<member itemKey="20102" itemName="" itemText="输入分析x-ray时间。"/>
 			<member itemKey="20103" itemName="" itemText="选择分析x-ray扫描方式。"/>
 			<member itemKey="20104" itemName="" itemText="输入分析x-ray计数率期望值。"/>
-			<member itemKey="20105" itemName="" itemText="spare"/>
+			<member itemKey="20105" itemName="" itemText=""/>
 			<member itemKey="20106" itemName="" itemText="spare"/>
 			<member itemKey="20107" itemName="" itemText="spare"/>
 			<member itemKey="20108" itemName="" itemText="spare"/>

+ 12 - 7
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.cpp

@@ -532,7 +532,7 @@ namespace OTSClassifyEngine
 		}
 
 		// process mapping if sulfur amount enough 
-		CElementChemistriesList a_listChemistriesToAnalysis;
+		CElementChemistriesList listChemistriesToAnalysis;
 		CString strProMappingSulName = _T("");
 		BOOL bProMapped = FALSE;
 		if (dSulMolar100 > MIN_SUL_MOLAR)
@@ -546,14 +546,14 @@ namespace OTSClassifyEngine
 				{
 					//remove the Mg element first
 					CElementChemistryPtr pElChemMg = GetNamedElementChemistry(a_listElChemsIncNoFe, INC_SUL_SUB_ELEMENT_NAMES[2]);
-					CElementChemistriesList a_listChemistriesToAnalysis;
+			
 					if (pElChemMg)
 					{
 						for (auto el : a_listElChemsIncNoFe)
 						{
 							if (!el->GetName().CompareNoCase(INC_SUL_SUB_ELEMENT_NAMES[2]))
 							{
-								a_listChemistriesToAnalysis.push_back(el);
+								listChemistriesToAnalysis.push_back(el);
 							}
 							
 						}
@@ -561,7 +561,7 @@ namespace OTSClassifyEngine
 					}
 					else
 					{
-						a_listChemistriesToAnalysis = a_listElChemsIncNoFe;
+						listChemistriesToAnalysis = a_listElChemsIncNoFe;
 					}
 					// try to get Ca element chemistry
 					CElementChemistryPtr pElChemCa = GetNamedElementChemistry(a_listElChemsIncNoFe, INC_SUL_SUB_ELEMENT_NAMES[1]);
@@ -597,7 +597,7 @@ namespace OTSClassifyEngine
 						{
 							if (!el->GetName().CompareNoCase(INC_SUL_SUB_ELEMENT_NAMES[1]))
 							{
-								a_listChemistriesToAnalysis.push_back(el);
+								listChemistriesToAnalysis.push_back(el);
 							}
 
 						}
@@ -605,7 +605,7 @@ namespace OTSClassifyEngine
 					}
 					else
 					{
-						a_listChemistriesToAnalysis = a_listElChemsIncNoFe;
+						listChemistriesToAnalysis = a_listElChemsIncNoFe;
 					}
 					// try to get Mg element chemistry
 					CElementChemistryPtr pElChemMg = GetNamedElementChemistry(a_listElChemsIncNoFe, INC_SUL_SUB_ELEMENT_NAMES[2]);
@@ -632,6 +632,7 @@ namespace OTSClassifyEngine
 				// real earth elements process
 				case STEEL_TECHNOLOGY::RareEarthMode:
 				{
+					listChemistriesToAnalysis = a_listElChemsIncNoFe;
 					// try to get Ce element chemistry
 					CElementChemistryPtr pElChemCe = GetNamedElementChemistry(a_listElChemsIncNoFe, INC_SUL_SUB_ELEMENT_NAMES[3]);
 					BOOL bCeMapped = FALSE;
@@ -680,6 +681,10 @@ namespace OTSClassifyEngine
 					}
 				}
 				break;
+				default:
+					listChemistriesToAnalysis = a_listElChemsIncNoFe;
+					break;
+
 			}
 		}
 
@@ -718,7 +723,7 @@ namespace OTSClassifyEngine
 
 		// check if the rest element chemistries map an oxide
 		int nIncId = (int)OTS_PARTICLE_TYPE::INVALID;
-		if (!OxideClassify(a_pPartSTDData, a_listChemistriesToAnalysis, a_dMolarSumNoFe, nIncId))
+		if (!OxideClassify(a_pPartSTDData, listChemistriesToAnalysis, a_dMolarSumNoFe, nIncId))
 		{
 			// something wrong
 			LogErrorTrace(__FILE__, __LINE__, _T("COTSClassifyEng::SulClassify: failed to call OxideClassify method."));

+ 1 - 3
OTSCPP/OTSControl/OTSSemBase.h

@@ -39,8 +39,7 @@ namespace OTSController {
 		// SEM Controller type ID
 		virtual OTSSEMController::SEM_ID GetType() = 0;
 
-		// simulation test
-		//virtual BOOL IsSimulation() = 0;
+	
 
 		// calls the SEM to create a connection
 		virtual BOOL Connect(void) = 0;
@@ -126,6 +125,5 @@ namespace OTSController {
 
 	typedef std::shared_ptr<COTSSemBase> __declspec(dllexport) CSemBasePtr;
 
-//	typedef std::shared_ptr<COTSSemBase> CSemBasePtr;
 
 }

+ 9 - 2
OTSCPP/OTSControl/Oxford/OxfordWrapper/OxfordControllerWrapper.cpp

@@ -51,6 +51,13 @@ void OxfordControllerWrapper::CloseClient(void)
 	}
 
 	_controllerThread->Abort();
+	_controllerThread = nullptr;
+	_microscopeController = nullptr;
+	_edSpectrumController = nullptr;
+	_imageAcqusitionController = nullptr;
+	_edsChordListController = nullptr;
+	_SEMQuantController = nullptr;
+	
 	
 }
 
@@ -60,7 +67,7 @@ OxfordControllerWrapper::~OxfordControllerWrapper(void)
 	{
 	}
 
-	_controllerThread->Abort();
+	CloseClient();
 }
 
 OxfordControllerWrapper::!OxfordControllerWrapper(void)
@@ -70,7 +77,7 @@ OxfordControllerWrapper::!OxfordControllerWrapper(void)
 		
 	}
 	
-	_controllerThread->Abort();
+	CloseClient();
 }
 
 bool OxfordControllerWrapper::Init()

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

@@ -195,8 +195,16 @@ namespace OTSModelSharp
 
                     listXray1.Add(listXray[i]);
                 }
-  
+
+            }
+            else
+            {
+                listXray1 = listXray;
             }
+
+
+
+
             List<COTSParticleClr> smallparts = new List<COTSParticleClr>();
             List<COTSParticleClr> bigparts = new List<COTSParticleClr>();
 

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

@@ -595,6 +595,11 @@ namespace OTSDataType
                         a_nValue = m_poMsrParams.GetXRayParam().GetFastXrayTime();
                     }
                     break;
+                case OTS_SAMPLE_PROP_GRID_ITEMS.XrayLimit:
+                    {
+                        a_nValue = m_poMsrParams.GetXRayParam().GetXrayLimit();
+                    }
+                    break;
                 default:
                     {
                         // something wrong, return false
@@ -802,6 +807,15 @@ namespace OTSDataType
                         m_poMsrParams.GetXRayParam().SetFastXrayTime(a_nValue);
                     }
                     break;
+                case OTS_SAMPLE_PROP_GRID_ITEMS.XrayLimit:
+                    {
+                        if (0 >= a_nValue)
+                        {
+                            return false;
+                        }
+                        m_poMsrParams.GetXRayParam().SetXrayLimit(a_nValue);
+                    }
+                    break;
                 // read only properties, treat same as default
                 case OTS_SAMPLE_PROP_GRID_ITEMS.TOTAL_FIELDS:
                 case OTS_SAMPLE_PROP_GRID_ITEMS.COMPLETED_FIELDS:
@@ -1122,7 +1136,13 @@ namespace OTSDataType
                                 nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.ANALYSIS_COUNTS;
                                 poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
                                 a_listPropItems.Add(poPropItem);
-                           
+
+                            // XrayLimit 
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.XrayLimit;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
+                            a_listPropItems.Add(poPropItem);
+
                         }
                         break;
                     case OTS_SAMPLE_PROP_GRID_ITEM_GROUPS.SEM:
@@ -1583,6 +1603,11 @@ namespace OTSDataType
                             poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
                             a_listPropItems.Add(poPropItem);
 
+                            // XrayLimit 
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.XrayLimit;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
+                            a_listPropItems.Add(poPropItem);
                         }
                         break;
                     case OTS_SAMPLE_PROP_GRID_ITEM_GROUPS.SEM:

+ 9 - 0
OTSIncAMeasureApp/1-OTSMeasure/CMeasureThreadWrapper.cs

@@ -392,6 +392,15 @@ namespace OTSMeasureApp
         {
             m_MsrThread.GetSEMController().DisConnect();
         }
+        public void StopXrayAcquisition()
+        {
+            var hw = m_MsrThread.GetSEMController().GetHardwareInterface();
+            if (hw != null)
+            {
+                hw.StopXrayAcquisition();
+            }
+            
+        }
         public bool IsSEMConnected()
         {
             return m_MsrThread.GetSEMController().IsConnected();

+ 15 - 0
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.cs

@@ -669,6 +669,8 @@ namespace OTSMeasureApp
             IDC_EDIT_QuantifyMinSize.Text = m_cotsxrayprm.GetFeatureModeMinSize().ToString();
 
             IDC_EDIT_SmallPartAQTime.Text = m_cotsxrayprm.GetFastXrayTime().ToString();
+
+            IDC_EDIT_XrayLimit.Text = m_cotsxrayprm.GetXrayLimit().ToString();
             //IDC_XRAY_MODE_SWITCH.Checked = m_cotsxrayprm.GetShowScanMode();
             //IDC_XRAY_TIME_SWITCH.Checked = m_cotsxrayprm.GetShowSpeed();
             //IDC_XRAY_COUNT_SWITCH.Checked = m_cotsxrayprm.GetShowExpCount();
@@ -843,6 +845,8 @@ namespace OTSMeasureApp
             m_cotsxrayprm.SetQuantifyMinSize(Convert.ToDouble(IDC_EDIT_QuantifyMinSize.Text));
 
             m_cotsxrayprm.SetFastXrayTime(Convert.ToInt32(IDC_EDIT_SmallPartAQTime.Text));
+
+            m_cotsxrayprm.SetXrayLimit(Convert.ToInt32(IDC_EDIT_XrayLimit.Text));
             //m_cotsxrayprm.SetShowScanMode(IDC_XRAY_MODE_SWITCH.Checked);
             //m_cotsxrayprm.SetShowSpeed(IDC_XRAY_TIME_SWITCH.Checked);
             //m_cotsxrayprm.SetShowExpCount(IDC_XRAY_COUNT_SWITCH.Checked);
@@ -1285,9 +1289,11 @@ namespace OTSMeasureApp
             string pat = @"^-?[0-9]\d*$";//只能限定正负整数,包含0
             string scope = @"^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$";
             string PositiveDecimals = @"^(([1-9]\d*)(\.\d+)?)$|^0\.\d*[1-9]$";  //正浮点数
+            string positiveInteger = @"^?[0-9]\d*$";//只能限定正整数,包含0
             Regex rg = new Regex(pat);
             Regex rgScope = new Regex(scope);
             Regex rgPositiveDecimals = new Regex(PositiveDecimals);
+            Regex rgpositiveInteger = new Regex(positiveInteger);
             //是否是正确的数值格式类型判断
             //100倍时屏幕尺寸
             if (false == rg.Match(IDC_EDIT_SCREENWIDTH.Text.Trim()).Success)
@@ -1601,6 +1607,15 @@ namespace OTSMeasureApp
                 MessageBox.Show(message, "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 return false;
             }
+            //最小放大倍数
+            if (false == rgpositiveInteger.Match(IDC_EDIT_XrayLimit.Text.Trim()).Success)
+            {
+                IDC_EDIT_XrayLimit.Focus();
+                IDC_EDIT_XrayLimit.SelectAll();
+                string message = table["message64"].ToString();
+                MessageBox.Show(message, "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                return false;
+            }
             return true;
         }
 

File diff ditekan karena terlalu besar
+ 231 - 265
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.designer.cs


+ 15 - 14
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -167,7 +167,7 @@
             this.rbMenu.BorderMode = System.Windows.Forms.RibbonWindowMode.InsideWindow;
             this.rbMenu.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
             this.rbMenu.Location = new System.Drawing.Point(0, 0);
-            this.rbMenu.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.rbMenu.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.rbMenu.Minimized = true;
             this.rbMenu.Name = "rbMenu";
             // 
@@ -201,7 +201,7 @@
             this.rbMenu.QuickAcessToolbar.Image = null;
             this.rbMenu.QuickAcessToolbar.Tag = null;
             this.rbMenu.QuickAcessToolbar.ToolTipImage = null;
-            this.rbMenu.Size = new System.Drawing.Size(1703, 130);
+            this.rbMenu.Size = new System.Drawing.Size(1277, 130);
             this.rbMenu.TabIndex = 0;
             this.rbMenu.Tabs.Add(this.rbTabHome);
             this.rbMenu.Tabs.Add(this.rbTabView);
@@ -626,6 +626,7 @@
             this.rbinterrupt.ToolTip = null;
             this.rbinterrupt.ToolTipImage = null;
             this.rbinterrupt.ToolTipTitle = null;
+            this.rbinterrupt.Click += new System.EventHandler(this.rbinterrupt_Click);
             // 
             // rbPanelFunction
             // 
@@ -830,11 +831,11 @@
             this.TSGrayVal,
             this.STSemCoordinate,
             this.toolStripStatusLabel1});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 841);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 671);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Padding = new System.Windows.Forms.Padding(3, 0, 19, 0);
+            this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 14, 0);
             this.statusStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.statusStrip1.Size = new System.Drawing.Size(1703, 30);
+            this.statusStrip1.Size = new System.Drawing.Size(1277, 26);
             this.statusStrip1.TabIndex = 2;
             this.statusStrip1.Text = "statusStrip1";
             // 
@@ -842,20 +843,20 @@
             // 
             this.TSGrayVal.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.TSGrayVal.Name = "TSGrayVal";
-            this.TSGrayVal.Size = new System.Drawing.Size(58, 24);
+            this.TSGrayVal.Size = new System.Drawing.Size(48, 21);
             this.TSGrayVal.Text = "灰度值";
             // 
             // STSemCoordinate
             // 
             this.STSemCoordinate.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.STSemCoordinate.Name = "STSemCoordinate";
-            this.STSemCoordinate.Size = new System.Drawing.Size(75, 24);
+            this.STSemCoordinate.Size = new System.Drawing.Size(62, 21);
             this.STSemCoordinate.Text = "SEM坐标";
             // 
             // toolStripStatusLabel1
             // 
             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
-            this.toolStripStatusLabel1.Size = new System.Drawing.Size(65, 24);
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(54, 21);
             this.toolStripStatusLabel1.Text = "IsReady";
             this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             this.toolStripStatusLabel1.Visible = false;
@@ -870,9 +871,9 @@
             this.dockPanel.DockLeftPortion = 0.21D;
             this.dockPanel.DockRightPortion = 0.27D;
             this.dockPanel.Location = new System.Drawing.Point(0, 130);
-            this.dockPanel.Margin = new System.Windows.Forms.Padding(8);
+            this.dockPanel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.dockPanel.Name = "dockPanel";
-            this.dockPanel.Size = new System.Drawing.Size(1703, 711);
+            this.dockPanel.Size = new System.Drawing.Size(1277, 541);
             dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
             dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
             autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
@@ -949,9 +950,9 @@
             // 
             // OTSIncAMeasureAppForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1703, 871);
+            this.ClientSize = new System.Drawing.Size(1277, 697);
             this.Controls.Add(this.dockPanel);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.rbMenu);
@@ -959,8 +960,8 @@
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.IsMdiContainer = true;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.MinimumSize = new System.Drawing.Size(902, 623);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MinimumSize = new System.Drawing.Size(680, 506);
             this.Name = "OTSIncAMeasureAppForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "OTSMeasureApp";

+ 12 - 0
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -1390,5 +1390,17 @@ namespace OTSMeasureApp
             this.rbConnectHardware.Enabled = true;
             log.Warn("SEM Disconnect!");
         }
+
+        private void rbinterrupt_Click(object sender, EventArgs e)
+        {
+            if (m_MsrThreadWrapper.IsSEMConnected())
+            {
+                m_MsrThreadWrapper.StopXrayAcquisition();
+
+
+            }
+            
+            log.Warn("StopXrayAcquisition!");
+        }
     }
 }

+ 2 - 1
OTSIncAMeasureApp/ResourceManage/ResourceData.cs

@@ -48,7 +48,8 @@ namespace OTSModelSharp.ResourceManage
         XRAY_QUANTIFY_MINSIZE = 36,
         XRAY_FASTTIME = 37,
         USING_XRAY = 38,
-        XRAY_MAX = 38,
+        XrayLimit=39,
+        XRAY_MAX = 39,
         SEM_DATA_MIN = 40,
         MAGNIFICATION = 40,
         PIXEL_SIZE = 41,

TEMPAT SAMPAH
OTSIncAMeasureApp/Resources/interrupt.png


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini