Explorar o código

degrade openCVsharp to 4.2 + remove meadianblur while calculating particle's graghic property+adapt to win7 professional

gsp hai 1 ano
pai
achega
3f30e04090

+ 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
Bin/x64/Debug/Config/ReportTemplate/ReportTemplateConfig.xml

@@ -1,7 +1,7 @@
 <XmlConfig>
   <M_SY>
     <str_tb_ZBT>Inca Report</str_tb_ZBT>
-    <str_tb_FBT>济源钢铁</str_tb_FBT>
+    <str_tb_FBT>北满特钢</str_tb_FBT>
     <str_tb_YPBH>0003</str_tb_YPBH>
     <str_tb_CKBZ>GB30834</str_tb_CKBZ>
     <b_ck_ypsm>True</b_ck_ypsm>
@@ -119,7 +119,7 @@
     </list_str_kllb_DeleteClass>
   </M_KLLBXX>
   <M_address>
-    <Path>F:\OTS2_0\Bin\x64\OTSRelease_oxford61AndBruker2.4\Release_oxford61\Config\ProData\ReportTemplateConfig.xml</Path>
+    <Path>./Config/ReportTemplate/ReportTemplateConfig.xml</Path>
   </M_address>
   <M_JZWZB>
     <b_ck_surface>True</b_ck_surface>

+ 1 - 1
OTSCPP/OTSControl/OTSControl.vcxproj

@@ -836,7 +836,7 @@
   </ItemGroup>
   <ItemGroup>
     <Reference Include="OINA.Extender">
-      <HintPath>..\OpenDll\OxfordApi61Dll\OINA.Extender.dll</HintPath>
+      <HintPath>..\OpenDll\OxfordApi50Dll\OINA.Extender.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />

+ 2 - 2
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -1721,11 +1721,11 @@ namespace OTSIMGPROC
 		}		
 	//--------abstract the contour of the particle.
 		Mat cvcopyImg;
-		medianBlur(particleImage, cvcopyImg, 5);//smooth the edge
+		//medianBlur(particleImage, cvcopyImg, 5);//smooth the edge
 	
 		vector<vector<Point>>contours;
 	
-		findContours(cvcopyImg, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
+		findContours(particleImage, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
 		if (contours.size()==0)// the particle is too odd that openCV can't find a contour of it. Then we take the upright rect of the particle as it's minArea rect.
 		{
 			double w = 0, h = 0;

+ 21 - 15
OTSExtremum/GridForm.Designer.cs

@@ -62,11 +62,12 @@
             this.G,
             this.H,
             this.I});
-            this.dtgrid.Location = new System.Drawing.Point(12, 50);
+            this.dtgrid.Location = new System.Drawing.Point(8, 33);
+            this.dtgrid.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.dtgrid.Name = "dtgrid";
             this.dtgrid.ReadOnly = true;
             this.dtgrid.RowTemplate.Height = 30;
-            this.dtgrid.Size = new System.Drawing.Size(1565, 801);
+            this.dtgrid.Size = new System.Drawing.Size(1043, 534);
             this.dtgrid.TabIndex = 0;
             // 
             // A
@@ -127,26 +128,29 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(377, 9);
+            this.label1.Location = new System.Drawing.Point(251, 6);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(460, 24);
+            this.label1.Size = new System.Drawing.Size(314, 16);
             this.label1.TabIndex = 1;
             this.label1.Text = "夹杂物长度、概率和所计算出的统计参数";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(1127, 15);
+            this.label2.Location = new System.Drawing.Point(751, 10);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(98, 18);
+            this.label2.Size = new System.Drawing.Size(65, 12);
             this.label2.TabIndex = 2;
             this.label2.Text = "单位为微米";
             // 
             // btnChart
             // 
-            this.btnChart.Location = new System.Drawing.Point(1393, 4);
+            this.btnChart.Location = new System.Drawing.Point(929, 3);
+            this.btnChart.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btnChart.Name = "btnChart";
-            this.btnChart.Size = new System.Drawing.Size(75, 40);
+            this.btnChart.Size = new System.Drawing.Size(50, 27);
             this.btnChart.TabIndex = 3;
             this.btnChart.Text = "分析图";
             this.btnChart.UseVisualStyleBackColor = true;
@@ -154,9 +158,10 @@
             // 
             // btnLmax
             // 
-            this.btnLmax.Location = new System.Drawing.Point(1482, 4);
+            this.btnLmax.Location = new System.Drawing.Point(988, 3);
+            this.btnLmax.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btnLmax.Name = "btnLmax";
-            this.btnLmax.Size = new System.Drawing.Size(94, 40);
+            this.btnLmax.Size = new System.Drawing.Size(63, 27);
             this.btnLmax.TabIndex = 4;
             this.btnLmax.Text = "极值分布";
             this.btnLmax.UseVisualStyleBackColor = true;
@@ -164,9 +169,10 @@
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(1300, 4);
+            this.button1.Location = new System.Drawing.Point(867, 3);
+            this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 40);
+            this.button1.Size = new System.Drawing.Size(50, 27);
             this.button1.TabIndex = 5;
             this.button1.Text = "导出";
             this.button1.UseVisualStyleBackColor = true;
