瀏覽代碼

working mode of OxfordExtender/ExtenderWrapperIpc.cs change to the original mode.

gsp 2 年之前
父節點
當前提交
3e728211e9

+ 2 - 2
Bin/x64/Debug/Config/ProData/HardwareConfig.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData PathName="HardwareConfig.xml" ID="1">
-  <Member RegName="SemControllerName" Value="OffLine" ImageInputSources="SE" />
-  <Member RegName="EDSName" Value="OffLine" />
+  <Member RegName="SemControllerName" Value="Oxford" ImageInputSources="SE" />
+  <Member RegName="EDSName" Value="Oxford" />
   <Member RegName="BrukerDllVersion" Version="Bruker.API.Esprit64.dll" />
   <Member RegName="FEIIP" Value="192.168.0.1" />
   <Member RegName="FEIPORT" Value="7520" />

+ 2 - 2
OTS.sln

@@ -616,8 +616,8 @@ Global
 		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford60|x86.Build.0 = Release|Any CPU
 		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|Any CPU.ActiveCfg = Debug|x64
 		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|Any CPU.Build.0 = Debug|x64
-		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x64.ActiveCfg = Release|Any CPU
-		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x64.Build.0 = Release|Any CPU
+		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x64.ActiveCfg = Release_oxford61|x64
+		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x64.Build.0 = Release_oxford61|x64
 		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x86.ActiveCfg = Release|Any CPU
 		{B2683648-C829-40E7-A479-AC90B1B80286}.Release_oxford61|x86.Build.0 = Release|Any CPU
 	EndGlobalSection

+ 3 - 3
OTSCPP/OTSClassifyEngine/OTSClassifyEngine.vcxproj

@@ -335,9 +335,9 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <IncludePath>$(SolutionDir)OTSCPP\OTSClassifyEngine;$(SolutionDir)OTSCPP\OTSClassifyEngine\CurveCompareEngine;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSLog;$(SolutionDir)OTSCPP\OTSData;$(SolutionDir)OTSCPP\OTSSQLiteDll;$(IncludePath)</IncludePath>
-    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <IncludePath>$(SolutionDir)OTSCPP\OTSClassifyEngine;$(SolutionDir)OTSCPP\OTSClassifyEngine\SpectrumCompareEngine;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSLog;$(SolutionDir)OTSCPP\OTSData;$(SolutionDir)OTSCPP\OTSSQLiteDll;$(IncludePath)</IncludePath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">

+ 3 - 3
OTSCPP/OTSClrInterface/OTSClrInterface.vcxproj

@@ -287,9 +287,9 @@
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
-    <IncludePath>$(SolutionDir)\OTSCPP\OTSData;$(SolutionDir)\OTSCPP\OTSControl;$(SolutionDir)\OTSCPP\OTSClassifyEngine\;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv2;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include;$(SolutionDir)\OTSCPP\OTSImagePro;$(SolutionDir)\OTSCPP\OTSClrInterface\CommonClr;$(SolutionDir)\OTSCPP\OTSLog;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSClassifyEngine\CurveCompareEngine;$(SolutionDir)OTSCPP\OTSRptCalculate\GBCal;$(SolutionDir)OTSCPP\OTSRptCalculate\Model;$(SolutionDir)\OTSCPP\OTSClrInterface\ImageProClr;$(SolutionDir)OTSCPP\OTSRptCalculate\DTL;$(SolutionDir)OTSCPP\OTSSQLiteDll;$(IncludePath)</IncludePath>
-    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <IncludePath>$(SolutionDir)\OTSCPP\OTSData;$(SolutionDir)\OTSCPP\OTSControl;$(SolutionDir)\OTSCPP\OTSClassifyEngine\;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv2;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include;$(SolutionDir)\OTSCPP\OTSImagePro;$(SolutionDir)\OTSCPP\OTSClrInterface\CommonClr;$(SolutionDir)\OTSCPP\OTSLog;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSClassifyEngine\SpectrumCompareEngine;$(SolutionDir)OTSCPP\OTSRptCalculate\GBCal;$(SolutionDir)OTSCPP\OTSRptCalculate\Model;$(SolutionDir)\OTSCPP\OTSClrInterface\ImageProClr;$(SolutionDir)OTSCPP\OTSRptCalculate\DTL;$(SolutionDir)OTSCPP\OTSSQLiteDll;$(IncludePath)</IncludePath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">

