فهرست منبع

delay loading the OTScontrol hardware.

gsp 3 سال پیش
والد
کامیت
eba57be1c6

+ 8 - 7
OTSCPP/OTSClrInterface/ControlClr/OTSControlFunExport.h

@@ -11,7 +11,8 @@
 - 2017/6/28 1.0.0.0  xiaoxing.zhang  developed SEM Interface
 - 2017/6/28 1.0.0.0  Anna Hao  developed Scan Interface
 - 2017/6/29 1.0.0.0  Anna Hao  developed EDS Interface
-- - 2017/7/3 1.0.0.0  xiaoxing.zhang  Add log for SemInterface 
+- 2017/7/3 1.0.0.0  xiaoxing.zhang  Add log for SemInterface 
+- 2021 gaoshipeng revised. complete the whole interface so that we can get all infomation through this interface in C#.
 */
 
 #include "BSEImg.h"
@@ -33,7 +34,7 @@ using namespace System::Collections::Generic;
 namespace OTSCLRINTERFACE 
 {
 	using namespace OTSController;
-	//using namespace OTSCLRINTERFACE;
+
 	
 
 
@@ -708,22 +709,22 @@ namespace OTSCLRINTERFACE
 		COTSControlFunExport()
 		{
 
-
+			
 			m_pHardWareMgr = new COTSHardwareMgr();
 			m_pSem = (m_pHardWareMgr->GetSemControllerMgrPtr()).get();
 			m_pScan = (m_pHardWareMgr->GetScanControllerPtr()).get();
 			m_pEDS = (m_pHardWareMgr->GetEDSControllerPtr()).get();
-
+		
 
 		}
 	
 		 COTSSemBase* m_pSem;
-		 //Scan
+		
 		 COTSScanBase* m_pScan;
-		 //EDS
+		
 		 COTSEDSBase* m_pEDS;
 
-		 //COTSHardwareMgr
+		
 		 COTSHardwareMgr* m_pHardWareMgr;
 
 		 static COTSControlFunExport^ theInstance=nullptr;

+ 3 - 1
OTSCPP/OTSControl/COTSHardwareMgr.cpp

@@ -102,6 +102,7 @@ namespace OTSController {
 
 					break;
 			}
+			//connect the hardware when the singleton instanced ,make it an enforcement.
 			m_SemBasePtr->Connect();
 		}
 		
@@ -157,6 +158,7 @@ namespace OTSController {
 					break;
 			}
 			m_EDSPtr->Init();
+			
 		}
 		
 	
@@ -208,7 +210,7 @@ namespace OTSController {
 
 					break;
 			}
-
+			//connect the hardware when the singleton instanced ,make it an enforcement.
 			m_SCanPtr->Init();
 
 		}

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

@@ -51,8 +51,6 @@ namespace OTSModelSharp
             }
       
 
-            //special treatment.
-            //ParticleSpecialTreatment();
 
 
             log.Info("Begin to Calculate the image property of every particle!");

+ 3 - 3
OTSIncAMeasureApp/0-OTSModel/Measure/DBDataTransition/GenInfoDB.cs