@@ -175,17 +181,17 @@
             // 
             // GridForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1588, 863);
+            this.ClientSize = new System.Drawing.Size(963, 575);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.btnLmax);
             this.Controls.Add(this.btnChart);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.dtgrid);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.MaximizeBox = false;
             this.Name = "GridForm";
             this.Text = "参数统计";

+ 9 - 5
OTSIncAMeasureApp/App.config

@@ -9,10 +9,10 @@
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
   <connectionStrings>
-    <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML"/>
-    <add name="LogAppPath" connectionString="Log\\Nlog"/>
-    <add name="LogPath" connectionString="Log\\Nlog"/>
-    <add name="XMLFileName" connectionString="Config/ProData/HardwareConfig.xml"/>
+    <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML" />
+    <add name="LogAppPath" connectionString="Log\\Nlog" />
+    <add name="LogPath" connectionString="Log\\Nlog" />
+    <add name="XMLFileName" connectionString="Config/ProData/HardwareConfig.xml" />
   </connectionStrings>
   <nlog>
     <!-- optional, add some variables
@@ -53,12 +53,16 @@
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="SQLitePCLRaw.provider.e_sqlite3" publicKeyToken="9c301db686d0bd12" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-2.0.7.1395" newVersion="2.0.7.1395" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 29 - 2
OTSIncAMeasureApp/OTSIncAMeasureApp.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.2.0.20191223\build\net\OpenCvSharp4.runtime.win.props" Condition="Exists('..\packages\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\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>
@@ -213,8 +214,16 @@
       <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>..\packages\OpenCvSharpOriginal\OpenCvSharp.dll</HintPath>
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="OpenCvSharp.Blob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.Blob.dll</HintPath>
+    </Reference>
+    <Reference Include="OpenCvSharp.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="OpenCvSharp.UserInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.UserInterface.dll</HintPath>
     </Reference>
     <Reference Include="OTS.WinFormsUI.Docking, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -229,6 +238,9 @@
       <HintPath>..\OpenDll\WordApiDll\SourceGrid.dll</HintPath>
     </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.Configuration" />
     <Reference Include="System.Core" />
@@ -244,8 +256,22 @@
     </Reference>
     <Reference Include="System.Design" />
     <Reference Include="System.Management" />
+    <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.Remoting" />
     <Reference Include="System.Security" />
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Windows.Forms.Ribbon, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -937,6 +963,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.2.0.20191223\build\net\OpenCvSharp4.runtime.win.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\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')" />
   <PropertyGroup>

+ 7 - 0
OTSIncAMeasureApp/packages.config

@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="EntityFramework" version="6.4.4" targetFramework="net472" />
+  <package id="OpenCvSharp4" version="4.2.0.20191223" targetFramework="net48" />
+  <package id="OpenCvSharp4.runtime.win" version="4.2.0.20191223" targetFramework="net48" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
   <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="net48" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
 </packages>

+ 88 - 52
OTSIncAReportApp/1-UI/frmReMeasure.Designer.cs

@@ -31,6 +31,10 @@ namespace OTSIncAReportApp
         /// </summary>
         private void InitializeComponent()
         {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
             this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
             this.LB_SCANTIME = new System.Windows.Forms.Label();
             this.NUD_SCANTIME = new System.Windows.Forms.NumericUpDown();
@@ -95,7 +99,7 @@ namespace OTSIncAReportApp
             this.tableLayoutPanel1.Controls.Add(this.LB_IMGSCANSPEED, 0, 0);
             this.tableLayoutPanel1.Controls.Add(this.IDC_COMBO_IMGSCANSPEED, 1, 0);
             this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 16);
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 17);
             this.tableLayoutPanel1.Name = "tableLayoutPanel1";
             this.tableLayoutPanel1.RowCount = 6;
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
@@ -104,24 +108,24 @@ namespace OTSIncAReportApp
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(239, 160);
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(239, 145);
             this.tableLayoutPanel1.TabIndex = 0;
             // 
             // LB_SCANTIME
             // 
             this.LB_SCANTIME.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_SCANTIME.AutoSize = true;