+ 1 - 1
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.cpp

@@ -1783,7 +1783,7 @@ BOOL COTSBrukerImpl::QuantifyPosXrayPointOnLine(CPosXrayPtr a_vXRayPart)
 
 	if (BrukerDll::QuantifyPointListSpectrum(m_nClientID, a_vXRayPart->GetIndex(), pcMethod, pcParams, cResult, 10000, (BrukerDll::PRTSpectrumHeaderRec)m_psRTSpectrumBuffer.get(), (int)BRUKER_PARAM::RT_SPECTRUM_BUFFER_SIZE) != 0)
 	{
-		LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SetXRayPoints failed to call QuantifyPointListSpectrum method at index %d, error code %d"), a_vXRayPart->GetIndex(), -1);
+		LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::QuantifyPosXrayPointOnLine failed to call QuantifyPointListSpectrum method at index %d, error code %d"), a_vXRayPart->GetIndex(), -1);
 		return false;
 	}
 	CElementChemistriesList listElement = CElement::ExtractElementChemistrys(CControllerHelper::CharToString(cResult));

+ 4 - 2
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.h

@@ -136,8 +136,6 @@ namespace OTSController {
 		BOOL QuantifyXrayPoint(CPosXray* a_pXRayPoint, CString a_strMethodName);
 		BOOL QuantifySpectrumFile(LPCTSTR a_sFilePathName, CString a_strMethodName, CElementChemistriesList& a_vElementChemistry);
 
-		BOOL QuantifyPosXrayPointsOnLine(std::vector<CPosXrayPtr>& a_vXRayParts);//delay quantifying so the next field's stage moving and BSE aquisition can be executed in the same time. 
-		BOOL QuantifyPosXrayPointOnLine(CPosXrayPtr a_vXRayPart);//delay quantifying 
 
 		RTSpectrumHeaderRec* GetSectrumHeader();
 
@@ -150,6 +148,10 @@ namespace OTSController {
 		BOOL SetXRayPoints(CPosXrayList& a_listXrayPois/*, const DWORD a_nACTimeMS*/);
 		BOOL GetXRayByFeatures(CPosXrayList& a_vXPoints, std::vector<BrukerFeature> a_vFeatures, SHORT a_nACTimeMS);
 		BOOL SetXRayPointsByFeature(CPosXrayList& a_vXPoints, const DWORD a_nACTimeMS);
+
+		BOOL QuantifyPosXrayPointsOnLine(std::vector<CPosXrayPtr>& a_vXRayParts);//delay quantifying so the next field's stage moving and BSE aquisition can be executed in the same time. 
+		BOOL QuantifyPosXrayPointOnLine(CPosXrayPtr a_vXRayPart);//delay quantifying 
+
 	protected:
 		// close client
 		BOOL CloseClient(void);//there's no need to call from out ,the single instance destruction method will call it automatically.

+ 2 - 2
OTSCPP/OTSControl/OTSControl.vcxproj

@@ -292,10 +292,10 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>false</LinkIncremental>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IncludePath>$(SolutionDir)\OTSCPP\OTSControl;$(SolutionDir)OTSCPP\OTSData;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSLog;$(IncludePath)</IncludePath>
     <ReferencePath>$(SolutionDir)OTSCPP\OpenDll\OxfordApi61Dll;$(ReferencePath)</ReferencePath>
-    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">
     <LinkIncremental>false</LinkIncremental>

+ 1 - 1
OTSCPP/OTSData/OTSData.vcxproj

@@ -287,7 +287,7 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
     <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)Tools</IncludePath>
   </PropertyGroup>

+ 2 - 2
OTSCPP/OTSImagePro/OTSImagePro.vcxproj

@@ -337,10 +337,10 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
     <IncludePath>$(SolutionDir)\OTSCPP\OTSData;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv2;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include\opencv;$(SolutionDir)\OTSCPP\OpenCV\$(platform)\include;$(IncludePath)</IncludePath>
-    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">
     <LinkIncremental>false</LinkIncremental>

+ 1 - 1
OTSCPP/OTSLog/OTSLog.vcxproj

@@ -333,7 +333,7 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IncludePath>$(SolutionDir)Tools;$(IncludePath)</IncludePath>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
   </PropertyGroup>

+ 2 - 2
OTSCPP/OTSRptCalculate/OTSRptCalculate.vcxproj

@@ -376,10 +376,10 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
     <IncludePath>$(SolutionDir)\OTSCPP\OTSControl;$(SolutionDir)OTSCPP\OTSData;$(SolutionDir)OTSCPP\Tools;$(SolutionDir)OTSCPP\OTSLog;$(SolutionDir)OTSCPP\OTSImagePro;$(SolutionDir)OTSCPP\OTSSQLiteDll;$(SolutionDir)OTSCPP\OTSRptCalculate\Tools;$(SolutionDir)OTSCPP\OTSRptCalculate\Model;$(SolutionDir)OTSCPP\OTSRptCalculate\DTL;$(SolutionDir)OTSCPP\OTSRptCalculate\GBCal;$(IncludePath)</IncludePath>
-    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">
     <LinkIncremental>false</LinkIncremental>

+ 2 - 1
OTSCPP/OTSSQLiteDll/OTSSQLiteDll.vcxproj

@@ -317,9 +317,10 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
     <IncludePath>$(SolutionDir)OTSCPP\SQLite3Dll;$(SolutionDir)OTSCPP\OTSData;$(SolutionDir)\OTSCPP\OTSLog;$(SolutionDir)OTSCPP\Tools;$(IncludePath)</IncludePath>
+    <LibraryPath>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll;$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford62|x64'">
     <LinkIncremental>false</LinkIncremental>

+ 1 - 1
OTSCPP/SQLite3Dll/SQLite3Dll.vcxproj

@@ -327,7 +327,7 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_oxford61|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\</OutDir>
+    <OutDir>$(SolutionDir)\Bin\$(Platform)\$(Configuration)\OTSCPPDll</OutDir>
     <IntDir>$(SolutionDir)\Obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
     <TargetName>SQLite3Win64Dll</TargetName>
     <IncludePath>$(SolutionDir)SQLite3Dll;$(IncludePath)</IncludePath>

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

@@ -84,7 +84,7 @@ namespace OTSModelSharp
         {
           
             int steelTech = (int)m_Sample.GetMsrParams().GetSteelTechnology();
-            particle.SetType((int)OTS_PARTICLE_TYPE.UNCLASSIFY);
+            particle.SetType((int)OTS_PARTICLE_TYPE.NOT_IDENTIFIED);
             if (m_Sample.GetMsrParams().GetSysSTDSwitch())
             {
 

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

@@ -40,8 +40,7 @@ namespace OTSModelSharp
                    log.Info("Begin to classify big particles!Using " + libname);
                     var parts = curFldData.GetListAnalysisParticles();
                     ClassifyParticles(parts,libname);
-                    //var smallParts = curFldData.ListSmallParticles;
-                    //ClassifyQuantifyParticles(smallParts, libname);
+                 
                  
                 }
             }
@@ -92,12 +91,14 @@ namespace OTSModelSharp
                 COTSParticleClr pParticle = a_listAnalysisParticles[i];
            
                 IClassifyEngine engine = m_classifyEngine.GetExpressionClassifyEngine(libname);
- 
+                pParticle.SetType((int)OTS_PARTICLE_TYPE.NOT_IDENTIFIED);
+
+
                 if (!IsLowCounts(pParticle))               
                 {
                     if (engine.ClassifyByExpressionTemporarySpectrum(pParticle))
                     {
-                        if (pParticle.GetType() == (int)OTS_PARTICLE_TYPE.UNCLASSIFY)
+                        if (pParticle.GetType() == (int)OTS_PARTICLE_TYPE.NOT_IDENTIFIED)
                         {
                             m_EDSController.QuantifyXrayByPart(pParticle);
                             engine.ClassifyByExpression(pParticle);

+ 1 - 1
OTSIncAMeasureApp/ServiceCenter/OxfordExtender/ExtenderWrapperIpc.cs

@@ -52,7 +52,7 @@ namespace OTSMeasureApp.ServiceCenter.OxfordExtender
 
         }
 
-        internal static void CloseExtenderWrapper()
+        internal static void KillExtenderWrapperProcess()
         {
             Process[] processes = Process.GetProcessesByName("OxfordExtenderWrapper");
            

+ 2 - 1
OTSIncAMeasureApp/ServiceCenter/OxfordExtender/OxfordSemController.cs

@@ -32,8 +32,9 @@ namespace OTSMeasureApp.ServiceCenter
         {
             try
             {
+               
                 iExtender.CloseExtender();
-                ExtenderWrapperIpc.CloseExtenderWrapper();
+                ExtenderWrapperIpc.KillExtenderWrapperProcess();
             }
             catch (Exception e)
             {

+ 0 - 4
OTSSysMgrApp/SemTestForms.Designer.cs

@@ -186,7 +186,6 @@
             this.label17.Size = new System.Drawing.Size(11, 12);
             this.label17.TabIndex = 47;
             this.label17.Text = "R";
-            this.label17.Visible = false;
             this.label17.Click += new System.EventHandler(this.label17_Click);
             // 
             // cbHT
@@ -456,7 +455,6 @@
             this.tbPositionR.Name = "tbPositionR";
             this.tbPositionR.Size = new System.Drawing.Size(88, 23);
             this.tbPositionR.TabIndex = 2;
-            this.tbPositionR.Visible = false;
             // 
             // lblGFWD
             // 
@@ -649,7 +647,6 @@
             this.label16.Size = new System.Drawing.Size(11, 12);
             this.label16.TabIndex = 46;
             this.label16.Text = "R";
-            this.label16.Visible = false;
             // 
             // cbSHT
             // 
@@ -910,7 +907,6 @@
             this.tbSPositionR.Name = "tbSPositionR";
             this.tbSPositionR.Size = new System.Drawing.Size(88, 23);
             this.tbSPositionR.TabIndex = 24;
-            this.tbSPositionR.Visible = false;
             // 
             // label13
             // 

+ 4 - 3
OxfordExtenderWrapper/ExtenderIpcUI.cs

@@ -10,10 +10,10 @@ namespace OxfordExtenderWrapper
 {
    public class ExtenderIpcUI: MarshalByRefObject
     {
-        ExtenderWrapper iExtender;
+        ExtenderWrapper1 iExtender;
         public ExtenderIpcUI()
         {
-            iExtender = new ExtenderWrapper();
+            iExtender = new ExtenderWrapper1();
         }
         public bool ConnectToEDSHardware()
         {
@@ -25,6 +25,7 @@ namespace OxfordExtenderWrapper
         //结束
         public void CloseExtender()
         {
+           
             iExtender.CloseExtender();
 
 
@@ -328,7 +329,7 @@ namespace OxfordExtenderWrapper
             8192
         };
 
-        public double DImagePixelsize { get => iExtender.DImagePixelsize; set => iExtender.DImagePixelsize = value; }
+        public double DImagePixelsize { get => iExtender.GetDImagePixelsize(); set => iExtender.SetDImagePixelsize(value); }
         public float GetStageAtX()
         {
             return (float)iExtender.GetStageAtX();

+ 16 - 15
OxfordExtenderWrapper/ExtenderWrapper.cs

@@ -308,6 +308,7 @@ namespace OxfordExtenderWrapper
         private bool m_StageUpdated;
         private bool m_CollumnUpdated;
         private bool m_ExternalScanUpdated;
+        //private bool m_isconnect;
         //构造函数
         public ExtenderWrapper()
         {
@@ -320,7 +321,7 @@ namespace OxfordExtenderWrapper
                 InitMicroscopeController();
                 InitImageAcquisition();
                 InitXrayAcquistion();
-
+               
                 return true;
             }
             catch (Exception e)
@@ -335,9 +336,13 @@ namespace OxfordExtenderWrapper
         //结束
         public void CloseExtender()
         {
-            CloseMicroscopeController();
-            CloseImageAcquisition();
-            CloaseXrayAcquistion();
+            
+
+                CloseMicroscopeController();
+                CloseImageAcquisition();
+                CloaseXrayAcquistion();
+           
+           
 
 
 
@@ -354,7 +359,7 @@ namespace OxfordExtenderWrapper
             try
             {
                 int lastingTime = 0;
-
+                m_bAcquistionDone = false;
                 imageAcquisitionController.BeginMultipleAcquisition();
                 IEnumerable<IElectronImage> images = imageAcquisitionController.StartAcquisition(imageAcquisitionSettings);
 
@@ -531,10 +536,7 @@ namespace OxfordExtenderWrapper
 
            
             EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreatePointRegion(new System.Windows.Point(p.x * m_dImagePixelsize, p.y * m_dImagePixelsize));
-            //NLog.Logger log = NLog.LogManager.GetCurrentClassLogger();
-            //log.Info("开始XrayStartAcquisition:t=" + p.dMilliSecondsTime.ToString() + "pos=" + "(" + p.x.ToString() + "," + p.y.ToString() + ")");
-
-
+  
             try
             {
                 m_bXrayDone = false;
@@ -746,7 +748,7 @@ namespace OxfordExtenderWrapper
                 if (time2-time1 > EDSColletionTimeOut * 3)
                 {
                     EdSpectrumAcquisitionController.EndMultipleAcquisition();
-                    //log.Warn("XrayStartAcquisition 超时!");
+                 
                 
                     currentCommand.returnType = false;
                     break;
@@ -887,7 +889,7 @@ namespace OxfordExtenderWrapper
         private void OnMicroscopeStageChange(object sender, EventArgs e)
         {
             //m_StageUpdated = true;
-            ReadStage();
+           
         }
 
         //镜筒控制连接或断开时的事件
@@ -910,10 +912,9 @@ namespace OxfordExtenderWrapper
             {
                 if (e.Success)
                 {
-                   
-                    //LogTrace(__FILE__, __LINE__, _T("StageUpdated!"));
+                 
                     m_StageUpdated = true;
-
+                 
                 }
 
             }
@@ -1025,7 +1026,7 @@ namespace OxfordExtenderWrapper
                 {
                     currentCommand.returnType = false;
                     return false;
-                    //break;
+                   
                 }
             }
             return true;

File diff suppressed because it is too large
+ 181 - 611
OxfordExtenderWrapper/ExtenderWrapper1.cs


+ 1 - 1
OxfordExtenderWrapper/Form1.Designer.cs

@@ -1740,7 +1740,7 @@
             this.AutoScroll = true;
             this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
-            this.ClientSize = new System.Drawing.Size(912, 697);
+            this.ClientSize = new System.Drawing.Size(1186, 697);
             this.Controls.Add(this.拍图);
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.groupBox2);

+ 16 - 57
OxfordExtenderWrapper/Form1.cs

@@ -64,7 +64,7 @@ namespace OxfordExtenderWrapper
 
 
             }
-            
+
 
         }
         //获取电压
@@ -375,18 +375,12 @@ namespace OxfordExtenderWrapper
             }
             
             p.ImageData = new byte[0];
-            var thread = new Thread(() =>
-            {
+            
 
-                iExtender.AquisitionImage(ref p);
-            });
-            thread.IsBackground = true;
-            thread.Start();
+           iExtender.AquisitionImage(ref p);
+           
+           
            
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
            
             // 图像对象
            var m_Bitmap = ToGrayBitmap(p.ImageData, p.width, p.height);
@@ -415,17 +409,10 @@ namespace OxfordExtenderWrapper
             p.listElement = listElement;
             p.dMilliSecondsTime = 500;
             p.b_quant = true;
-            var thread = new Thread(() =>
-            {
+           
                
-                iExtender.XrayPointCollecting(ref p);
-            });
-            thread.IsBackground = true;
-            thread.Start();
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
+            iExtender.XrayPointCollecting(ref p);
+           
           
             ShowData(p.XrayData,p. listElement);
            
@@ -500,17 +487,10 @@ namespace OxfordExtenderWrapper
             p.XrayData = new uint[2000];
             p.listElement = listElement;
             p.b_quant = true;
-            var thread = new Thread(() =>
-            {
+            
                
                 iExtender.XrayAreaCollecting(ref p);
-            });
-            thread.IsBackground = true;
-            thread.Start();
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
+           
 
            
             ShowData(p.XrayData, p.listElement);
@@ -548,17 +528,10 @@ namespace OxfordExtenderWrapper
                 p.b_quant = true;
                 points.Add(p);
             }
-            var thread = new Thread(() =>
-            {
+           
                 //Your code here
                 iExtender.CollectXrayByPoints(ref points, 100, true);
-            });
-            thread.IsBackground = true;
-            thread.Start();
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
+           
             
             ShowData(points[0].XrayData, points[0].listElement);
         }
@@ -635,17 +608,10 @@ namespace OxfordExtenderWrapper
             fea.a_listChord = listSeg;
             fea.dMilliSecondsTime = Convert.ToInt32(textTime.Text);
             fea.b_quant = true;
-            var thread = new Thread(() =>
-            {
+          
 
                 iExtender.XrayAreaCollecting(ref fea);
-            });
-            thread.IsBackground = true;
-            thread.Start();
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
+           
             
             ShowData(fea.XrayData, fea.listElement);
 
@@ -709,17 +675,10 @@ namespace OxfordExtenderWrapper
 
             }
 
-            var thread = new Thread(() =>
-            {
+            
                
                 iExtender.CollectXrayByFeatures(ref features, 100, true);
-            });
-            thread.IsBackground = true;
-            thread.Start();
-            while (thread.IsAlive)
-            {
-                Application.DoEvents();
-            }
+           
 
 
             ShowData(features[0].XrayData, features[0].listElement);

+ 3 - 3
OxfordExtenderWrapper/OxfordExtenderWrapper.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <PlatformTarget>x64</PlatformTarget>
     <Prefer32Bit>false</Prefer32Bit>
-    <OutputPath>..\bin\x64\Debug\OxfordExtender\</OutputPath>
+    <OutputPath>..\bin\x64\Release_oxford61\OxfordExtender\</OutputPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|x64'">
     <PlatformTarget>x64</PlatformTarget>
@@ -24,8 +24,8 @@
   <PropertyGroup>
     <StartupObject>OxfordExtenderWrapper.Program</StartupObject>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford62|x64'">
-    <OutputPath>bin\x64\Release_oxford62\</OutputPath>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_oxford61|x64' ">
+    <OutputPath>..\bin\x64\Release_oxford61\OxfordExtender\</OutputPath>
     <PlatformTarget>x64</PlatformTarget>
     <LangVersion>7.3</LangVersion>
   </PropertyGroup>

Some files were not shown because too many files changed in this diff