@@ -155,11 +155,11 @@ namespace OTSModelSharp
 
         public bool InsertTimeStampRow(string a_sItemName, string a_sItemComment /*= nullptr*/)
         {
-            DateTime m_time = DateTime.Now;
+            //DateTime m_time = DateTime.Now;
             //GetLocalTime(m_time);
 
-            string sDateTime =
-            string.Format( "{0:G}", m_time);
+            string sDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            //string.Format( "{0:G}", m_time);
            
             return InsertRow(a_sItemName, sDateTime, a_sItemComment);
 

+ 6 - 36
OTSIncAMeasureApp/1-OTSMeasure/OTSMeasureDisplayResult.cs

@@ -87,43 +87,17 @@ namespace OTSMeasureApp
         {
             try
             {
-                #region 注释弹出当前测量信息窗体
-                //注释弹出当前测量信息窗体
-                //SMSR_RET_DATA smsrRectData = (SMSR_RET_DATA)sender;
-                ////判断窗口是否打开
-                //if (e.ProgressPercentage == 0)
-                //{
-                //    if (!CheckFormIsOpen("MeasureProgressInfoWindow"))
-                //    {
-                //        if (measureProgressInfoWindow.IsDisposed)
-                //        {
-                //            //实例窗体
-                //            measureProgressInfoWindow = new MeasureProgressInfoWindow();
-                //        }
-                //        measureProgressInfoWindow.Activate();
-                //        measureProgressInfoWindow.Show();
-                //        //设置开始时间与当前样品名称
-                //        SetStartTime(startTimePara);
-                //        //SetSampleName(currentSampleName);
-                //    }
-                //}   
-                #endregion
+              
                 if (e.ProgressPercentage == (int)ProgressState.MeasureCheckReport)
                 {
-                    try
-                    {
+                    
                         MeasureResultInfo(MeasureResultMsrData);
-                    }
-                    catch (Exception ex)
-                    {
-                        log.Error("OTSIncAMeasureApp_backgroundWorker_ProgressChanged:--Open the measurement results list window - error log:" + ex.ToString());
-                    }
+                   
                 }
                 //测量结果
                 if (e.ProgressPercentage == (int)ProgressState.MeasureResult)
                 {
-                    try
-                    {
+                   
                         if (m_OTSMeasureResultWindow == null)
                         {
                             //实例窗体
@@ -140,11 +114,7 @@ namespace OTSMeasureApp
                         List<CMsrResultItem> cMsrResultItemClrListTemp = cMsrResultItemClrList;
                         //设置测量状态数据列表
                         SetMeasureListInfo(cMsrResultItemClrList);
-                    }
-                    catch (Exception ex)
-                    {
-                        log.Error("OTSIncAMeasureApp_backgroundWorker_ProgressChanged:--Open the measurement results list window - error log:" + ex.ToString());
-                    }
+                   
                 }
 
             }
@@ -532,7 +502,7 @@ namespace OTSMeasureApp
                                 {
                                     string inprocessEndTime = SMsrData.STMThreadStu.csMsrEndTime;
                                     SetMeasureResultInfo(SMsrData);
-
+                                    MeasureResultMsrData = SMsrData;
 
                                     m_bgWorker.ReportProgress((int)ProgressState.MeasureCheckReport, SMsrData);
                                     //激活跳转至报告程序按钮

+ 5 - 3
OTSIncAMeasureApp/ServiceCenter/EDSController.cs

@@ -23,8 +23,8 @@ namespace OTSModelSharp.ServiceInterface
         public EDSController()
         {
          
-            eds = SemController.hw;
-            Init();
+           
+           
         }
 
 
@@ -32,7 +32,7 @@ namespace OTSModelSharp.ServiceInterface
         public void GetXRayByFeatures(List<COTSParticleClr> a_listParticles,  double a_nXRayAQTime, bool a_bElementInfo)
         {
 
-           
+            Init();
 
             COTSParticleClr[] parts = a_listParticles.ToArray();
            
@@ -46,6 +46,7 @@ namespace OTSModelSharp.ServiceInterface
 
         public void GetXRayByPoints(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
         {
+            Init();
             int xrayNum = a_listParticles.Count;
             Point[] Ps = new Point[xrayNum];
 
@@ -66,6 +67,7 @@ namespace OTSModelSharp.ServiceInterface
 
         public bool Init()
         {
+            eds = SemController.hw;
             return eds.EDSInit();
         }
     }

+ 6 - 2
OTSIncAMeasureApp/ServiceCenter/ScanController.cs

@@ -16,12 +16,13 @@ namespace OTSModelSharp.ServiceInterface
 
         public ScanController()
         {
-            this.scan =  SemController.hw;
+          
            
         }
 
         public CBSEImgClr AcquireBSEImage(int matrixIndex, int reads, int dwell)
         {
+            Init();
             CBSEImgClr bse = new CBSEImgClr();
             scan.AcquireBSEImage(matrixIndex, reads, dwell, ref bse);
        
@@ -30,18 +31,21 @@ namespace OTSModelSharp.ServiceInterface
 
         public bool Init()
         {
-          return  scan.ScanInit();
+            this.scan = SemController.hw;
+            return  scan.ScanInit();
         }
 
    
 
         public bool SetDwellTime(long val)
         {
+            Init();
             return scan.SetDwellTime((int)val);
         }
 
         public bool SetImageSize(int width,int height)
         {
+            Init();
             return scan.SetImageSize(width,height);
         }
     }

+ 22 - 10
OTSIncAMeasureApp/ServiceCenter/SemController.cs

@@ -14,16 +14,16 @@ namespace OTSModelSharp.ServiceInterface
 
         public SemController()
         {
-            if (hw == null)
-            {
-                hw = OTSCLRINTERFACE.COTSControlFunExport.GetControllerInstance();
-            }
+            
             
         }
 
         public bool Connect()
         {
-          
+            if (hw == null)
+            {
+                hw = OTSCLRINTERFACE.COTSControlFunExport.GetControllerInstance();
+            }
             if (hw.IsConnected())
             {
                 return true;
@@ -36,12 +36,15 @@ namespace OTSModelSharp.ServiceInterface
 
         public bool DisConnect()
         {
-         
-            return hw.DisconnectSem();
+            if (hw != null)
+            {
+                return hw.DisconnectSem();
+            }
+            return true;
         }
         public bool GetSEMDataGnrFromHw(ref CSEMDataGnr SemDataGnr)
         {
-            
+            Connect();
             double kv=0, brightness=0, contrast=0;
             hw.GetSemHighTension(ref kv);
             hw.GetSemBrightness(ref brightness);
@@ -52,17 +55,20 @@ namespace OTSModelSharp.ServiceInterface
         }
         public bool GetMagnification(ref double a_dMagnification)
         {
+            Connect();
             return hw.GetSemMagnification(ref a_dMagnification);
              
         }
 
         public bool GetScanFieldSize(ref double dScanFieldSizeX, ref double dScanFieldSizeY)
         {
-          return  hw.GetSemScanFieldSize(ref dScanFieldSizeX, ref dScanFieldSizeY);
+            Connect();
+            return  hw.GetSemScanFieldSize(ref dScanFieldSizeX, ref dScanFieldSizeY);
         }
 
         public bool GetSemPositionXY(ref double a_dPositionX, ref double a_dPositionY, ref double a_dPositionR)
         {
+            Connect();
             return hw.GetSemPositionXY(ref a_dPositionX, ref a_dPositionY, ref a_dPositionR);
         }
 
@@ -70,6 +76,7 @@ namespace OTSModelSharp.ServiceInterface
 
         public bool GetWorkingDistance(ref double a_distance)
         {
+            Connect();
             return hw.GetSemWorkingDistance(ref a_distance);
         }
 
@@ -81,29 +88,34 @@ namespace OTSModelSharp.ServiceInterface
 
         public bool MoveSEMToPoint(Point poi, double rotation)
         {
+            Connect();
             return hw.MoveSEMToPoint(poi.X, poi.Y, rotation);
         }
 
         public bool SetMagnification(double a_dMagnification)
         {
-             //hw.SetMagnification(a_dMagnification);
+            Connect();
+            //hw.SetMagnification(a_dMagnification);
             hw.SetSemMagnification(a_dMagnification);
             return true;
         }
 
         public bool SetScanExternal(bool b)
         {
+            Connect();
             //int seValue = b ? 1 : 0;
             return hw.SetSemScanExternal(b);
         }
 
         public bool SetWorkingDistance(double a_distance)
         {
+            Connect();
             return hw.SetSemWorkingDistance(a_distance);
         }
 
         public OTSCLRINTERFACE.COTSControlFunExport GetHardwareInterface()
         {
+            Connect();
             return hw;
         }
     }

+ 22 - 18
OTSIncAReportApp/App.config

@@ -1,53 +1,57 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
-    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
+    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
   </configSections>
   <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
   </startup>
   <connectionStrings>
     <!--<add name="XMLFilePath" connectionString="TestData.XML"/>-->
-    <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML"/>
+    <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML" />
   </connectionStrings>
   <nlog>
     <!-- optional, add some variables
   https://github.com/nlog/NLog/wiki/Configuration-file#variables
   -->
-    <variable name="myvar" value="myvalue"/>
+    <variable name="myvar" value="myvalue" />
     <!--
   See https://github.com/nlog/nlog/wiki/Configuration-file
   for information on customizing logging rules and outputs.
    -->
     <targets async="true">
-      <target type="File" name="file" fileName="${basedir}/Log/Nlogs/OTSReport ${shortdate}.log" layout="${longdate} ${message}"/>
-      <target name="control" type="RichTextBox" controlName="richTextBox_Nlog" formName="OutputNlog" maxLines="10000" autoScroll="true" useDefaultRowColoringRules="true" layout="${longdate} ${message}"/>
+      <target type="File" name="file" fileName="${basedir}/Log/Nlogs/OTSReport ${shortdate}.log" layout="${longdate} ${message}" />
+      <target name="control" type="RichTextBox" controlName="richTextBox_Nlog" formName="OutputNlog" maxLines="10000" autoScroll="true" useDefaultRowColoringRules="true" layout="${longdate} ${message}" />
     </targets>
     <rules>
       <!-- add your logging rules here -->
-      <logger name="*" minlevel="Trace" writeTo="control"/>
-      <logger name="*" minlevel="Trace" writeTo="File"/>
+      <logger name="*" minlevel="Trace" writeTo="control" />
+      <logger name="*" minlevel="Trace" writeTo="File" />
     </rules>
   </nlog>
   <runtime>
-    <gcConcurrent enabled="true"/>
+    <gcConcurrent enabled="true" />
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-      <publisherPolicy apply="yes"/>
-      <probing privatePath="ReportClrDll\"/>
+      <publisherPolicy apply="yes" />
+      <probing privatePath="ReportClrDll\" />
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
   <entityFramework>
     <providers>
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
-      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
     </providers>
   </entityFramework>
   <system.data>
     <DbProviderFactories>
-      <remove invariant="System.Data.SQLite.EF6"/>
-      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
-    <remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
+      <remove invariant="System.Data.SQLite.EF6" />
+      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+    <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
   </system.data>
 </configuration>

+ 19 - 5
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="..\packages\OpenCvSharp4.runtime.win.4.5.5.20211231\build\netstandard\OpenCvSharp4.runtime.win.props" Condition="Exists('..\packages\OpenCvSharp4.runtime.win.4.5.5.20211231\build\netstandard\OpenCvSharp4.runtime.win.props')" />
   <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
@@ -14,6 +15,8 @@
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <TargetFrameworkProfile />
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
     <PublishUrl>publish\</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Disk</InstallFrom>
@@ -28,8 +31,6 @@
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>x86</PlatformTarget>
@@ -179,12 +180,11 @@
       <HintPath>..\OpenDll\WordApiDll\office.dll</HintPath>
     </Reference>
     <Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Bin\x64\Debug\OpenCvSharp.dll</HintPath>
+      <HintPath>..\packages\OpenCvSharp4.4.5.5.20211231\lib\netstandard2.0\OpenCvSharp.dll</HintPath>
     </Reference>
     <Reference Include="OpenCvSharp.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Bin\x64\Debug\OpenCvSharp.Extensions.dll</HintPath>
+      <HintPath>..\packages\OpenCvSharp.Extensions.dll</HintPath>
     </Reference>
     <Reference Include="OTS.WinFormsUI.Docking">
       <HintPath>..\Bin\x64\Debug\OTS.WinFormsUI.Docking.dll</HintPath>
@@ -204,6 +204,9 @@
       <Private>False</Private>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data.SQLite, Version=1.0.115.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64">
@@ -215,6 +218,16 @@
     <Reference Include="System.Data.SQLite.Linq, Version=1.0.115.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Data.SQLite.Linq.1.0.115.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
     </Reference>
+    <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.ServiceModel" />
     <Reference Include="System.ServiceModel.Web" />
@@ -1361,6 +1374,7 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
     <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
+    <Error Condition="!Exists('..\packages\OpenCvSharp4.runtime.win.4.5.5.20211231\build\netstandard\OpenCvSharp4.runtime.win.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenCvSharp4.runtime.win.4.5.5.20211231\build\netstandard\OpenCvSharp4.runtime.win.props'))" />
   </Target>
   <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
 </Project>

+ 7 - 0
OTSIncAReportApp/packages.config

@@ -1,8 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="EntityFramework" version="6.4.4" targetFramework="net472" />
+  <package id="OpenCvSharp4" version="4.5.5.20211231" targetFramework="net462" />
+  <package id="OpenCvSharp4.runtime.win" version="4.5.5.20211231" targetFramework="net462" />
+  <package id="OpenCvSharp4.Windows" version="4.5.5.20211231" targetFramework="net462" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net462" />
   <package id="System.Collections" version="4.3.0" targetFramework="net472" />
   <package id="System.Data.SQLite.EF6" version="1.0.115.0" targetFramework="net472" />
   <package id="System.Data.SQLite.Linq" version="1.0.115.0" targetFramework="net472" />
   <package id="System.Data.SQLite.x64" version="1.0.115.0" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.4" targetFramework="net462" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
 </packages>

+ 1 - 1
OTSIncAReportTemplate/OTSIncAReportTemplate.csproj

@@ -68,7 +68,7 @@
     <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|x64'">
-    <OutputPath>..\Bin\x64\%24%28Configuration%29\</OutputPath>
+    <OutputPath>..\bin\x64\Release_oxford50\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>

+ 16 - 8
OTSIncAReportTemplate/app.config

@@ -1,22 +1,30 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
   </configSections>
   <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
   </startup>
   <entityFramework>
     <providers>
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
-      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
     </providers>
   </entityFramework>
   <system.data>
     <DbProviderFactories>
-      <remove invariant="System.Data.SQLite.EF6"/>
-      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
-    <remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
+      <remove invariant="System.Data.SQLite.EF6" />
+      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+    <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
   </system.data>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-1.0.86.0" newVersion="1.0.86.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
 </configuration>

+ 3 - 11
OTSSysMgrApp/SemTestForms.cs

@@ -45,21 +45,13 @@ namespace OTSSysMgrApp
             {
                 cfun =  COTSControlFunExport.GetControllerInstance();
             }
-            //初始化其他参数
-            Init();
+         
             //国际化
             lan = new OTSSysMgrTools.Language(this);
             table = lan.GetNameTable(this.Name);
         }
-        /// <summary>
-        /// 初始化其他参数
-        /// </summary>
-        public void Init()
-        {
-            //获取模拟状态
-            //IsSimulationStatus = cfun.IsSimulationStatus();
-
-        }
+   
+ 
         #endregion
 
         #region 保存设置