-            this.LB_SCANTIME.Location = new System.Drawing.Point(4, 58);
+            this.LB_SCANTIME.Location = new System.Drawing.Point(5, 54);
             this.LB_SCANTIME.Name = "LB_SCANTIME";
-            this.LB_SCANTIME.Size = new System.Drawing.Size(139, 13);
+            this.LB_SCANTIME.Size = new System.Drawing.Size(137, 12);
             this.LB_SCANTIME.TabIndex = 0;
             this.LB_SCANTIME.Text = "能谱扫描时间(毫秒):";
             // 
             // NUD_SCANTIME
             // 
             this.NUD_SCANTIME.Anchor = System.Windows.Forms.AnchorStyles.None;
-            this.NUD_SCANTIME.Location = new System.Drawing.Point(150, 55);
+            this.NUD_SCANTIME.Location = new System.Drawing.Point(150, 51);
             this.NUD_SCANTIME.Maximum = new decimal(new int[] {
             1000000,
             0,
@@ -133,7 +137,7 @@ namespace OTSIncAReportApp
             0,
             0});
             this.NUD_SCANTIME.Name = "NUD_SCANTIME";
-            this.NUD_SCANTIME.Size = new System.Drawing.Size(85, 20);
+            this.NUD_SCANTIME.Size = new System.Drawing.Size(85, 21);
             this.NUD_SCANTIME.TabIndex = 2;
             this.NUD_SCANTIME.Value = new decimal(new int[] {
             1000,
@@ -145,9 +149,9 @@ namespace OTSIncAReportApp
             // 
             this.LB_HAND.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_HAND.AutoSize = true;
-            this.LB_HAND.Location = new System.Drawing.Point(40, 138);
+            this.LB_HAND.Location = new System.Drawing.Point(41, 126);
             this.LB_HAND.Name = "LB_HAND";
-            this.LB_HAND.Size = new System.Drawing.Size(67, 13);
+            this.LB_HAND.Size = new System.Drawing.Size(65, 12);
             this.LB_HAND.TabIndex = 0;
             this.LB_HAND.Text = "手动处理:";
             // 
@@ -157,7 +161,7 @@ namespace OTSIncAReportApp
             this.CB_HAND.AutoSize = true;
             this.CB_HAND.Checked = true;
             this.CB_HAND.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.CB_HAND.Location = new System.Drawing.Point(185, 138);
+            this.CB_HAND.Location = new System.Drawing.Point(185, 125);
             this.CB_HAND.Name = "CB_HAND";
             this.CB_HAND.Size = new System.Drawing.Size(15, 14);
             this.CB_HAND.TabIndex = 6;
@@ -167,9 +171,9 @@ namespace OTSIncAReportApp
             // 
             this.LB_partFun.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_partFun.AutoSize = true;
-            this.LB_partFun.Location = new System.Drawing.Point(28, 110);
+            this.LB_partFun.Location = new System.Drawing.Point(29, 102);
             this.LB_partFun.Name = "LB_partFun";
-            this.LB_partFun.Size = new System.Drawing.Size(91, 13);
+            this.LB_partFun.Size = new System.Drawing.Size(89, 12);
             this.LB_partFun.TabIndex = 0;
             this.LB_partFun.Text = "颗粒提取方法:";
             // 
@@ -181,18 +185,18 @@ namespace OTSIncAReportApp
             this.CB_partFun.Items.AddRange(new object[] {
             "方法一",
             "方法二"});
-            this.CB_partFun.Location = new System.Drawing.Point(150, 107);
+            this.CB_partFun.Location = new System.Drawing.Point(150, 99);
             this.CB_partFun.Name = "CB_partFun";
-            this.CB_partFun.Size = new System.Drawing.Size(85, 21);
+            this.CB_partFun.Size = new System.Drawing.Size(85, 20);
             this.CB_partFun.TabIndex = 3;
             // 
             // LB_XRAYSCANMODE
             // 
             this.LB_XRAYSCANMODE.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_XRAYSCANMODE.AutoSize = true;
-            this.LB_XRAYSCANMODE.Location = new System.Drawing.Point(28, 84);
+            this.LB_XRAYSCANMODE.Location = new System.Drawing.Point(29, 78);
             this.LB_XRAYSCANMODE.Name = "LB_XRAYSCANMODE";
-            this.LB_XRAYSCANMODE.Size = new System.Drawing.Size(91, 13);
+            this.LB_XRAYSCANMODE.Size = new System.Drawing.Size(89, 12);
             this.LB_XRAYSCANMODE.TabIndex = 0;
             this.LB_XRAYSCANMODE.Text = "颗粒扫描方式:";
             // 
@@ -201,27 +205,27 @@ namespace OTSIncAReportApp
             this.IDC_COMBO_XRAYSCANMODE.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.IDC_COMBO_XRAYSCANMODE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_XRAYSCANMODE.FormattingEnabled = true;
-            this.IDC_COMBO_XRAYSCANMODE.Location = new System.Drawing.Point(150, 81);
+            this.IDC_COMBO_XRAYSCANMODE.Location = new System.Drawing.Point(150, 75);
             this.IDC_COMBO_XRAYSCANMODE.Name = "IDC_COMBO_XRAYSCANMODE";
-            this.IDC_COMBO_XRAYSCANMODE.Size = new System.Drawing.Size(85, 21);
+            this.IDC_COMBO_XRAYSCANMODE.Size = new System.Drawing.Size(85, 20);
             this.IDC_COMBO_XRAYSCANMODE.TabIndex = 3;
             // 
             // LB_Outspread
             // 
             this.LB_Outspread.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_Outspread.AutoSize = true;
-            this.LB_Outspread.Location = new System.Drawing.Point(22, 32);
+            this.LB_Outspread.Location = new System.Drawing.Point(23, 30);
             this.LB_Outspread.Name = "LB_Outspread";
-            this.LB_Outspread.Size = new System.Drawing.Size(103, 13);
+            this.LB_Outspread.Size = new System.Drawing.Size(101, 12);
             this.LB_Outspread.TabIndex = 0;
             this.LB_Outspread.Text = "图像外扩像数值:";
             // 
             // NUD_Outspread
             // 
             this.NUD_Outspread.Anchor = System.Windows.Forms.AnchorStyles.None;
-            this.NUD_Outspread.Location = new System.Drawing.Point(150, 29);
+            this.NUD_Outspread.Location = new System.Drawing.Point(150, 27);
             this.NUD_Outspread.Name = "NUD_Outspread";
-            this.NUD_Outspread.Size = new System.Drawing.Size(85, 20);
+            this.NUD_Outspread.Size = new System.Drawing.Size(85, 21);
             this.NUD_Outspread.TabIndex = 2;
             this.NUD_Outspread.Value = new decimal(new int[] {
             50,
@@ -233,9 +237,9 @@ namespace OTSIncAReportApp
             // 
             this.LB_IMGSCANSPEED.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.LB_IMGSCANSPEED.AutoSize = true;
-            this.LB_IMGSCANSPEED.Location = new System.Drawing.Point(28, 6);
+            this.LB_IMGSCANSPEED.Location = new System.Drawing.Point(29, 6);
             this.LB_IMGSCANSPEED.Name = "LB_IMGSCANSPEED";
-            this.LB_IMGSCANSPEED.Size = new System.Drawing.Size(91, 13);
+            this.LB_IMGSCANSPEED.Size = new System.Drawing.Size(89, 12);
             this.LB_IMGSCANSPEED.TabIndex = 0;
             this.LB_IMGSCANSPEED.Text = "图像扫描精度:";
             // 
@@ -246,15 +250,15 @@ namespace OTSIncAReportApp
             this.IDC_COMBO_IMGSCANSPEED.FormattingEnabled = true;
             this.IDC_COMBO_IMGSCANSPEED.Location = new System.Drawing.Point(150, 3);
             this.IDC_COMBO_IMGSCANSPEED.Name = "IDC_COMBO_IMGSCANSPEED";
-            this.IDC_COMBO_IMGSCANSPEED.Size = new System.Drawing.Size(85, 21);
+            this.IDC_COMBO_IMGSCANSPEED.Size = new System.Drawing.Size(85, 20);
             this.IDC_COMBO_IMGSCANSPEED.TabIndex = 3;
             // 
             // groupBox_img
             // 
             this.groupBox_img.Controls.Add(this.pictureBox_part);
-            this.groupBox_img.Location = new System.Drawing.Point(2, 259);
+            this.groupBox_img.Location = new System.Drawing.Point(2, 239);
             this.groupBox_img.Name = "groupBox_img";
-            this.groupBox_img.Size = new System.Drawing.Size(468, 476);
+            this.groupBox_img.Size = new System.Drawing.Size(468, 439);
             this.groupBox_img.TabIndex = 1;
             this.groupBox_img.TabStop = false;
             this.groupBox_img.Text = "颗粒图片";
@@ -262,9 +266,9 @@ namespace OTSIncAReportApp
             // pictureBox_part
             // 
             this.pictureBox_part.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pictureBox_part.Location = new System.Drawing.Point(3, 16);
+            this.pictureBox_part.Location = new System.Drawing.Point(3, 17);
             this.pictureBox_part.Name = "pictureBox_part";
-            this.pictureBox_part.Size = new System.Drawing.Size(462, 457);
+            this.pictureBox_part.Size = new System.Drawing.Size(462, 419);
             this.pictureBox_part.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox_part.TabIndex = 0;
             this.pictureBox_part.TabStop = false;
@@ -284,16 +288,16 @@ namespace OTSIncAReportApp
             this.richTextBox_process.Location = new System.Drawing.Point(3, 3);
             this.richTextBox_process.Name = "richTextBox_process";
             this.richTextBox_process.ReadOnly = true;
-            this.richTextBox_process.Size = new System.Drawing.Size(353, 199);
+            this.richTextBox_process.Size = new System.Drawing.Size(353, 181);
             this.richTextBox_process.TabIndex = 4;
             this.richTextBox_process.Text = "";
             // 
             // groupBox_state
             // 
             this.groupBox_state.Controls.Add(this.tableLayoutPanel2);
-            this.groupBox_state.Location = new System.Drawing.Point(721, 510);
+            this.groupBox_state.Location = new System.Drawing.Point(721, 471);
             this.groupBox_state.Name = "groupBox_state";
-            this.groupBox_state.Size = new System.Drawing.Size(365, 224);
+            this.groupBox_state.Size = new System.Drawing.Size(365, 207);
             this.groupBox_state.TabIndex = 5;
             this.groupBox_state.TabStop = false;
             this.groupBox_state.Text = "测量状态";
@@ -305,19 +309,19 @@ namespace OTSIncAReportApp
             this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
             this.tableLayoutPanel2.Controls.Add(this.richTextBox_process, 0, 0);
             this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 16);
+            this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17);
             this.tableLayoutPanel2.Name = "tableLayoutPanel2";
             this.tableLayoutPanel2.RowCount = 1;
             this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
-            this.tableLayoutPanel2.Size = new System.Drawing.Size(359, 205);
+            this.tableLayoutPanel2.Size = new System.Drawing.Size(359, 187);
             this.tableLayoutPanel2.TabIndex = 1;
             // 
             // groupBox_param
             // 
             this.groupBox_param.Controls.Add(this.tableLayoutPanel1);
-            this.groupBox_param.Location = new System.Drawing.Point(473, 510);
+            this.groupBox_param.Location = new System.Drawing.Point(473, 471);
             this.groupBox_param.Name = "groupBox_param";
-            this.groupBox_param.Size = new System.Drawing.Size(245, 179);
+            this.groupBox_param.Size = new System.Drawing.Size(245, 165);
             this.groupBox_param.TabIndex = 6;
             this.groupBox_param.TabStop = false;
             this.groupBox_param.Text = "测量参数";
@@ -327,7 +331,7 @@ namespace OTSIncAReportApp
             this.BTN_NO.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.BTN_NO.Location = new System.Drawing.Point(86, 4);
             this.BTN_NO.Name = "BTN_NO";
-            this.BTN_NO.Size = new System.Drawing.Size(70, 34);
+            this.BTN_NO.Size = new System.Drawing.Size(70, 31);
             this.BTN_NO.TabIndex = 1;
             this.BTN_NO.Text = "停止";
             this.BTN_NO.UseVisualStyleBackColor = true;
@@ -338,7 +342,7 @@ namespace OTSIncAReportApp
             this.BTN_YES.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.BTN_YES.Location = new System.Drawing.Point(168, 4);
             this.BTN_YES.Name = "BTN_YES";
-            this.BTN_YES.Size = new System.Drawing.Size(70, 34);
+            this.BTN_YES.Size = new System.Drawing.Size(70, 31);
             this.BTN_YES.TabIndex = 1;
             this.BTN_YES.Text = "开始采集";
             this.BTN_YES.UseVisualStyleBackColor = true;
@@ -353,11 +357,11 @@ namespace OTSIncAReportApp
             this.tableLayoutPanel3.Controls.Add(this.BTN_YES, 2, 0);
             this.tableLayoutPanel3.Controls.Add(this.BTN_NO, 1, 0);
             this.tableLayoutPanel3.Controls.Add(this.BTN_EXPORT, 0, 0);
-            this.tableLayoutPanel3.Location = new System.Drawing.Point(473, 692);
+            this.tableLayoutPanel3.Location = new System.Drawing.Point(473, 639);
             this.tableLayoutPanel3.Name = "tableLayoutPanel3";
             this.tableLayoutPanel3.RowCount = 1;
             this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
-            this.tableLayoutPanel3.Size = new System.Drawing.Size(245, 42);
+            this.tableLayoutPanel3.Size = new System.Drawing.Size(245, 39);
             this.tableLayoutPanel3.TabIndex = 4;
             // 
             // BTN_EXPORT
@@ -365,7 +369,7 @@ namespace OTSIncAReportApp
             this.BTN_EXPORT.Anchor = System.Windows.Forms.AnchorStyles.None;
             this.BTN_EXPORT.Location = new System.Drawing.Point(5, 4);
             this.BTN_EXPORT.Name = "BTN_EXPORT";
-            this.BTN_EXPORT.Size = new System.Drawing.Size(70, 34);
+            this.BTN_EXPORT.Size = new System.Drawing.Size(70, 31);
             this.BTN_EXPORT.TabIndex = 1;
             this.BTN_EXPORT.Text = "导出";
             this.BTN_EXPORT.UseVisualStyleBackColor = true;
@@ -373,9 +377,9 @@ namespace OTSIncAReportApp
             // 
             // groupBox2
             // 
-            this.groupBox2.Location = new System.Drawing.Point(471, 259);
+            this.groupBox2.Location = new System.Drawing.Point(471, 239);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(618, 245);
+            this.groupBox2.Size = new System.Drawing.Size(618, 226);
             this.groupBox2.TabIndex = 9;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "能谱结果";
@@ -387,7 +391,7 @@ namespace OTSIncAReportApp
             this.tabControl_grid.Location = new System.Drawing.Point(5, 3);
             this.tabControl_grid.Name = "tabControl_grid";
             this.tabControl_grid.SelectedIndex = 0;
-            this.tabControl_grid.Size = new System.Drawing.Size(1084, 249);
+            this.tabControl_grid.Size = new System.Drawing.Size(1084, 230);
             this.tabControl_grid.TabIndex = 0;
             // 
             // tabPage1
@@ -396,7 +400,7 @@ namespace OTSIncAReportApp
             this.tabPage1.Location = new System.Drawing.Point(4, 22);
             this.tabPage1.Name = "tabPage1";
             this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
-            this.tabPage1.Size = new System.Drawing.Size(1076, 223);
+            this.tabPage1.Size = new System.Drawing.Size(1076, 204);
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "待测颗粒";
             this.tabPage1.UseVisualStyleBackColor = true;
@@ -406,7 +410,23 @@ namespace OTSIncAReportApp
             this.dgV_ParticlesDevidePage.AllowUserToAddRows = false;
             this.dgV_ParticlesDevidePage.AllowUserToDeleteRows = false;
             this.dgV_ParticlesDevidePage.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgV_ParticlesDevidePage.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.dgV_ParticlesDevidePage.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgV_ParticlesDevidePage.DefaultCellStyle = dataGridViewCellStyle2;
             this.dgV_ParticlesDevidePage.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgV_ParticlesDevidePage.Location = new System.Drawing.Point(3, 3);
             this.dgV_ParticlesDevidePage.Name = "dgV_ParticlesDevidePage";
@@ -414,7 +434,7 @@ namespace OTSIncAReportApp
             this.dgV_ParticlesDevidePage.RowHeadersWidth = 4;
             this.dgV_ParticlesDevidePage.RowTemplate.Height = 23;
             this.dgV_ParticlesDevidePage.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgV_ParticlesDevidePage.Size = new System.Drawing.Size(1070, 217);
+            this.dgV_ParticlesDevidePage.Size = new System.Drawing.Size(1070, 198);
             this.dgV_ParticlesDevidePage.TabIndex = 8;
             this.dgV_ParticlesDevidePage.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgV_ParticlesDevidePage_CellMouseClick);
             this.dgV_ParticlesDevidePage.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgV_ParticlesDevidePage_ColumnHeaderMouseClick);
@@ -425,7 +445,7 @@ namespace OTSIncAReportApp
             this.tabPage2.Location = new System.Drawing.Point(4, 22);
             this.tabPage2.Name = "tabPage2";
             this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
-            this.tabPage2.Size = new System.Drawing.Size(1076, 223);
+            this.tabPage2.Size = new System.Drawing.Size(1076, 204);
             this.tabPage2.TabIndex = 1;
             this.tabPage2.Text = "已测颗粒";
             this.tabPage2.UseVisualStyleBackColor = true;
@@ -435,7 +455,23 @@ namespace OTSIncAReportApp
             this.dataGridView_success.AllowUserToAddRows = false;
             this.dataGridView_success.AllowUserToDeleteRows = false;
             this.dataGridView_success.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridView_success.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
             this.dataGridView_success.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridView_success.DefaultCellStyle = dataGridViewCellStyle4;
             this.dataGridView_success.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dataGridView_success.Location = new System.Drawing.Point(3, 3);
             this.dataGridView_success.Name = "dataGridView_success";
@@ -443,15 +479,15 @@ namespace OTSIncAReportApp
             this.dataGridView_success.RowHeadersWidth = 4;
             this.dataGridView_success.RowTemplate.Height = 23;
             this.dataGridView_success.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dataGridView_success.Size = new System.Drawing.Size(1070, 217);
+            this.dataGridView_success.Size = new System.Drawing.Size(1070, 198);
             this.dataGridView_success.TabIndex = 9;
             this.dataGridView_success.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_success_CellMouseClick);
             // 
             // frmReMeasure
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1092, 738);
+            this.ClientSize = new System.Drawing.Size(1092, 682);
             this.Controls.Add(this.tabControl_grid);
             this.Controls.Add(this.groupBox2);
             this.Controls.Add(this.groupBox_param);
@@ -459,9 +495,9 @@ namespace OTSIncAReportApp
             this.Controls.Add(this.groupBox_img);
             this.Controls.Add(this.tableLayoutPanel3);
             this.MaximizeBox = false;
-            this.MaximumSize = new System.Drawing.Size(1108, 777);
+            this.MaximumSize = new System.Drawing.Size(1108, 720);
             this.MinimizeBox = false;
-            this.MinimumSize = new System.Drawing.Size(1108, 777);
+            this.MinimumSize = new System.Drawing.Size(1108, 720);
             this.Name = "frmReMeasure";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "二次采集";

+ 23 - 23
OTSIncAReportApp/App.config

@@ -1,67 +1,67 @@
 <?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.8"/>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
   </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"/>
+        <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>
       <dependentAssembly>
-        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
-        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
         <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" />
       </dependentAssembly>
       <dependentAssembly>
-        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
       </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>

+ 25 - 8
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -1,6 +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\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\OpenCvSharp4.runtime.win.props" Condition="Exists('..\packages\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\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>
@@ -295,16 +295,23 @@
       <EmbedInteropTypes>True</EmbedInteropTypes>
       <HintPath>..\OpenDll\WordApiDll\office.dll</HintPath>
     </Reference>
-    <Reference Include="OpenCvSharp">
-      <HintPath>..\Bin\x64\Release_oxford60\OpenCvSharp.dll</HintPath>
+    <Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.dll</HintPath>
     </Reference>
-    <Reference Include="OpenCvSharp.Extensions">
-      <HintPath>..\Bin\x64\Release_oxford60\OpenCvSharp.Extensions.dll</HintPath>
+    <Reference Include="OpenCvSharp.Blob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.Blob.dll</HintPath>
+    </Reference>
+    <Reference Include="OpenCvSharp.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="OpenCvSharp.UserInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
+      <HintPath>..\packages\OpenCvSharp4.4.2.0.20191223\lib\net461\OpenCvSharp.UserInterface.dll</HintPath>
     </Reference>
     <Reference Include="OTS.WinFormsUI.Docking">
       <HintPath>..\Bin\x64\Debug\OTS.WinFormsUI.Docking.dll</HintPath>
     </Reference>
     <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
     <Reference Include="SourceGrid, Version=4.40.7083.30975, Culture=neutral, PublicKeyToken=df6f5e538749e85d, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\WordApiDll\SourceGrid.dll</HintPath>
@@ -328,8 +335,11 @@
     <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 Include="System.Drawing.Common, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Drawing.Common.7.0.0\lib\net462\System.Drawing.Common.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.5\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">
@@ -340,14 +350,20 @@
     </Reference>
     <Reference Include="System.Runtime.Remoting" />
     <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Security" />
     <Reference Include="System.ServiceModel" />
     <Reference Include="System.ServiceModel.Web" />
     <Reference Include="System.ServiceProcess" />
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Windows.Forms.Ribbon, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\WordApiDll\System.Windows.Forms.Ribbon.dll</HintPath>
     </Reference>
+    <Reference Include="System.Xaml" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Data" />
@@ -356,6 +372,7 @@
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="1-UI\Control_Grids\SpectrumExportConfirmation.cs">
@@ -1522,7 +1539,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'))" />
+    <Error Condition="!Exists('..\packages\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\OpenCvSharp4.runtime.win.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenCvSharp4.runtime.win.4.2.0.20191223\build\net\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')" />
   <PropertyGroup>

+ 6 - 4
OTSIncAReportApp/packages.config

@@ -2,9 +2,9 @@
 <packages>
   <package id="EntityFramework" version="6.4.4" targetFramework="net472" />
   <package id="NPOI" version="2.5.6" targetFramework="net472" />
-  <package id="OpenCvSharp4" version="4.5.5.20211231" targetFramework="net462" requireReinstallation="true" />
-  <package id="OpenCvSharp4.runtime.win" version="4.5.5.20211231" targetFramework="net462" requireReinstallation="true" />
-  <package id="OpenCvSharp4.Windows" version="4.5.5.20211231" targetFramework="net462" />
+  <package id="OpenCvSharp4" version="4.2.0.20191223" targetFramework="net48" />
+  <package id="OpenCvSharp4.runtime.win" version="4.2.0.20191223" targetFramework="net48" />
+  <package id="OpenCvSharp4.Windows" version="4.2.0.20191223" targetFramework="net48" />
   <package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net462" />
   <package id="SharpZipLib" version="1.3.3" targetFramework="net462" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net462" />
@@ -12,7 +12,9 @@
   <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.Drawing.Common" version="7.0.0" targetFramework="net48" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net48" />
   <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
   <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
 </packages>

+ 7 - 3
OTSSysMgrApp/App.config

@@ -4,7 +4,7 @@
     <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
   </configSections>
   <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
   </startup>
   <connectionStrings>
     <add name="XMLFilePath" connectionString="Resources/XMLData/SystemData.XML" />
@@ -43,13 +43,17 @@
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="SQLitePCLRaw.provider.e_sqlite3" publicKeyToken="9c301db686d0bd12" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-2.0.7.1395" newVersion="2.0.7.1395" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
-  <system.windows.forms jitDebugging="true"/>
+  <system.windows.forms jitDebugging="true" />
 </configuration>