From 1894ccc4014d813ea60cf276ac066e5870a82566 Mon Sep 17 00:00:00 2001
From: kingno <30263@KINGNO>
Date: 星期四, 18 九月 2025 13:51:20 +0800
Subject: [PATCH] 简化代码
---
libs/PFW/Bro.Common.Model.dll | 0
libs/PFW/Bro.UI.Device.Winform.dll | 0
libs/PFW/Bro.Device.PointLaser_Omron.dll | 0
libs/PFW/Bro.Device.HikCamera.deps.json | 585 ++++
libs/PFW/Bro.Common.Model.deps.json | 430 +++
libs/PFW/Bro.UI.Main.dll | 0
src/Bro.M141.Process/P_PRODUCT.cs | 0
libs/PFW/Bro.Common.Device.dll | 0
src/Bro.M141.Process/UI/PLCstate.cs | 5
libs/PFW/Bro.Device.IKAPCamera.dll | 0
src/Bro.M141.Process/M141Process.cs | 2021 +-------------
libs/PFW/Bro.Device.InsCamera.deps.json | 690 +++++
libs/PFW/Bro.Device.Melsec.dll | 0
libs/PFW/Bro.UI.Model.Winform.dll | 0
libs/PFW/Bro.Device.TrstLight.dll | 0
libs/halcon12/hdevenginedotnet.dll | 0
src/Bro.M141_AOI1.Process/AOI1Process.cs | 577 ----
libs/PFW/Bro.Device.IKAPCamera.deps.json | 600 ++++
libs/PFW/Bro.Process.dll | 0
libs/PFW/Bro.Common.Device.deps.json | 535 ++++
src/Bro.M141.Process/ProductModel.cs | 0
libs/PFW/Bro.DataBase.Model.dll | 0
libs/PFW/Bro.DataBase.Model.deps.json | 643 ++++
libs/PFW/Bro.Device.IRayple.dll | 0
src/Bro.M141.Process/M141Config.cs | 172 -
src/Bro.M141.Process/M141Models.cs | 40
src/Bro.M141.Process/Bro.M141.Process.csproj | 77
src/Bro.M141.Process/M141Process_ImageCheck.cs | 778 -----
/dev/null | 0
libs/PFW/Bro.UI.Main.exe | 0
libs/halcon12/halcondotnet.dll | 0
src/Bro.M141_AOI1.Process/AOI1Config.cs | 32
libs/PFW/Bro.Process.DataBase.dll | 0
src/Bro.M141.Process/P_PRODUCT_DETAIL.cs | 0
M182.sln | 31
libs/PFW/Bro.Device.IRaypleAX.deps.json | 634 ++++
libs/PFW/Bro.UI.Main.dll.config | 11
libs/Nuget/System.Drawing.Common.dll | 0
libs/PFW/Bro.Device.IRaypleAX.dll | 0
39 files changed, 4,371 insertions(+), 3,490 deletions(-)
diff --git a/M135.sln b/M135.sln
deleted file mode 100644
index e874f55..0000000
--- a/M135.sln
+++ /dev/null
@@ -1,54 +0,0 @@
-锘�
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32526.322
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bro.Device.PointLaser_Omron", "src\Bro.Device.PointLaser_Omron\Bro.Device.PointLaser_Omron.csproj", "{5966DFAD-1B67-478A-BA32-ADE05500B2AA}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bro.M135.DBManager", "src\Bro.M135.DBManager\Bro.M135.DBManager.csproj", "{2CF8BEFC-55B0-41F8-9EF3-556D00622D9A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bro.M135.Common", "src\Bro.M135.Common\Bro.M135.Common.csproj", "{82DF4C52-A0CA-4759-A6C6-64442646E85F}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bro.M141.Process", "src\Bro.M141.Process\Bro.M141.Process.csproj", "{2559EE9D-1C2F-456D-AF5D-755A79066C0F}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E523A9AF-2B19-44B7-9A18-6FCB2F551ECC}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M141_AOI1.Process", "src\Bro.M141_AOI1.Process\Bro.M141_AOI1.Process.csproj", "{E51B5103-B3A2-43CD-BA2F-3126F56625DE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5966DFAD-1B67-478A-BA32-ADE05500B2AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5966DFAD-1B67-478A-BA32-ADE05500B2AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5966DFAD-1B67-478A-BA32-ADE05500B2AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5966DFAD-1B67-478A-BA32-ADE05500B2AA}.Release|Any CPU.Build.0 = Release|Any CPU
- {2CF8BEFC-55B0-41F8-9EF3-556D00622D9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2CF8BEFC-55B0-41F8-9EF3-556D00622D9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2CF8BEFC-55B0-41F8-9EF3-556D00622D9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2CF8BEFC-55B0-41F8-9EF3-556D00622D9A}.Release|Any CPU.Build.0 = Release|Any CPU
- {82DF4C52-A0CA-4759-A6C6-64442646E85F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {82DF4C52-A0CA-4759-A6C6-64442646E85F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {82DF4C52-A0CA-4759-A6C6-64442646E85F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {82DF4C52-A0CA-4759-A6C6-64442646E85F}.Release|Any CPU.Build.0 = Release|Any CPU
- {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Release|Any CPU.Build.0 = Release|Any CPU
- {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {C81A6D27-50A1-4CC2-962E-5DBEDDF8ADAD}
- EndGlobalSection
-EndGlobal
diff --git a/M182.sln b/M182.sln
new file mode 100644
index 0000000..c1a5765
--- /dev/null
+++ b/M182.sln
@@ -0,0 +1,31 @@
+锘�
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32526.322
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bro.M141.Process", "src\Bro.M141.Process\Bro.M141.Process.csproj", "{2559EE9D-1C2F-456D-AF5D-755A79066C0F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M141_AOI1.Process", "src\Bro.M141_AOI1.Process\Bro.M141_AOI1.Process.csproj", "{E51B5103-B3A2-43CD-BA2F-3126F56625DE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2559EE9D-1C2F-456D-AF5D-755A79066C0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E51B5103-B3A2-43CD-BA2F-3126F56625DE}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {C81A6D27-50A1-4CC2-962E-5DBEDDF8ADAD}
+ EndGlobalSection
+EndGlobal
diff --git a/libs/Nuget/System.Drawing.Common.dll b/libs/Nuget/System.Drawing.Common.dll
index 32bb015..5f683cb 100644
--- a/libs/Nuget/System.Drawing.Common.dll
+++ b/libs/Nuget/System.Drawing.Common.dll
Binary files differ
diff --git a/libs/PFW/Bro.Common.Device.deps.json b/libs/PFW/Bro.Common.Device.deps.json
new file mode 100644
index 0000000..f7dfbba
--- /dev/null
+++ b/libs/PFW/Bro.Common.Device.deps.json
@@ -0,0 +1,535 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Common.Device/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0",
+ "halcondotnet": "12.0.0.0",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.Common.Device.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Krypton.Docking/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312",
+ "Krypton.Workspace": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Docking.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "dependencies": {
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Navigator.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Toolkit.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Workspace.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Krypton.Docking": "6.2111.312",
+ "SunnyUI": "3.0.9"
+ },
+ "runtime": {
+ "Bro.UI.Model.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.21118.0"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Common.Device/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Krypton.Docking/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k9oYfKMBWUiNL3Q3tqnBInSVBU4T6KQx9ePhRa/kGwxiKkVFnoOTT4KCBCj6zPTR/Bsrtln2MFhfIdOiE5n4JQ==",
+ "path": "krypton.docking/6.2111.312",
+ "hashPath": "krypton.docking.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W3ddlpww0TneLUzchiEpjsPsu6NYPFN4eRZdoxqq3mveroeqlLmXttpPRrqikFSJnpwP8FNcwceCRSFuzpih+g==",
+ "path": "krypton.navigator/6.2111.312",
+ "hashPath": "krypton.navigator.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aYUYphbuG9uqHVlNLNqRvi9tLhx5L2WGzD3fplV6kE6V1NhaY00Mz1HucGt23P90nU2KaecmsMrapZW5lSdd4w==",
+ "path": "krypton.toolkit/6.2111.312",
+ "hashPath": "krypton.toolkit.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l1M0OfJmpNn+JCjXRHWddDoAJMN/CXtdwXJIGM0C0HAZ7/8ezz3/EMip4I5HgQqiHcomsmqkKO0o40Sn70PVSQ==",
+ "path": "krypton.workspace/6.2111.312",
+ "hashPath": "krypton.workspace.6.2111.312.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Common.Device.dll b/libs/PFW/Bro.Common.Device.dll
index 39d7ee4..8237528 100644
--- a/libs/PFW/Bro.Common.Device.dll
+++ b/libs/PFW/Bro.Common.Device.dll
Binary files differ
diff --git a/libs/PFW/Bro.Common.Model.deps.json b/libs/PFW/Bro.Common.Model.deps.json
new file mode 100644
index 0000000..f85839f
--- /dev/null
+++ b/libs/PFW/Bro.Common.Model.deps.json
@@ -0,0 +1,430 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "dog_net_windows": "1.0.1.28668",
+ "halcondotnet": "12.0.0.0",
+ "hdevenginedotnet": "12.0.0.0",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {}
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Common.Model.dll b/libs/PFW/Bro.Common.Model.dll
index 4c5a39c..63fb8c9 100644
--- a/libs/PFW/Bro.Common.Model.dll
+++ b/libs/PFW/Bro.Common.Model.dll
Binary files differ
diff --git a/libs/PFW/Bro.DataBase.Model.deps.json b/libs/PFW/Bro.DataBase.Model.deps.json
new file mode 100644
index 0000000..19ebb8c
--- /dev/null
+++ b/libs/PFW/Bro.DataBase.Model.deps.json
@@ -0,0 +1,643 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.DataBase.Model/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Microsoft.EntityFrameworkCore": "7.0.0",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.DataBase.Model.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore/7.0.0": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.0",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.0",
+ "Microsoft.Extensions.Caching.Memory": "7.0.0",
+ "Microsoft.Extensions.DependencyInjection": "7.0.0",
+ "Microsoft.Extensions.Logging": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.EntityFrameworkCore.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51807"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/7.0.0": {
+ "runtime": {
+ "lib/net6.0/Microsoft.EntityFrameworkCore.Abstractions.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51807"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/7.0.0": {},
+ "Microsoft.Extensions.Caching.Abstractions/7.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Caching.Abstractions.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.Caching.Memory/7.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.Caching.Abstractions": "7.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
+ "Microsoft.Extensions.Options": "7.0.0",
+ "Microsoft.Extensions.Primitives": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Caching.Memory.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection/7.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/7.0.0": {
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.Logging/7.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection": "7.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "7.0.0",
+ "Microsoft.Extensions.Options": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.Logging.Abstractions/7.0.0": {
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.Options/7.0.0": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
+ "Microsoft.Extensions.Primitives": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Options.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.Extensions.Primitives/7.0.0": {
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Primitives.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {},
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.DataBase.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-9W+IfmAzMrp2ZpKZLhgTlWljSBM9Erldis1us61DAGi+L7Q6vilTbe1G2zDxtYO8F2H0I0Qnupdx5Cp4s2xoZw==",
+ "path": "microsoft.entityframeworkcore/7.0.0",
+ "hashPath": "microsoft.entityframeworkcore.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Pfu3Zjj5+d2Gt27oE9dpGiF/VobBB+s5ogrfI9sBsXQE1SG49RqVz5+IyeNnzhyejFrPIQsPDRMchhcojy4Hbw==",
+ "path": "microsoft.entityframeworkcore.abstractions/7.0.0",
+ "hashPath": "microsoft.entityframeworkcore.abstractions.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Qkd2H+jLe37o5ku+LjT6qf7kAHY75Yfn2bBDQgqr13DTOLYpEy1Mt93KPFjaZvIu/srEcbfGGMRL7urKm5zN8Q==",
+ "path": "microsoft.entityframeworkcore.analyzers/7.0.0",
+ "hashPath": "microsoft.entityframeworkcore.analyzers.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Abstractions/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-IeimUd0TNbhB4ded3AbgBLQv2SnsiVugDyGV1MvspQFVlA07nDC7Zul7kcwH5jWN3JiTcp/ySE83AIJo8yfKjg==",
+ "path": "microsoft.extensions.caching.abstractions/7.0.0",
+ "hashPath": "microsoft.extensions.caching.abstractions.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Memory/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-xpidBs2KCE2gw1JrD0quHE72kvCaI3xFql5/Peb2GRtUuZX+dYPoK/NTdVMiM67Svym0M0Df9A3xyU0FbMQhHw==",
+ "path": "microsoft.extensions.caching.memory/7.0.0",
+ "hashPath": "microsoft.extensions.caching.memory.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
+ "path": "microsoft.extensions.dependencyinjection/7.0.0",
+ "hashPath": "microsoft.extensions.dependencyinjection.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==",
+ "path": "microsoft.extensions.dependencyinjection.abstractions/7.0.0",
+ "hashPath": "microsoft.extensions.dependencyinjection.abstractions.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
+ "path": "microsoft.extensions.logging/7.0.0",
+ "hashPath": "microsoft.extensions.logging.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging.Abstractions/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
+ "path": "microsoft.extensions.logging.abstractions/7.0.0",
+ "hashPath": "microsoft.extensions.logging.abstractions.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Options/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
+ "path": "microsoft.extensions.options/7.0.0",
+ "hashPath": "microsoft.extensions.options.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Primitives/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==",
+ "path": "microsoft.extensions.primitives/7.0.0",
+ "hashPath": "microsoft.extensions.primitives.7.0.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
+ "path": "system.runtime.compilerservices.unsafe/6.0.0",
+ "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.DataBase.Model.dll b/libs/PFW/Bro.DataBase.Model.dll
index dafd718..e3f37bd 100644
--- a/libs/PFW/Bro.DataBase.Model.dll
+++ b/libs/PFW/Bro.DataBase.Model.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.HikCamera.deps.json b/libs/PFW/Bro.Device.HikCamera.deps.json
new file mode 100644
index 0000000..ed25c80
--- /dev/null
+++ b/libs/PFW/Bro.Device.HikCamera.deps.json
@@ -0,0 +1,585 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Device.HikCamera/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Device.Winform": "1.0.0",
+ "halcondotnet": "12.0.0.0",
+ "MvCameraControl.Net": "3.2.0.2",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.Device.HikCamera.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Krypton.Docking/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312",
+ "Krypton.Workspace": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Docking.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "dependencies": {
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Navigator.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Toolkit.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Workspace.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Device/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.Common.Device.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40124.0"
+ }
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.UI.Device.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.30415.0"
+ }
+ }
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Krypton.Docking": "6.2111.312",
+ "SunnyUI": "3.0.9"
+ },
+ "runtime": {
+ "Bro.UI.Model.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.21118.0"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "MvCameraControl.Net/3.2.0.2": {
+ "runtime": {
+ "MvCameraControl.Net.dll": {
+ "assemblyVersion": "3.2.0.2",
+ "fileVersion": "3.2.0.2"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Device.HikCamera/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Krypton.Docking/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k9oYfKMBWUiNL3Q3tqnBInSVBU4T6KQx9ePhRa/kGwxiKkVFnoOTT4KCBCj6zPTR/Bsrtln2MFhfIdOiE5n4JQ==",
+ "path": "krypton.docking/6.2111.312",
+ "hashPath": "krypton.docking.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W3ddlpww0TneLUzchiEpjsPsu6NYPFN4eRZdoxqq3mveroeqlLmXttpPRrqikFSJnpwP8FNcwceCRSFuzpih+g==",
+ "path": "krypton.navigator/6.2111.312",
+ "hashPath": "krypton.navigator.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aYUYphbuG9uqHVlNLNqRvi9tLhx5L2WGzD3fplV6kE6V1NhaY00Mz1HucGt23P90nU2KaecmsMrapZW5lSdd4w==",
+ "path": "krypton.toolkit/6.2111.312",
+ "hashPath": "krypton.toolkit.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l1M0OfJmpNn+JCjXRHWddDoAJMN/CXtdwXJIGM0C0HAZ7/8ezz3/EMip4I5HgQqiHcomsmqkKO0o40Sn70PVSQ==",
+ "path": "krypton.workspace/6.2111.312",
+ "hashPath": "krypton.workspace.6.2111.312.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Device/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "MvCameraControl.Net/3.2.0.2": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Device.IKAPCamera.deps.json b/libs/PFW/Bro.Device.IKAPCamera.deps.json
new file mode 100644
index 0000000..7baa768
--- /dev/null
+++ b/libs/PFW/Bro.Device.IKAPCamera.deps.json
@@ -0,0 +1,600 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Device.IKAPCamera/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Device.Winform": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0",
+ "halcondotnet": "12.0.0.0",
+ "IKapBoardClassLibrary": "1.8.5.2",
+ "IKapC.NET": "1.1.0.1",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.Device.IKAPCamera.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Krypton.Docking/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312",
+ "Krypton.Workspace": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Docking.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "dependencies": {
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Navigator.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Toolkit.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Workspace.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Device/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.Common.Device.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40124.0"
+ }
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.UI.Device.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.30415.0"
+ }
+ }
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Krypton.Docking": "6.2111.312",
+ "SunnyUI": "3.0.9"
+ },
+ "runtime": {
+ "Bro.UI.Model.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.21118.0"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "IKapBoardClassLibrary/1.8.5.2": {
+ "runtime": {
+ "IKapBoardClassLibrary.dll": {
+ "assemblyVersion": "1.8.5.2",
+ "fileVersion": "1.8.5.2"
+ }
+ }
+ },
+ "IKapC.NET/1.1.0.1": {
+ "runtime": {
+ "IKapC.NET.dll": {
+ "assemblyVersion": "1.1.0.1",
+ "fileVersion": "1.1.0.1"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Device.IKAPCamera/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Krypton.Docking/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k9oYfKMBWUiNL3Q3tqnBInSVBU4T6KQx9ePhRa/kGwxiKkVFnoOTT4KCBCj6zPTR/Bsrtln2MFhfIdOiE5n4JQ==",
+ "path": "krypton.docking/6.2111.312",
+ "hashPath": "krypton.docking.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W3ddlpww0TneLUzchiEpjsPsu6NYPFN4eRZdoxqq3mveroeqlLmXttpPRrqikFSJnpwP8FNcwceCRSFuzpih+g==",
+ "path": "krypton.navigator/6.2111.312",
+ "hashPath": "krypton.navigator.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aYUYphbuG9uqHVlNLNqRvi9tLhx5L2WGzD3fplV6kE6V1NhaY00Mz1HucGt23P90nU2KaecmsMrapZW5lSdd4w==",
+ "path": "krypton.toolkit/6.2111.312",
+ "hashPath": "krypton.toolkit.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l1M0OfJmpNn+JCjXRHWddDoAJMN/CXtdwXJIGM0C0HAZ7/8ezz3/EMip4I5HgQqiHcomsmqkKO0o40Sn70PVSQ==",
+ "path": "krypton.workspace/6.2111.312",
+ "hashPath": "krypton.workspace.6.2111.312.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Device/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "IKapBoardClassLibrary/1.8.5.2": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "IKapC.NET/1.1.0.1": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Device.IKAPCamera.dll b/libs/PFW/Bro.Device.IKAPCamera.dll
index c60a303..378d6f1 100644
--- a/libs/PFW/Bro.Device.IKAPCamera.dll
+++ b/libs/PFW/Bro.Device.IKAPCamera.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.IRayple.dll b/libs/PFW/Bro.Device.IRayple.dll
new file mode 100644
index 0000000..f65b636
--- /dev/null
+++ b/libs/PFW/Bro.Device.IRayple.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.IRaypleAX.deps.json b/libs/PFW/Bro.Device.IRaypleAX.deps.json
new file mode 100644
index 0000000..a34a995
--- /dev/null
+++ b/libs/PFW/Bro.Device.IRaypleAX.deps.json
@@ -0,0 +1,634 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Device.IRaypleAX/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Device.Winform": "1.0.0",
+ "System.Drawing.Common": "6.0.0",
+ "CLIDelegate": "1.0.7940.36079",
+ "halcondotnet": "12.0.0.0",
+ "MVFGSDK_Net": "1.3.0.9252",
+ "ThridLibray": "1.0.0.31445",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.52"
+ },
+ "runtime": {
+ "Bro.Device.IRaypleAX.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.52": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.38",
+ "fileVersion": "10.0.19041.52"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.1.0.0",
+ "fileVersion": "2.1.6.47881"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Krypton.Docking/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312",
+ "Krypton.Workspace": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Docking.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "dependencies": {
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Navigator.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Toolkit.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Workspace.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Microsoft.Win32.SystemEvents/6.0.0": {},
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Drawing.Common/6.0.0": {
+ "dependencies": {
+ "Microsoft.Win32.SystemEvents": "6.0.0"
+ }
+ },
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Device/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.Common.Device.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40124.0"
+ }
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.UI.Device.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.30415.0"
+ }
+ }
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Krypton.Docking": "6.2111.312",
+ "SunnyUI": "3.0.9"
+ },
+ "runtime": {
+ "Bro.UI.Model.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.21118.0"
+ }
+ }
+ },
+ "CLIDelegate/1.0.7940.36079": {
+ "runtime": {
+ "CLIDelegate.dll": {
+ "assemblyVersion": "1.0.7940.36079",
+ "fileVersion": "1.0.0.1"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "MVFGSDK_Net/1.3.0.9252": {
+ "runtime": {
+ "MVFGSDK_Net.dll": {
+ "assemblyVersion": "1.3.0.9252",
+ "fileVersion": "1.0.0.37116"
+ }
+ }
+ },
+ "ThridLibray/1.0.0.31445": {
+ "runtime": {
+ "ThridLibray.dll": {
+ "assemblyVersion": "1.0.0.31445",
+ "fileVersion": "1.0.0.40655"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Device.IRaypleAX/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.52": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Krypton.Docking/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k9oYfKMBWUiNL3Q3tqnBInSVBU4T6KQx9ePhRa/kGwxiKkVFnoOTT4KCBCj6zPTR/Bsrtln2MFhfIdOiE5n4JQ==",
+ "path": "krypton.docking/6.2111.312",
+ "hashPath": "krypton.docking.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W3ddlpww0TneLUzchiEpjsPsu6NYPFN4eRZdoxqq3mveroeqlLmXttpPRrqikFSJnpwP8FNcwceCRSFuzpih+g==",
+ "path": "krypton.navigator/6.2111.312",
+ "hashPath": "krypton.navigator.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aYUYphbuG9uqHVlNLNqRvi9tLhx5L2WGzD3fplV6kE6V1NhaY00Mz1HucGt23P90nU2KaecmsMrapZW5lSdd4w==",
+ "path": "krypton.toolkit/6.2111.312",
+ "hashPath": "krypton.toolkit.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l1M0OfJmpNn+JCjXRHWddDoAJMN/CXtdwXJIGM0C0HAZ7/8ezz3/EMip4I5HgQqiHcomsmqkKO0o40Sn70PVSQ==",
+ "path": "krypton.workspace/6.2111.312",
+ "hashPath": "krypton.workspace.6.2111.312.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.Win32.SystemEvents/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
+ "path": "microsoft.win32.systemevents/6.0.0",
+ "hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Drawing.Common/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
+ "path": "system.drawing.common/6.0.0",
+ "hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Device/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "CLIDelegate/1.0.7940.36079": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "MVFGSDK_Net/1.3.0.9252": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "ThridLibray/1.0.0.31445": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Device.IRaypleAX.dll b/libs/PFW/Bro.Device.IRaypleAX.dll
new file mode 100644
index 0000000..22a5fa3
--- /dev/null
+++ b/libs/PFW/Bro.Device.IRaypleAX.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.InsCamera.deps.json b/libs/PFW/Bro.Device.InsCamera.deps.json
new file mode 100644
index 0000000..330b2e5
--- /dev/null
+++ b/libs/PFW/Bro.Device.InsCamera.deps.json
@@ -0,0 +1,690 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "Bro.Device.InsCamera/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Device.Winform": "1.0.0",
+ "OpenCvSharp4": "4.9.0.20240103",
+ "OpenCvSharp4.Extensions": "4.9.0.20240103",
+ "halcondotnet": "12.0.0.0",
+ "InsCHVSControl.NET": "1.0.0.0",
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref": "10.0.19041.34"
+ },
+ "runtime": {
+ "Bro.Device.InsCamera.dll": {}
+ }
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "runtime": {
+ "Microsoft.Windows.SDK.NET.dll": {
+ "assemblyVersion": "10.0.19041.24",
+ "fileVersion": "10.0.19041.34"
+ },
+ "WinRT.Runtime.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.8.46841"
+ }
+ }
+ },
+ "Autofac/6.3.0": {
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/net5.0/Autofac.dll": {
+ "assemblyVersion": "6.3.0.0",
+ "fileVersion": "6.3.0.0"
+ }
+ }
+ },
+ "Krypton.Docking/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312",
+ "Krypton.Workspace": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Docking.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "dependencies": {
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Navigator.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Toolkit.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "dependencies": {
+ "Krypton.Navigator": "6.2111.312",
+ "Krypton.Toolkit": "6.2111.312"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/Krypton.Workspace.dll": {
+ "assemblyVersion": "6.2111.312.0",
+ "fileVersion": "6.2111.312.0"
+ }
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "Microsoft.NETCore.Targets/1.1.0": {},
+ "Microsoft.Win32.SystemEvents/7.0.0": {
+ "runtime": {
+ "lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "13.0.0.0",
+ "fileVersion": "13.0.1.25517"
+ }
+ }
+ },
+ "OpenCvSharp4/4.9.0.20240103": {
+ "dependencies": {
+ "System.Memory": "4.5.5",
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/OpenCvSharp.dll": {
+ "assemblyVersion": "1.0.0.0",
+ "fileVersion": "1.0.0.0"
+ }
+ }
+ },
+ "OpenCvSharp4.Extensions/4.9.0.20240103": {
+ "dependencies": {
+ "OpenCvSharp4": "4.9.0.20240103",
+ "System.Drawing.Common": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/OpenCvSharp.Extensions.dll": {
+ "assemblyVersion": "1.0.0.0",
+ "fileVersion": "1.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
+ "rid": "linux-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.linux-arm.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.linux-x64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-arm64.runtime.native.System.IO.Ports": "7.0.0",
+ "runtime.osx-x64.runtime.native.System.IO.Ports": "7.0.0"
+ }
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-arm64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "runtimeTargets": {
+ "runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
+ "rid": "osx-x64",
+ "assetType": "native",
+ "fileVersion": "0.0.0.0"
+ }
+ }
+ },
+ "SunnyUI/3.0.9": {
+ "dependencies": {
+ "SunnyUI.Common": "3.0.9"
+ },
+ "runtime": {
+ "lib/net6.0-windows7.0/SunnyUI.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "SunnyUI.Common/3.0.9": {
+ "runtime": {
+ "lib/net6.0/SunnyUI.Common.dll": {
+ "assemblyVersion": "3.0.9.0",
+ "fileVersion": "3.0.9.0"
+ }
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {},
+ "System.Drawing.Common/7.0.0": {
+ "dependencies": {
+ "Microsoft.Win32.SystemEvents": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.Drawing.Common.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/win/lib/net6.0/System.Drawing.Common.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.IO/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.Ports/7.0.0": {
+ "dependencies": {
+ "runtime.native.System.IO.Ports": "7.0.0"
+ },
+ "runtime": {
+ "lib/net6.0/System.IO.Ports.dll": {
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ },
+ "runtimes/win/lib/net6.0/System.IO.Ports.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "7.0.0.0",
+ "fileVersion": "7.0.22.51805"
+ }
+ }
+ },
+ "System.Memory/4.5.5": {},
+ "System.Reflection/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {},
+ "System.Text.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Bro.Common.Device/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.Common.Device.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40124.0"
+ }
+ }
+ },
+ "Bro.Common.Model/1.0.0": {
+ "dependencies": {
+ "Autofac": "6.3.0",
+ "Newtonsoft.Json": "13.0.1",
+ "SunnyUI": "3.0.9",
+ "System.IO.Ports": "7.0.0",
+ "System.Resources.ResourceManager": "4.3.0"
+ },
+ "runtime": {
+ "Bro.Common.Model.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.40127.0"
+ }
+ },
+ "resources": {
+ "en-US/Bro.Common.Model.resources.dll": {
+ "locale": "en-US"
+ }
+ }
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Device": "1.0.0",
+ "Bro.Common.Model": "1.0.0",
+ "Bro.UI.Model.Winform": "1.0.0"
+ },
+ "runtime": {
+ "Bro.UI.Device.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.30415.0"
+ }
+ }
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "dependencies": {
+ "Bro.Common.Model": "1.0.0",
+ "Krypton.Docking": "6.2111.312",
+ "SunnyUI": "3.0.9"
+ },
+ "runtime": {
+ "Bro.UI.Model.Winform.dll": {
+ "assemblyVersion": "1.0.0",
+ "fileVersion": "1.0.21118.0"
+ }
+ }
+ },
+ "halcondotnet/12.0.0.0": {
+ "runtime": {
+ "halcondotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "InsCHVSControl.NET/1.0.0.0": {
+ "runtime": {
+ "InsCHVSControl.NET.dll": {
+ "assemblyVersion": "1.0.0.0",
+ "fileVersion": "1.0.0.0"
+ }
+ }
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "runtime": {
+ "hdevenginedotnet.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.0.0"
+ }
+ }
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "runtime": {
+ "dog_net_windows.dll": {
+ "assemblyVersion": "1.0.1.28668",
+ "fileVersion": "1.0.1.28668"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Bro.Device.InsCamera/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "runtimepack.Microsoft.Windows.SDK.NET.Ref/10.0.19041.34": {
+ "type": "runtimepack",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Autofac/6.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-gO4bli0N8tDnBHzbYktcnbXlmN6T+IT5W+FUGgCUaM6pwwHXIxOPoUGvfGum7sZpJJgfQNgjFFv80ZPuARgRdA==",
+ "path": "autofac/6.3.0",
+ "hashPath": "autofac.6.3.0.nupkg.sha512"
+ },
+ "Krypton.Docking/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k9oYfKMBWUiNL3Q3tqnBInSVBU4T6KQx9ePhRa/kGwxiKkVFnoOTT4KCBCj6zPTR/Bsrtln2MFhfIdOiE5n4JQ==",
+ "path": "krypton.docking/6.2111.312",
+ "hashPath": "krypton.docking.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Navigator/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W3ddlpww0TneLUzchiEpjsPsu6NYPFN4eRZdoxqq3mveroeqlLmXttpPRrqikFSJnpwP8FNcwceCRSFuzpih+g==",
+ "path": "krypton.navigator/6.2111.312",
+ "hashPath": "krypton.navigator.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Toolkit/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aYUYphbuG9uqHVlNLNqRvi9tLhx5L2WGzD3fplV6kE6V1NhaY00Mz1HucGt23P90nU2KaecmsMrapZW5lSdd4w==",
+ "path": "krypton.toolkit/6.2111.312",
+ "hashPath": "krypton.toolkit.6.2111.312.nupkg.sha512"
+ },
+ "Krypton.Workspace/6.2111.312": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-l1M0OfJmpNn+JCjXRHWddDoAJMN/CXtdwXJIGM0C0HAZ7/8ezz3/EMip4I5HgQqiHcomsmqkKO0o40Sn70PVSQ==",
+ "path": "krypton.workspace/6.2111.312",
+ "hashPath": "krypton.workspace.6.2111.312.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
+ "path": "microsoft.netcore.targets/1.1.0",
+ "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
+ },
+ "Microsoft.Win32.SystemEvents/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-2nXPrhdAyAzir0gLl8Yy8S5Mnm/uBSQQA7jEsILOS1MTyS7DbmV1NgViMtvV1sfCD1ebITpNwb1NIinKeJgUVQ==",
+ "path": "microsoft.win32.systemevents/7.0.0",
+ "hashPath": "microsoft.win32.systemevents.7.0.0.nupkg.sha512"
+ },
+ "Newtonsoft.Json/13.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
+ "path": "newtonsoft.json/13.0.1",
+ "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
+ },
+ "OpenCvSharp4/4.9.0.20240103": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-+BJMqToSH3dl+5SUF2YaPI+1eY/o/aTtvCQsY3qgcE4YS8qvPNS7MObzzVy4avYrBmcEEFnCvNF+1VbFnQjU9w==",
+ "path": "opencvsharp4/4.9.0.20240103",
+ "hashPath": "opencvsharp4.4.9.0.20240103.nupkg.sha512"
+ },
+ "OpenCvSharp4.Extensions/4.9.0.20240103": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-zqFJuQPV36ttTMrN1kMGQdj8rDD+wMDtTU5fVGE8osSPEAyehru1ow3xTAmB04uiaKlbzl/gy2G9BnbT+OgMNA==",
+ "path": "opencvsharp4.extensions/4.9.0.20240103",
+ "hashPath": "opencvsharp4.extensions.4.9.0.20240103.nupkg.sha512"
+ },
+ "runtime.linux-arm.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-CBvgRaF+M0xGLDv2Geb/0v0LEADheH8aK72GRAUJdnqnJVsQO60ki1XO8M3keEhnjm+T5NvLm41pNXAVYAPiSg==",
+ "path": "runtime.linux-arm.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5VCyRCtCIYU8FR/W8oo7ouFuJ8tmAg9ddsuXhfCKZfZrbaVZSKxkmNBa6fxkfYPueD0jQfOvwFBmE5c6zalCSw==",
+ "path": "runtime.linux-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.linux-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DV9dWDUs23OoZqMWl5IhLr3D+b9koDiSHQxFKdYgWnQbnthv8c/yDjrlrI8nMrDc71RAKCO8jlUojzuPMX04gg==",
+ "path": "runtime.linux-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.linux-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-L4Ivegqc3B0Fee7VifFy2JST9nndm+uvJ0viLIZUaImDfnr+JmRin9Tbqd56KuMtm0eVxHpNOWZBPtKrA/1h5Q==",
+ "path": "runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-arm64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-jFwh4sKSXZ7al5XrItEO4GdGWa6XNxvNx+LhEHjrSzOwawO1znwJ+Dy+VjnrkySX9Qi4bnHNLoiqOXbqMuka4g==",
+ "path": "runtime.osx-arm64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "runtime.osx-x64.runtime.native.System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4LrHEfke/z9+z+iuVr35NlkhdZldY8JGNMYUN+sfPK/U/6TcE+vP44I0Yv0ir1v0bqIzq3v6Qdv1c1vmp8s4g==",
+ "path": "runtime.osx-x64.runtime.native.system.io.ports/7.0.0",
+ "hashPath": "runtime.osx-x64.runtime.native.system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "SunnyUI/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vHcSRseYkdPSq61jhVwkEIIlxYj+bs/uRp69mPVlV6fMB9EwcnyeTpcylR8JS/mrsfQTwgE1OyLycuq4giPxHQ==",
+ "path": "sunnyui/3.0.9",
+ "hashPath": "sunnyui.3.0.9.nupkg.sha512"
+ },
+ "SunnyUI.Common/3.0.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuwNefnAP7XzWfL6vRkyYg/nHQ5nbruI42ueo5RpJR0lbno87r4HfKL+yzV5Gg2DPtSr4ta7axaSPpP7GeWpeg==",
+ "path": "sunnyui.common/3.0.9",
+ "hashPath": "sunnyui.common.3.0.9.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Drawing.Common/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KIX+oBU38pxkKPxvLcLfIkOV5Ien8ReN78wro7OF5/erwcmortzeFx+iBswlh2Vz6gVne0khocQudGwaO1Ey6A==",
+ "path": "system.drawing.common/7.0.0",
+ "hashPath": "system.drawing.common.7.0.0.nupkg.sha512"
+ },
+ "System.Globalization/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
+ "path": "system.globalization/4.3.0",
+ "hashPath": "system.globalization.4.3.0.nupkg.sha512"
+ },
+ "System.IO/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
+ "path": "system.io/4.3.0",
+ "hashPath": "system.io.4.3.0.nupkg.sha512"
+ },
+ "System.IO.Ports/7.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0nWQjM5IofaIGpvkifN+LLuYwBG6BHlpmphLhhOJepcW12G8qToGuNDRgBzeTVBZzp33wVsESSZ8hUOCfq+8QA==",
+ "path": "system.io.ports/7.0.0",
+ "hashPath": "system.io.ports.7.0.0.nupkg.sha512"
+ },
+ "System.Memory/4.5.5": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
+ "path": "system.memory/4.5.5",
+ "hashPath": "system.memory.4.5.5.nupkg.sha512"
+ },
+ "System.Reflection/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
+ "path": "system.reflection/4.3.0",
+ "hashPath": "system.reflection.4.3.0.nupkg.sha512"
+ },
+ "System.Reflection.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
+ "path": "system.reflection.primitives/4.3.0",
+ "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Resources.ResourceManager/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
+ "path": "system.resources.resourcemanager/4.3.0",
+ "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
+ "path": "system.runtime/4.3.0",
+ "hashPath": "system.runtime.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
+ "path": "system.runtime.compilerservices.unsafe/6.0.0",
+ "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
+ },
+ "System.Text.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
+ "path": "system.text.encoding/4.3.0",
+ "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Tasks/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
+ "path": "system.threading.tasks/4.3.0",
+ "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
+ },
+ "Bro.Common.Device/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.Common.Model/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Device.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Bro.UI.Model.Winform/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "halcondotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "InsCHVSControl.NET/1.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "hdevenginedotnet/12.0.0.0": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "dog_net_windows/1.0.1.28668": {
+ "type": "reference",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/libs/PFW/Bro.Device.Melsec.dll b/libs/PFW/Bro.Device.Melsec.dll
new file mode 100644
index 0000000..42eab06
--- /dev/null
+++ b/libs/PFW/Bro.Device.Melsec.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.PointLaser_Omron.dll b/libs/PFW/Bro.Device.PointLaser_Omron.dll
new file mode 100644
index 0000000..fd0d768
--- /dev/null
+++ b/libs/PFW/Bro.Device.PointLaser_Omron.dll
Binary files differ
diff --git a/libs/PFW/Bro.Device.TrstLight.dll b/libs/PFW/Bro.Device.TrstLight.dll
new file mode 100644
index 0000000..7213770
--- /dev/null
+++ b/libs/PFW/Bro.Device.TrstLight.dll
Binary files differ
diff --git a/libs/PFW/Bro.Process.DataBase.dll b/libs/PFW/Bro.Process.DataBase.dll
index fc0fb27..0e99941 100644
--- a/libs/PFW/Bro.Process.DataBase.dll
+++ b/libs/PFW/Bro.Process.DataBase.dll
Binary files differ
diff --git a/libs/PFW/Bro.Process.dll b/libs/PFW/Bro.Process.dll
index 263bb6d..6541e93 100644
--- a/libs/PFW/Bro.Process.dll
+++ b/libs/PFW/Bro.Process.dll
Binary files differ
diff --git a/libs/PFW/Bro.UI.Device.Winform.dll b/libs/PFW/Bro.UI.Device.Winform.dll
index 9c39685..bdca2e6 100644
--- a/libs/PFW/Bro.UI.Device.Winform.dll
+++ b/libs/PFW/Bro.UI.Device.Winform.dll
Binary files differ
diff --git a/libs/PFW/Bro.UI.Main.dll b/libs/PFW/Bro.UI.Main.dll
index bb1675a..2058696 100644
--- a/libs/PFW/Bro.UI.Main.dll
+++ b/libs/PFW/Bro.UI.Main.dll
Binary files differ
diff --git a/libs/PFW/Bro.UI.Main.dll.config b/libs/PFW/Bro.UI.Main.dll.config
index 1841d23..036f553 100644
--- a/libs/PFW/Bro.UI.Main.dll.config
+++ b/libs/PFW/Bro.UI.Main.dll.config
@@ -1,18 +1,13 @@
锘�<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
- <!--<add name="ProcessDB" connectionString="Data Source=(LocalDB)\.;Initial Catalog=ProcessDB;Integrated Security=True;User Id = M115;Password = sa"/>-->
- <add name="ProcessDB" connectionString="data source=D:\PROJECTS\PFW\DataBase\ProcessDB.db" providerName="sqlite"/>
- <!--<add name="ProcessDB" connectionString="Data Source=localhost;port=3306;Initial Catalog=processdb;user id=root;password=root;" providerName="8.0.26-mysql"/>-->
- <!--<add name="M100DB" connectionString="Data Source=localhost;port=3306;Initial Catalog=m100db;user id=root;password=root;" providerName="8.0.26-mysql" />-->
+ <add name="ProcessDB" connectionString="Data Source=;Initial Catalog=M135DB;TrustServerCertificate=True;Integrated Security=False;User Id=sa;Password =sasa"/>
</connectionStrings>
<appSettings>
<add key="AuthorityCheck" value="false"/>
- <add key="PerformanceMonitor" value="true"/>
- <add key="StartPoint" value="true"/>
- <add key="JiaDianJian" value="false"/>
- <add key="JiaDianJianMax" value="20"/>
+ <add key="PerformanceMonitor" value="false"/>
+
</appSettings>
</configuration>
\ No newline at end of file
diff --git a/libs/PFW/Bro.UI.Main.exe b/libs/PFW/Bro.UI.Main.exe
index 9e836ae..38bff4e 100644
--- a/libs/PFW/Bro.UI.Main.exe
+++ b/libs/PFW/Bro.UI.Main.exe
Binary files differ
diff --git a/libs/PFW/Bro.UI.Model.Winform.dll b/libs/PFW/Bro.UI.Model.Winform.dll
index 03d9e68..d2c9dbc 100644
--- a/libs/PFW/Bro.UI.Model.Winform.dll
+++ b/libs/PFW/Bro.UI.Model.Winform.dll
Binary files differ
diff --git a/libs/halcon12/halcondotnet.dll b/libs/halcon12/halcondotnet.dll
index 52831e9..6b217c0 100644
--- a/libs/halcon12/halcondotnet.dll
+++ b/libs/halcon12/halcondotnet.dll
Binary files differ
diff --git a/libs/halcon12/hdevenginedotnet.dll b/libs/halcon12/hdevenginedotnet.dll
index e6c23df..9252032 100644
--- a/libs/halcon12/hdevenginedotnet.dll
+++ b/libs/halcon12/hdevenginedotnet.dll
Binary files differ
diff --git a/src/Bro.296A.Process/Bro.M141_WS1.Process.csproj b/src/Bro.296A.Process/Bro.M141_WS1.Process.csproj
deleted file mode 100644
index 694b09f..0000000
--- a/src/Bro.296A.Process/Bro.M141_WS1.Process.csproj
+++ /dev/null
@@ -1,59 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <RootNamespace>Bro._296A.Process</RootNamespace>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <OutputType>Library</OutputType>
- <UseWindowsForms>True</UseWindowsForms>
- <BaseOutputPath>..\</BaseOutputPath>
- </PropertyGroup>
-
- <ItemGroup>
- <Compile Include="M141_WS1_Process.cs" />
- <Compile Include="M141_WS1_Process.cs" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M135.Common\Bro.M135.Common.csproj" />
- <ProjectReference Include="..\Bro.M135.DBManager\Bro.M135.DBManager.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Device">
- <HintPath>..\..\libs\PFW\Bro.Common.Device.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Device.HikCamera">
- <HintPath>..\..\libs\PFW\Bro.Device.HikCamera.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Device.IKAPCamera">
- <HintPath>..\..\..\A047_20230223\libs\PFW\Bro.Device.IKAPCamera.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Device.PLC_ModbusTcp">
- <HintPath>..\..\..\A047_20230223\libs\PFW\Bro.Device.PLC_ModbusTcp.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process">
- <HintPath>..\..\libs\PFW\Bro.Process.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process.DataBase">
- <HintPath>..\..\libs\PFW\Bro.Process.DataBase.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Device.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Device.Winform.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Main">
- <HintPath>..\..\libs\PFW\Bro.UI.Main.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.296A.Process/M141_WS1_Process.cs b/src/Bro.296A.Process/M141_WS1_Process.cs
deleted file mode 100644
index d592d08..0000000
--- a/src/Bro.296A.Process/M141_WS1_Process.cs
+++ /dev/null
@@ -1,368 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M135.Common;
-using Bro.M135.DBManager;
-using Bro.UI.Model.Winform;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M135.Process
-{
- public partial class M141_WS1_Process : IUpdateProductData
- {
- #region Constructor
- public M141_WS1_Process() : base() { }
-
- public M141_WS1_Process(string productCode) : base(productCode) { }
- #endregion
-
- M135Config M135Config => Config as M135Config;
-
- object _productListLock = new object();
- List<ProductModel_M135> ProductList = new List<ProductModel_M135>();
-
- MachineLearningBase ML = null;
- TcpListenerWrap TcpListener = null;
- PointLaser_OmronDriver PointLaser_Upper = null;
- PointLaser_OmronDriver PointLaser_Down = null;
-
- Spec _errorSpec = null;
-
- int _backgroundImageWidth = 2448;
- public event Action<string, List<IShapeElement>> OnPositionResultUpdated;
- public event Action<ProductModel> OnUpdateProductData;
-
- string STATION_NAME => string.IsNullOrWhiteSpace(M135Config.StationCode) ? "M135_Size" : M135Config.StationCode;
-
- public override void Open()
- {
- base.Open();
-
- //if (_manager_P_Product == null)
- //{
- // try
- // {
- // _manager_P_Product = new Manager_P_PRODUCT();
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏁版嵁搴撳垵濮嬪寲寮傚父锛寋ex.GetExceptionMessage()}");
- // throw ex;
- // }
- //}
-
- ML = DeviceCollection.FirstOrDefault(u => u is MachineLearningBase) as MachineLearningBase;
- if (ML == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Information, $"鏈缃甅L瀹炰緥");
- }
-
- TcpListener = DeviceCollection.FirstOrDefault(u => u is TcpListenerWrap) as TcpListenerWrap;
- if (TcpListener == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈缃甌CP鐩戝惉瀹炰緥");
- }
-
- _errorSpec = M135Config.SpecCollection.FirstOrDefault(u => u.Code == M135Config.CheckErrorSpecCode) as Spec;
- if (_errorSpec == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏈缃娴嬪紓甯窼pec");
- }
-
- PointLaser_Upper = DeviceCollection.FirstOrDefault(u => u.Id == M135Config.PointLaserId_Upper) as PointLaser_OmronDriver;
- if (PointLaser_Upper == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈缃垨閫夋嫨涓婃柟鐐规縺鍏夎澶�");
- }
-
- PointLaser_Down = DeviceCollection.FirstOrDefault(u => u.Id == M135Config.PointLaserId_Down) as PointLaser_OmronDriver;
- if (PointLaser_Down == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈缃垨閫夋嫨涓嬫柟鐐规縺鍏夎澶�");
- }
-
- _csvHead = "";
- _contourPointDataHead = "";
- _pointHeightHead = "";
- _triggerSource_P1 = "";
-
- InitialProductList();
-
- if (File.Exists(M135Config.BackgroundImageFilePath))
- {
- Bitmap bkImage = new Bitmap(M135Config.BackgroundImageFilePath);
- _backgroundImageWidth = bkImage.Width;
- }
- }
-
- public override void InitialProcessMethods()
- {
- base.InitialProcessMethods();
- OldDataClear.Instance.RunClearOldData(M135Config.DBDataTimeLimit);
- }
-
- public override void ProcessRunStateChanged()
- {
- base.ProcessRunStateChanged();
-
- if (CurrentState == EnumHelper.RunState.Running)
- {
- OldDataClear.Instance.SetAllowFlag(false, M135Config.DBDataTimeLimit);
- }
- else
- {
- OldDataClear.Instance.SetAllowFlag(true, M135Config.DBDataTimeLimit);
- }
- }
-
- private void NewProductIntoList(ProductModel_M135 p)
- {
- lock (_productListLock)
- {
- ProductList.Insert(0, p);
-
- while (ProductList.Count > 200)
- {
- ProductList.RemoveAt(ProductList.Count - 1);
- }
- }
-
- //Task.Run(() =>
- //{
- var isNewDone = _manager_P_Product.NewProduct(p, p.Details, out string msg);
- if (!isNewDone)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{p.PID}鏁版嵁搴撴柊澧炲紓甯革紝{msg}");
- }
- //});
- }
-
- private ProductModel_M135 FindProductModelByBarcode(string barcode)
- {
- var p = ProductList.FirstOrDefault(u => u.SN == barcode);
-
- if (p == null && M135Config.IsAllowTempProduct)
- {
- p = new ProductModel_M135();
- p.SN = barcode;
-
- ProductList.Add(p);
- }
-
- return p;
- }
-
- protected void FillSpecResults(List<ISpec> detectSpec, List<double> results)
- {
- detectSpec.ForEach(s =>
- {
- if (!s.IsEnabled)
- return;
-
- if (results.Count > s.OutputIndex)
- {
- s.ActualValue = results[s.OutputIndex];
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{s.Code}璧嬪�納s.GetMeasureValueStr()}锛岀粨鏋渰s.GetMeasureResultStr()}");
- }
- });
- }
-
- private List<double> ConvertXY2Data(List<double> xList, List<double> yList)
- {
- List<double> list = new List<double>();
-
- for (int i = 0; i < xList.Count && i < yList.Count; i++)
- {
- list.Add(xList[i]);
- list.Add(yList[i]);
- }
-
- return list;
- }
-
- private void ConvertData2XY(List<double> data, out List<double> xList, out List<double> yList)
- {
- xList = new List<double>();
- yList = new List<double>();
-
- for (int i = 0; i < data.Count; i += 2)
- {
- xList.Add(data[i]);
- yList.Add(data[i + 1]);
- }
- }
-
- private List<ISpec> GetSpecListFromConfigSelection(List<SpecSelector> specSelectors)
- {
- List<ISpec> specList = new List<ISpec>();
- specSelectors.ForEach(u =>
- {
- var spec = M135Config.SpecCollection.FirstOrDefault(s => s.Code == u.SpecCode);
- if (spec != null)
- {
- specList.Add(spec.Copy());
- }
- });
-
- return specList;
- }
-
- private async void UpdatePositionResultDisplay(P_PRODUCT_DETAIL detail, bool isOK, string positionName)
- {
- await Task.Run(() =>
- {
- if (detail == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏃犳硶鏄剧ず妫�娴嬫槑缁嗕俊鎭�");
- return;
- }
-
- List<IShapeElement> eleList = new List<IShapeElement>();
-
- TextDisplay txt = new TextDisplay();
- eleList.Add(txt);
-
- txt.StartX = txt.StartY = (int)(_backgroundImageWidth * GlobalVar.WIDTH_RATIO);
-
- txt.AddText($"{detail.SN} {(isOK ? "OK" : "NG")}", isOK ? Color.Lime : Color.White, isOK ? Color.Transparent : Color.Red);
-
- txt.AddText(" ", Color.Transparent, Color.Transparent);
-
- var ngSpecCode = new List<string>();
-
- detail.SpecList.ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- detail.ResultList.SelectMany(u => u.Specs).ToList().ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- var defects = new List<string>(detail.DefectList);
- defects.AddRange(detail.ResultList.GetDefectDescList());
-
- defects = defects.Except(ngSpecCode).Distinct().ToList();
- defects.ForEach(u =>
- {
- txt.AddText(u, Color.Red, Color.Transparent);
-
- var indicator = M135Config.DefectIndicatorCollection.FirstOrDefault(d => d.DefectName == u);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- eleList.Add(cloneIndicator);
- }
- });
-
- OnPositionResultUpdated?.Invoke(positionName, eleList);
- });
- }
-
- private void GetIndicatorFromSpec(ISpec s, List<IShapeElement> eleList, TextDisplay txt, List<string> ngSpecCode)
- {
- txt.AddText($"{s.Code} {s.GetMeasureValueStr()}", s.MeasureResult == true ? Color.Lime : Color.Red, Color.Transparent);
-
- if (s.MeasureResult != true)
- {
- var indicator = M135Config.DefectIndicatorCollection.FirstOrDefault(u => u.DefectName == s.Code);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- cloneIndicator.DefectName += $" {s.GetMeasureValueStr()}";
-
- eleList.Add(cloneIndicator);
- }
-
- ngSpecCode.Add(s.Code);
- }
- }
-
- private async void UpdateOverAllProductResultToUI(ProductModel_M135 product, bool isOK)
- {
- await Task.Run(() =>
- {
- List<IShapeElement> eleList = new List<IShapeElement>();
-
- TextDisplay txt = new TextDisplay();
- eleList.Add(txt);
-
- txt.StartX = txt.StartY = (int)(_backgroundImageWidth * GlobalVar.WIDTH_RATIO);
-
- txt.AddText($"{product.SN} {product.Result}", isOK ? Color.Lime : Color.White, isOK ? Color.Transparent : Color.Red);
-
- txt.AddText(" ", Color.Transparent, Color.Transparent);
-
- var ngSpecCode = new List<string>();
-
- product.Details.ForEach(d =>
- {
- d.SpecList.ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- d.ResultList.SelectMany(u => u.Specs).ToList().ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- var defects = new List<string>(d.DefectList);
- defects.AddRange(d.ResultList.GetDefectDescList());
-
- defects = defects.Except(ngSpecCode).Distinct().ToList();
- defects.ForEach(u =>
- {
- txt.AddText(u, Color.Red, Color.Transparent);
-
- var indicator = M135Config.DefectIndicatorCollection.FirstOrDefault(d => d.DefectName == u);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- eleList.Add(cloneIndicator);
- }
- });
- });
-
- OnPositionResultUpdated?.Invoke("", eleList);
- });
- }
-
- [ProcessMethod("", "UpdateProdcutModelToListTest", "涓婁紶鑷充骇鍝佸垪琛ㄦ祴璇�", InvokeType.TestInvoke)]
- public ResponseMessage UpdateProdcutModelToListTest(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ProductModel p = new ProductModel();
- p.SN = "123456";
- p.Result = "Ng";
-
- Spec spec = new Spec() { Code = "SpecTest", StandardValue = 100, Tolrenance_Negative = 10, Tolrenance_Positive = 10 };
- spec.ActualValue = 101;
-
- P_PRODUCT_DETAIL detail = new P_PRODUCT_DETAIL() { PositionName = "S1", STATION_CODE = "M135" };
- detail.SpecList = new List<Spec>();
- for (int i = 0; i < 10; i++)
- {
- var specClone = (Spec)spec.Copy();
- specClone.Code = $"FAI_{i}";
- specClone.ActualValue = new Random().Next(80, 120);
-
- detail.SpecList.Add(specClone);
- }
-
- detail.DefectList = new List<string>() { "鍘嬩激" };
-
- p.Details.Add(detail);
-
- OnUpdateProductData?.Invoke(p);
-
- return new ResponseMessage();
- }
- }
-}
diff --git a/src/Bro.Device.PointLaser_Omron/Bro.Device.PointLaser_Omron.csproj b/src/Bro.Device.PointLaser_Omron/Bro.Device.PointLaser_Omron.csproj
deleted file mode 100644
index abbb635..0000000
--- a/src/Bro.Device.PointLaser_Omron/Bro.Device.PointLaser_Omron.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
- <PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.3" />
- <PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
- <PackageReference Include="System.ServiceModel.Federation" Version="4.8.1" />
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Device">
- <HintPath>..\..\libs\PFW\Bro.Common.Device.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Device.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Device.Winform.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.Device.PointLaser_Omron/PointLaser_OmronConfig.cs b/src/Bro.Device.PointLaser_Omron/PointLaser_OmronConfig.cs
deleted file mode 100644
index 76e0b38..0000000
--- a/src/Bro.Device.PointLaser_Omron/PointLaser_OmronConfig.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.Device.PointLaser_Omron
-{
- [Device("PointLaser_Omron", "娆у榫欑偣婵�鍏�",EnumHelper.DeviceAttributeType.InitialConfig)]
- public class PointLaser_OmronInitialConfig : TcpClientInitialConfig
- {
- [Category("鏁版嵁姣旂巼")]
- [Description("閫氫俊鏁版嵁鍜屾祴閲忔暟鎹殑鎹㈢畻姣旂巼")]
- [DisplayName("鏁版嵁姣旂巼")]
- public double DataRatio { get; set; } = 0.00001;
- }
-
- [Device("PointLaser_Omron", "娆у榫欑偣婵�鍏�", EnumHelper.DeviceAttributeType.OperationConfig)]
- public class PointLaser_OmronOperationConfig : OperationConfigBase
- {
- }
-}
diff --git a/src/Bro.Device.PointLaser_Omron/PointLaser_OmronDriver.cs b/src/Bro.Device.PointLaser_Omron/PointLaser_OmronDriver.cs
deleted file mode 100644
index a87ffea..0000000
--- a/src/Bro.Device.PointLaser_Omron/PointLaser_OmronDriver.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-
-namespace Bro.Device.PointLaser_Omron
-{
- [Device("PointLaser_Omron", "娆у榫欑偣婵�鍏�", EnumHelper.DeviceAttributeType.Device)]
- public class PointLaser_OmronDriver : TcpClientWrapBase
- {
- public bool TriggerOnce(out double result, out string msg)
- {
- result = -999;
- msg = "";
-
- if (WriteAndRead("MS\r\n", out msg, out string reply, true))
- {
- if (double.TryParse(reply, out result))
- {
- result = result * (InitialConfig as PointLaser_OmronInitialConfig).DataRatio;
- return true;
- }
-
- return false;
- }
- else
- {
- return false;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.Device.PointLaser_Omron/Properties/launchSettings.json b/src/Bro.Device.PointLaser_Omron/Properties/launchSettings.json
deleted file mode 100644
index d2e0083..0000000
--- a/src/Bro.Device.PointLaser_Omron/Properties/launchSettings.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "profiles": {
- "Bro.Device.PointLaser_Omron": {
- "commandName": "Project"
- },
- "閰嶇疆鏂囦欢 1": {
- "commandName": "Executable",
- "executablePath": "D:\\git\\M135\\src\\Debug\\net6.0-windows10.0.19041.0\\Bro.UI.Main.exe"
- }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M135.Common/Bro.M135.Common.csproj b/src/Bro.M135.Common/Bro.M135.Common.csproj
deleted file mode 100644
index 67153ca..0000000
--- a/src/Bro.M135.Common/Bro.M135.Common.csproj
+++ /dev/null
@@ -1,66 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <OutputType>Library</OutputType>
- <UseWindowsForms>True</UseWindowsForms>
- <AssemblyVersion>1.0.31211.0</AssemblyVersion>
- <FileVersion>1.0.31211.0</FileVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <Compile Remove="DefectRectangleIndicator.cs" />
- <Compile Remove="FrmDefectRectangleIndicatorEditor.cs" />
- <Compile Remove="FrmDefectRectangleIndicatorEditor.Designer.cs" />
- <Compile Remove="IDefectIndicatorDisplay.cs" />
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Remove="FrmDefectRectangleIndicatorEditor.resx" />
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
- <PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.3" />
- <PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
- <PackageReference Include="System.ServiceModel.Federation" Version="4.8.1" />
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M135.DBManager\Bro.M135.DBManager.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Autofac">
- <HintPath>..\..\libs\Nuget\Autofac.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\libs\Nuget\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="SunnyUI">
- <HintPath>..\..\libs\Nuget\SunnyUI.dll</HintPath>
- </Reference>
- <Reference Include="SunnyUI.Common">
- <HintPath>..\..\libs\Nuget\SunnyUI.Common.dll</HintPath>
- </Reference>
- </ItemGroup>
-
- <ItemGroup>
- <Compile Update="FrmProductList.cs">
- <SubType>UserControl</SubType>
- </Compile>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.M135.Common/DefectRectangleIndicator.cs b/src/Bro.M135.Common/DefectRectangleIndicator.cs
deleted file mode 100644
index 66b2fe4..0000000
--- a/src/Bro.M135.Common/DefectRectangleIndicator.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-锘縰sing Bro.Common.Interface;
-using Bro.UI.Model.Winform;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing.Design;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms.Design;
-
-namespace Bro.M135.Common
-{
-
- public class DefectRectangleIndicator : UIIndicator
- {
- public string DefectName { get; set; }
- public RectangleF DisplayRect { get; set; } = new RectangleF();
- protected int FontSize = 15;
- public override object Clone()
- {
- DefectRectangleIndicator dri = new DefectRectangleIndicator();
- dri.DefectName = this.DefectName;
- dri.DisplayRect = this.DisplayRect;
- return dri;
- }
-
- public override void Draw(Graphics g)
- {
- g.FillRectangle(new SolidBrush(Color.FromArgb(100, BaseColor)), DisplayRect.X, DisplayRect.Y, DisplayRect.Width, DisplayRect.Height);
- Font font = new Font("Tahoma", FontSize);
- var txtSize = g.MeasureString(DefectName, font);
- g.DrawString(DefectName, font, new SolidBrush(Color.FromArgb(100, Color.Red)), (float)(DisplayRect.X + DisplayRect.Width / 2.0 - txtSize.Width / 2.0), DisplayRect.Y + DisplayRect.Height + 5);
- }
-
- public override string GetDisplayText()
- {
- return $"{DefectName}:{DisplayRect.X} {DisplayRect.Y} {DisplayRect.Width} {DisplayRect.Height}";
- }
- }
-
- public class DefectRectangleIndicatorEditor : UITypeEditor
- {
- public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
- {
- return UITypeEditorEditStyle.Modal;
- }
-
- public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
- {
- IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
-
- if (edSvc != null)
- {
- if (context.Instance is IProcessConfig config)
- {
- FrmDefectRectangleIndicatorEditor frm = new FrmDefectRectangleIndicatorEditor();
-
- if (frm.ShowDialog() == DialogResult.OK)
- {
-
- }
- }
- }
-
- return base.EditValue(context, provider, value);
- }
-
- }
-}
diff --git a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.Designer.cs b/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.Designer.cs
deleted file mode 100644
index fe3c176..0000000
--- a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.Designer.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-锘縩amespace Bro.M135.Common
-{
- partial class FrmDefectRectangleIndicatorEditor
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.splitContainer1 = new System.Windows.Forms.SplitContainer();
- this.btnClose = new Sunny.UI.UIButton();
- this.uiGroupBox2 = new Sunny.UI.UIGroupBox();
- this.colorPickDefectColor = new Sunny.UI.UIColorPicker();
- this.cboDefectName = new Sunny.UI.UIComboBox();
- this.uiLabel2 = new Sunny.UI.UILabel();
- this.uiLabel1 = new Sunny.UI.UILabel();
- this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
- this.btnNew = new Sunny.UI.UIButton();
- this.btnDelete = new Sunny.UI.UIButton();
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
- this.splitContainer1.Panel2.SuspendLayout();
- this.splitContainer1.SuspendLayout();
- this.uiGroupBox2.SuspendLayout();
- this.uiGroupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // splitContainer1
- //
- this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
- this.splitContainer1.Location = new System.Drawing.Point(0, 0);
- this.splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel2
- //
- this.splitContainer1.Panel2.Controls.Add(this.btnClose);
- this.splitContainer1.Panel2.Controls.Add(this.uiGroupBox2);
- this.splitContainer1.Panel2.Controls.Add(this.uiGroupBox1);
- this.splitContainer1.Size = new System.Drawing.Size(637, 409);
- this.splitContainer1.SplitterDistance = 405;
- this.splitContainer1.SplitterWidth = 5;
- this.splitContainer1.TabIndex = 0;
- //
- // btnClose
- //
- this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
- this.btnClose.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
- this.btnClose.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnClose.IsScaled = false;
- this.btnClose.Location = new System.Drawing.Point(126, 362);
- this.btnClose.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnClose.Name = "btnClose";
- this.btnClose.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
- this.btnClose.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
- this.btnClose.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.Size = new System.Drawing.Size(86, 34);
- this.btnClose.Style = Sunny.UI.UIStyle.Orange;
- this.btnClose.TabIndex = 1;
- this.btnClose.Text = "纭� 璁�";
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // uiGroupBox2
- //
- this.uiGroupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.uiGroupBox2.Controls.Add(this.colorPickDefectColor);
- this.uiGroupBox2.Controls.Add(this.cboDefectName);
- this.uiGroupBox2.Controls.Add(this.uiLabel2);
- this.uiGroupBox2.Controls.Add(this.uiLabel1);
- this.uiGroupBox2.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiGroupBox2.IsScaled = false;
- this.uiGroupBox2.Location = new System.Drawing.Point(4, 92);
- this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1);
- this.uiGroupBox2.Name = "uiGroupBox2";
- this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
- this.uiGroupBox2.Size = new System.Drawing.Size(218, 262);
- this.uiGroupBox2.TabIndex = 0;
- this.uiGroupBox2.Text = "灞炴��";
- this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // colorPickDefectColor
- //
- this.colorPickDefectColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.colorPickDefectColor.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
- this.colorPickDefectColor.FillColor = System.Drawing.Color.White;
- this.colorPickDefectColor.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.colorPickDefectColor.IsScaled = false;
- this.colorPickDefectColor.Location = new System.Drawing.Point(16, 135);
- this.colorPickDefectColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.colorPickDefectColor.MinimumSize = new System.Drawing.Size(63, 0);
- this.colorPickDefectColor.Name = "colorPickDefectColor";
- this.colorPickDefectColor.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
- this.colorPickDefectColor.Size = new System.Drawing.Size(192, 29);
- this.colorPickDefectColor.TabIndex = 2;
- this.colorPickDefectColor.Text = "uiColorPicker1";
- this.colorPickDefectColor.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
- this.colorPickDefectColor.Value = System.Drawing.Color.Red;
- this.colorPickDefectColor.ValueChanged += new Sunny.UI.UIColorPicker.OnColorChanged(this.colorPickDefectColor_ValueChanged);
- //
- // cboDefectName
- //
- this.cboDefectName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.cboDefectName.DataSource = null;
- this.cboDefectName.FillColor = System.Drawing.Color.White;
- this.cboDefectName.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.cboDefectName.IsScaled = false;
- this.cboDefectName.Location = new System.Drawing.Point(16, 62);
- this.cboDefectName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.cboDefectName.MinimumSize = new System.Drawing.Size(63, 0);
- this.cboDefectName.Name = "cboDefectName";
- this.cboDefectName.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
- this.cboDefectName.Size = new System.Drawing.Size(192, 29);
- this.cboDefectName.TabIndex = 1;
- this.cboDefectName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiLabel2
- //
- this.uiLabel2.BackColor = System.Drawing.Color.Transparent;
- this.uiLabel2.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiLabel2.Location = new System.Drawing.Point(16, 107);
- this.uiLabel2.Name = "uiLabel2";
- this.uiLabel2.Size = new System.Drawing.Size(100, 23);
- this.uiLabel2.TabIndex = 0;
- this.uiLabel2.Text = "棰� 鑹�";
- this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiLabel1
- //
- this.uiLabel1.BackColor = System.Drawing.Color.Transparent;
- this.uiLabel1.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiLabel1.Location = new System.Drawing.Point(16, 34);
- this.uiLabel1.Name = "uiLabel1";
- this.uiLabel1.Size = new System.Drawing.Size(100, 23);
- this.uiLabel1.TabIndex = 0;
- this.uiLabel1.Text = "鍚� 绉�";
- this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiGroupBox1
- //
- this.uiGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.uiGroupBox1.Controls.Add(this.btnNew);
- this.uiGroupBox1.Controls.Add(this.btnDelete);
- this.uiGroupBox1.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiGroupBox1.IsScaled = false;
- this.uiGroupBox1.Location = new System.Drawing.Point(4, 5);
- this.uiGroupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.uiGroupBox1.MinimumSize = new System.Drawing.Size(1, 1);
- this.uiGroupBox1.Name = "uiGroupBox1";
- this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
- this.uiGroupBox1.Size = new System.Drawing.Size(218, 77);
- this.uiGroupBox1.TabIndex = 0;
- this.uiGroupBox1.Text = "鎿嶄綔";
- this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // btnNew
- //
- this.btnNew.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnNew.IsScaled = false;
- this.btnNew.Location = new System.Drawing.Point(14, 29);
- this.btnNew.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnNew.Name = "btnNew";
- this.btnNew.Size = new System.Drawing.Size(86, 34);
- this.btnNew.TabIndex = 1;
- this.btnNew.Text = "鏂� 寤�";
- this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
- //
- // btnDelete
- //
- this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnDelete.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
- this.btnDelete.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
- this.btnDelete.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnDelete.IsScaled = false;
- this.btnDelete.Location = new System.Drawing.Point(122, 29);
- this.btnDelete.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnDelete.Name = "btnDelete";
- this.btnDelete.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
- this.btnDelete.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
- this.btnDelete.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.Size = new System.Drawing.Size(86, 34);
- this.btnDelete.Style = Sunny.UI.UIStyle.Red;
- this.btnDelete.TabIndex = 1;
- this.btnDelete.Text = "鍒� 闄�";
- this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
- //
- // FrmDefectRectangleIndicatorEditor
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(637, 409);
- this.Controls.Add(this.splitContainer1);
- this.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.Name = "FrmDefectRectangleIndicatorEditor";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "妫�娴嬬己闄锋寚绀虹紪杈戠晫闈�";
- this.splitContainer1.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
- this.splitContainer1.ResumeLayout(false);
- this.uiGroupBox2.ResumeLayout(false);
- this.uiGroupBox1.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private SplitContainer splitContainer1;
- private Sunny.UI.UIButton btnClose;
- private Sunny.UI.UIGroupBox uiGroupBox2;
- private Sunny.UI.UIGroupBox uiGroupBox1;
- private Sunny.UI.UIButton btnNew;
- private Sunny.UI.UIButton btnDelete;
- private Sunny.UI.UIColorPicker colorPickDefectColor;
- private Sunny.UI.UIComboBox cboDefectName;
- private Sunny.UI.UILabel uiLabel2;
- private Sunny.UI.UILabel uiLabel1;
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.cs b/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.cs
deleted file mode 100644
index dd9582a..0000000
--- a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-锘縰sing Autofac;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.UI.Model.Winform;
-using System.Data;
-
-namespace Bro.M135.Common
-{
- public partial class FrmDefectRectangleIndicatorEditor : Form
- {
- Canvas canvas = new Canvas();
- public FrmDefectRectangleIndicatorEditor()
- {
- InitializeComponent();
-
- canvas.Dock = DockStyle.Fill;
- splitContainer1.Panel1.Controls.Clear();
- splitContainer1.Panel1.Controls.Add(canvas);
-
- this.Load += FrmDefectRectangleIndicatorEditor_Load;
- }
-
- private void FrmDefectRectangleIndicatorEditor_Load(object? sender, EventArgs e)
- {
- try
- {
- using (var scope = GlobalVar.Container.BeginLifetimeScope())
- {
- var iConfig = scope.Resolve<IProcessConfig>();
- if (iConfig is IDefectIndicatorDisplay idi
- && iConfig is IDefectSwitcher ids
- && iConfig is ISpecCollector isc)
- {
- var defectList = ids.GetDefectSwitch().Select(u => u.DefectName).ToList();
- defectList.AddRange(isc.GetSpecList().Select(u => u.Code));
-
- cboDefectName.DataSource = defectList;
- if (cboDefectName.Items.Count > 0)
- {
- cboDefectName.SelectedIndex = 0;
- }
-
- cboDefectName.TextChanged += CboDefectName_TextChanged;
-
- if (!string.IsNullOrWhiteSpace(idi.BackgroundImageFilePath))
- {
- Bitmap image = new Bitmap(idi.BackgroundImageFilePath);
- if (image != null)
- {
- canvas.LoadImage(image);
- }
- }
-
- idi.DefectIndicatorCollection.ForEach(d =>
- {
- ROI_Rectangle roi = new ROI_Rectangle();
- roi.Name = d.DefectName;
- roi.BaseColor = d.BaseColor;
- roi.DisplayRect = new RectangleF(d.DisplayRect.X, d.DisplayRect.Y, d.DisplayRect.Width, d.DisplayRect.Height);
-
- canvas.Elements.Add(roi);
- });
- }
- }
-
- canvas.OnElementChangedHandle += Canvas_OnElementChangedHandle;
- canvas.OnNewElementCreateDone = OnNewElementCreateDone;
- }
- catch (Exception ex)
- {
- }
- }
-
- private void Canvas_OnElementChangedHandle(IShapeElement obj)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- cboDefectName.Text = ele.Name;
- colorPickDefectColor.Value = (ele as ElementBase).BaseColor;
- }
- }
-
- private void CboDefectName_TextChanged(object? sender, EventArgs e)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- ele.Name = cboDefectName.Text;
- }
- }
-
- private void colorPickDefectColor_ValueChanged(object sender, Color value)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- (ele as ElementBase).BaseColor = colorPickDefectColor.Value;
- }
- }
-
- private void btnNew_Click(object sender, EventArgs e)
- {
- ROI_Rectangle roi = new ROI_Rectangle();
- roi.IsShowRemark = false;
- canvas.SetNewROIType(roi);
- }
-
- private bool OnNewElementCreateDone(Bitmap arg1, IShapeElement ele)
- {
- if (ele is ElementBase b)
- {
- b.Name = cboDefectName.Text;
- b.BaseColor = colorPickDefectColor.Value;
- b.IsShowRemark = true;
- }
-
- return true;
- }
-
- private void btnDelete_Click(object sender, EventArgs e)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- canvas.Elements.Remove(ele);
- }
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- List<DefectRectangleIndicator> indicators = new List<DefectRectangleIndicator>();
- canvas.Elements.ToList().ForEach(u =>
- {
- if (u is ROI_Rectangle roi)
- {
- DefectRectangleIndicator indicator = new DefectRectangleIndicator()
- {
- DefectName = u.Name,
- BaseColor = roi.BaseColor,
- DisplayRect = new RectangleF(roi.DisplayRect.X, roi.DisplayRect.Y, roi.DisplayRect.Width, roi.DisplayRect.Height)
- };
-
- indicators.Add(indicator);
- }
- });
-
- using (var scope = GlobalVar.Container.BeginLifetimeScope())
- {
- var iConfig = scope.Resolve<IProcessConfig>();
- if (iConfig is IDefectIndicatorDisplay config)
- {
- config.DefectIndicatorCollection = new List<DefectRectangleIndicator>(indicators);
- }
- }
-
- this.DialogResult = DialogResult.OK;
- }
- }
-}
diff --git a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.resx b/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.resx
deleted file mode 100644
index f298a7b..0000000
--- a/src/Bro.M135.Common/FrmDefectRectangleIndicatorEditor.resx
+++ /dev/null
@@ -1,60 +0,0 @@
-锘�<root>
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M135.Common/FrmProductList.Designer.cs b/src/Bro.M135.Common/FrmProductList.Designer.cs
deleted file mode 100644
index de39347..0000000
--- a/src/Bro.M135.Common/FrmProductList.Designer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-锘縩amespace Bro.M135.Common
-{
- partial class FrmProductList
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
- this.Text = "FrmProductList";
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M135.Common/FrmProductList.cs b/src/Bro.M135.Common/FrmProductList.cs
deleted file mode 100644
index ea835a5..0000000
--- a/src/Bro.M135.Common/FrmProductList.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Model;
-using Bro.UI.Model.Winform;
-using Sunny.UI;
-using System.ComponentModel;
-using System.Data;
-
-namespace Bro.M135.Common
-{
- //[MenuNode("ProductList", "浜у搧鍒楄〃", 2, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmProductList : MenuFormBase
- {
- DataGridView dgvProducts = new DataGridView();
- bool _isFirstLoaded = true;
- object _loadLock = new object();
-
-
- //BindingList<dynamic> BindDatas = new BindingList<dynamic>();
-
- BindingList<Dictionary<string, object>> BindDatas = new BindingList<Dictionary<string, object>>();
-
- public FrmProductList()
- {
- InitializeComponent();
-
- dgvProducts.AutoGenerateColumns = false;
- dgvProducts.ReadOnly = true;
- dgvProducts.AllowUserToAddRows = false;
- dgvProducts.AllowUserToDeleteRows = false;
- dgvProducts.Dock = DockStyle.Fill;
- dgvProducts.RowsAdded += DgvProducts_RowsAdded;
- this.Controls.Add(dgvProducts);
-
- var head = new Dictionary<string, string>() { { "PID", "PID" }, { "鏉$爜", "SN" }, { "妫�娴嬬粨鏋�", "Result" } };
- head.ForEach(u =>
- {
- DataGridViewColumn col = new DataGridViewTextBoxColumn();
- col.HeaderText = u.Key;
- col.DataPropertyName = u.Value;
- col.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
-
- dgvProducts.Columns.Add(col);
- });
-
- dgvProducts.DataSource = BindDatas;
- }
-
- private void DgvProducts_RowsAdded(object? sender, DataGridViewRowsAddedEventArgs e)
- {
- int rowIndex = e.RowIndex;
- if (rowIndex < 0)
- return;
-
- try
- {
- if (dgvProducts.Rows[rowIndex].DataBoundItem is Dictionary<string, object> model)
- {
- for (int i = 0; i < dgvProducts.Columns.Count; i++)
- {
- string propName = dgvProducts.Columns[i].DataPropertyName;
- var cell = dgvProducts.Rows[rowIndex].Cells[i];
- cell.Value = model[propName];
-
- if (i == 2)
- {
- if (cell.Value.ToString().ToUpper().StartsWith("OK"))
- {
- cell.Style.BackColor = Color.Lime;
- }
- else
- {
- cell.Style.BackColor = Color.Red;
- }
- }
- else if (i > 2 && i < dgvProducts.Columns.Count - 1)
- {
- var measureResult = model[$"{propName}_MeasureResult"] as bool?;
- if (measureResult == null)
- {
- cell.Style.BackColor = Color.Orange;
- }
- else if (measureResult.Value == false)
- {
- cell.Style.BackColor = Color.Red;
- }
- }
- else if (i == dgvProducts.Columns.Count - 1)
- {
- if (!string.IsNullOrWhiteSpace(cell.Value.ToString()))
- {
- cell.Style.BackColor = Color.Red;
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鐣岄潰娣诲姞鏂颁骇鍝佹暟鎹椂寮傚父锛寋ex.GetExceptionMessage()}");
- }
- }
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- if (Process is IUpdateProductData upd)
- {
- upd.OnUpdateProductData -= Upd_OnUpdateProductData;
- upd.OnUpdateProductData += Upd_OnUpdateProductData;
- }
- }
-
- private async void Upd_OnUpdateProductData(ProductModel p)
- {
- await Task.Run(() =>
- {
- this.Invoke(() =>
- {
- var specList = p.Details.SelectMany(u => u.SpecList ?? new List<Spec>()).ToList();
- specList.AddRange(p.Details.SelectMany(u => u.ResultList.SelectMany(s => s.Specs.Select(m => (Spec)m))));
- specList.Sort((a, b) => string.Compare(a.Code, b.Code));
-
- if (_isFirstLoaded)
- {
- lock (_loadLock)
- {
- if (_isFirstLoaded)
- {
- _isFirstLoaded = false;
-
- specList.ForEach(s =>
- {
- DataGridViewColumn col = new DataGridViewTextBoxColumn();
- col.HeaderText = s.Code;
- col.DataPropertyName = s.Code;
- col.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
- col.DefaultCellStyle.Format = "f4";
-
- dgvProducts.Columns.Add(col);
- });
-
- DataGridViewColumn col = new DataGridViewTextBoxColumn();
- col.HeaderText = "缂洪櫡姹囨��";
- col.DataPropertyName = "Defects";
- col.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
-
- dgvProducts.Columns.Add(col);
- }
- }
- }
-
- Dictionary<string, object> model = new Dictionary<string, object>();
- model["PID"] = p.PID;
- model["SN"] = p.SN;
- model["Result"] = p.Result;
- specList.ForEach(s =>
- {
- model[s.Code] = s.GetMeasureValueStr();
- model[$"{s.Code}_MeasureResult"] = s.MeasureResult;
- });
-
- var defects = p.Details.SelectMany(u => u.ResultList.GetDefectDescList()).ToList();
- defects.AddRange(p.Details.SelectMany(u => u.DefectList));
- defects.AddRange(p.Details.SelectMany(u => u.SpecList.Where(s => s.MeasureResult != true).Select(s => s.Code)));
- model["Defects"] = $"{string.Join(",", defects)}";
-
- BindDatas.Insert(0, model);
-
- while (BindDatas.Count > 100)
- {
- BindDatas.RemoveAt(BindDatas.Count - 1);
- }
-
- //dgvProducts.DataSource = null;
- //dgvProducts.DataSource = BindDatas;
-
- dgvProducts.Invalidate();
- });
- });
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (Process is IUpdateProductData upd)
- {
- upd.OnUpdateProductData -= Upd_OnUpdateProductData;
- }
- }
- }
-}
diff --git a/src/Bro.M135.Common/FrmProductList.resx b/src/Bro.M135.Common/FrmProductList.resx
deleted file mode 100644
index 1af7de1..0000000
--- a/src/Bro.M135.Common/FrmProductList.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M135.Common/IDefectIndicatorDisplay.cs b/src/Bro.M135.Common/IDefectIndicatorDisplay.cs
deleted file mode 100644
index cba1fce..0000000
--- a/src/Bro.M135.Common/IDefectIndicatorDisplay.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M135.Common
-{
- public interface IDefectIndicatorDisplay
- {
- string BackgroundImageFilePath { get; set; }
-
- List<DefectRectangleIndicator> DefectIndicatorCollection { get; set; }
- }
-}
diff --git a/src/Bro.M135.Common/IUpdateProductData.cs b/src/Bro.M135.Common/IUpdateProductData.cs
deleted file mode 100644
index fbc2ac7..0000000
--- a/src/Bro.M135.Common/IUpdateProductData.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-锘縩amespace Bro.M135.Common
-{
- public interface IUpdateProductData
- {
- event Action<ProductModel> OnUpdateProductData;
- }
-}
diff --git a/src/Bro.M135.Common/MESHelper.cs b/src/Bro.M135.Common/MESHelper.cs
deleted file mode 100644
index 57429e0..0000000
--- a/src/Bro.M135.Common/MESHelper.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Model;
-using Newtonsoft.Json;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Drawing.Design;
-
-namespace Bro.M135.Common
-{
- public class MESHelper
- {
- public List<string> AllDefects { get; set; } = new List<string>();
-
- WebApiHelper apiHelper = new WebApiHelper();
-
- public bool UploadDataToMES(string mesURL, string stationCode, bool isOK, ProductModel p)
- {
- try
- {
- Stopwatch sw = new Stopwatch();
- sw.Start();
-
- string data = GetDefectDataStrForMESUpload(stationCode, isOK, p);
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"浜у搧{p.PID} {p.SN}妫�娴嬩笂浼犱俊鎭瘂data}");
-
- var replyData = apiHelper.dooPost(mesURL, data);
- sw.Stop();
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{p.PID} {p.SN}妫�娴嬩笂浼犱俊鎭畬鎴愶紝鍙嶉{replyData}锛岃�楁椂{sw.ElapsedMilliseconds}ms");
-
- return true;
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{stationCode}涓婁紶淇℃伅寮傚父锛寋ex.GetExceptionMessage()}");
- return false;
- }
- }
-
-
- const string MES_OK = "Passed";
- const string MES_NG = "Failed";
- private string GetDefectDataStrForMESUpload(string stationCode, bool isOK, ProductModel p)
- {
- MESDataFrame dataFrame = new MESDataFrame();
- dataFrame.workPlace = stationCode;
-
- snData data = new snData();
- data.sn = "";
- data.dateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- data.result = isOK ? MES_OK : MES_NG;
-
- var specList = p.Details.SelectMany(u => u.ResultList.SelectMany(u => u.Specs)).ToList();
- specList.AddRange(p.Details.SelectMany(u => u.SpecList ?? new List<Spec>()));
-
- specList.ForEach(s =>
- {
- measurement mm = new measurement();
- mm.reference = s.Code;
- mm.type = "1";
- mm.status = s.MeasureResult == true ? MES_OK : MES_NG;
- mm.value = s.GetMeasureValueStr(4);
- mm.ucl = (s.StandardValue + s.Tolrenance_Positive).ToString("f4");
- mm.lcl = (s.StandardValue - s.Tolrenance_Negative).ToString("f4");
- data.measurements.Add(mm);
- });
-
- var allDefects = p.Details.SelectMany(u => u.ResultList).ToList().GetDefectDescList();
- allDefects.AddRange(p.Details.SelectMany(u => u.DefectList ?? new List<string>()));
- allDefects = allDefects.Distinct().ToList();
- var assignedDefects = new List<string>();
-
- AllDefects.ForEach(s =>
- {
- measurement mm = new measurement();
- mm.reference = s;
- mm.type = "2";
- mm.status = allDefects.Contains(s) ? MES_NG : MES_OK;
- data.measurements.Add(mm);
- });
-
- allDefects.ForEach(s =>
- {
- if (!data.measurements.Any(u => u.reference == s))
- {
- measurement mm = new measurement();
- mm.reference = s;
- mm.type = "2";
- mm.status = MES_NG;
- data.measurements.Add(mm);
- }
- });
-
- dataFrame.snData.Add(data);
-
- return JsonConvert.SerializeObject(dataFrame);
- }
- }
-
- public class MESDataFrame
- {
- public string workPlace { get; set; } = "";
-
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<snData>), typeof(UITypeEditor))]
- public List<snData> snData { get; set; } = new List<snData>();
- }
-
- public class snData : IComplexDisplay
- {
- public string sn { get; set; } = "";
- public string dateTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- public string result { get; set; } = "";
-
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<measurement>), typeof(UITypeEditor))]
- public List<measurement> measurements { get; set; } = new List<measurement>();
-
- //[TypeConverter(typeof(CollectionCountConvert))]
- //[Editor(typeof(ComplexCollectionEditor<apperErr>), typeof(UITypeEditor))]
- //public List<apperErr> apperErr { get; set; } = new List<apperErr>();
-
- public string GetDisplayText()
- {
- return $"{sn} {result}";
- }
- }
-
- public class measurement : IComplexDisplay
- {
- public string reference { get; set; } = "";
- public string type { get; set; } = "1";
- public string status { get; set; } = "";
- public string value { get; set; } = "";
- public string ucl { get; set; } = "";
- public string lcl { get; set; } = "";
-
- public string GetDisplayText()
- {
- return $"{reference} {status} {value}";
- }
- }
-
- //public class apperErr : IComplexDisplay
- //{
- // public string apper { get; set; } = "";
-
- // public string GetDisplayText()
- // {
- // return apper;
- // }
- //}
-}
diff --git a/src/Bro.M135.DBManager/Bro.M135.DBManager.csproj b/src/Bro.M135.DBManager/Bro.M135.DBManager.csproj
deleted file mode 100644
index d40f993..0000000
--- a/src/Bro.M135.DBManager/Bro.M135.DBManager.csproj
+++ /dev/null
@@ -1,44 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <AssemblyVersion>1.0.31208.0</AssemblyVersion>
- <FileVersion>1.0.31208.0</FileVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <None Include="..\..\.editorconfig" Link=".editorconfig" />
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
- <PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.3" />
- <PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
- <PackageReference Include="System.ServiceModel.Federation" Version="4.8.1" />
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process.DataBase">
- <HintPath>..\..\libs\PFW\Bro.Process.DataBase.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.EntityFrameworkCore">
- <HintPath>..\..\libs\Nuget\Microsoft.EntityFrameworkCore.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.EntityFrameworkCore.SqlServer">
- <HintPath>..\..\libs\Nuget\Microsoft.EntityFrameworkCore.SqlServer.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\libs\Nuget\Newtonsoft.Json.dll</HintPath>
- </Reference>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.M135.DBManager/M135DB.cs b/src/Bro.M135.DBManager/M135DB.cs
deleted file mode 100644
index 099d10c..0000000
--- a/src/Bro.M135.DBManager/M135DB.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-锘縰sing Bro.Process.DataBase;
-using Microsoft.EntityFrameworkCore;
-
-namespace Bro.M135.DBManager
-{
- public class M135DB : ProcessDB
- {
- public virtual DbSet<P_PRODUCT> P_PRODUCT { get; set; }
- public virtual DbSet<P_PRODUCT_DETAIL> P_PRODUCT_DETAIL { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT.cs b/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT.cs
deleted file mode 100644
index 6b6d00d..0000000
--- a/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT.cs
+++ /dev/null
@@ -1,443 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.DataBase.Model;
-using Newtonsoft.Json;
-
-namespace Bro.M135.DBManager
-{
- public class Manager_P_PRODUCT : ModelManager<P_PRODUCT, M135DB>
- {
- public bool NewProduct(P_PRODUCT p, List<P_PRODUCT_DETAIL> details, out string msg)
- {
- msg = "";
- try
- {
- using (var context = new M135DB())
- {
- p.CREATE_TIME = DateTime.Now;
-
- details.ForEach(d =>
- {
- d.PID = p.PID;
- d.SN = p.SN;
- d.CREATE_TIME = DateTime.Now;
- });
-
- context.P_PRODUCT.Add(p);
- context.P_PRODUCT_DETAIL.AddRange(details);
-
- context.SaveChanges();
- }
-
- return true;
- }
- catch (Exception ex)
- {
- msg = ex.GetExceptionMessage();
- return false;
- }
- }
-
- public bool NewProductDetails(List<P_PRODUCT_DETAIL> details, out string msg)
- {
- msg = "";
- try
- {
- using (var context = new M135DB())
- {
- details.ForEach(d =>
- {
- d.CREATE_TIME = DateTime.Now;
- });
-
- context.P_PRODUCT_DETAIL.AddRange(details);
- context.SaveChanges();
- }
-
- return true;
- }
- catch (Exception ex)
- {
- msg = ex.GetExceptionMessage();
- return false;
- }
- }
-
- public List<P_PRODUCT> QueryProduct(Request_P_Product request)
- {
- List<P_PRODUCT> pList = new List<P_PRODUCT>();
- using (var context = new M135DB())
- {
- IQueryable<P_PRODUCT> list = context.P_PRODUCT.Where(u => true);
-
- if (request.StartTime != null)
- {
- list = list.Where(u => u.CREATE_TIME >= request.StartTime.Value);
- }
-
- if (request.EndTime != null)
- {
- list = list.Where(u => u.CREATE_TIME <= request.EndTime.Value);
- }
-
- if (!string.IsNullOrWhiteSpace(request.SearchTxt))
- {
- list = list.Where(u => u.SN.Contains(request.SearchTxt));
- }
-
- if (!string.IsNullOrWhiteSpace(request.ClassResult))
- {
- list = list.Where(u => u.Result == request.ClassResult);
- }
-
- if (request.IsOrderAsc)
- {
- list = list.OrderBy(u => u.ID);
- }
- else
- {
- list = list.OrderByDescending(u => u.ID);
- }
-
- request.TotalNum = list.Count();
- if (request.PageSize > 0 && request.PageNum > 0)
- {
- pList = list.Skip(request.PageSize * (request.PageNum - 1)).Take(request.PageSize).ToList();
- }
- else
- {
- pList = list.ToList();
- }
-
- if (request.IsIncludeDetail)
- {
- pList.ForEach(p =>
- {
- p.Details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID).ToList();
- });
- }
- }
-
- return pList;
- }
-
- public void UpdatePositionResult(P_PRODUCT_DETAIL detail)
- {
- if (detail == null)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"妫�娴嬪伐浣嶆槑缁嗙粨鏋滀笂浼犲璞′负绌�");
- return;
- }
-
- try
- {
- using (var context = new M135DB())
- {
- P_PRODUCT_DETAIL d = null;
- if (detail.ID > 0)
- {
- d = context.P_PRODUCT_DETAIL.FirstOrDefault(u => u.ID == detail.ID);
- }
- else
- {
- d = context.P_PRODUCT_DETAIL.OrderByDescending(u => u.ID).FirstOrDefault(u => u.PID == detail.PID && u.STATION_CODE == detail.STATION_CODE && u.PositionName == detail.PositionName);
- }
-
- if (d == null)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{detail.PID} 宸ヤ綅{detail.PositionName}妫�娴嬫槑缁嗘湭鑳藉湪鏁版嵁搴撲腑鏌ヨ鑾峰彇");
- }
- else
- {
- if (string.IsNullOrWhiteSpace(d.SN) && !string.IsNullOrWhiteSpace(detail.SN))
- {
- d.SN = detail.SN;
- }
-
- List<ISpec> specList = detail.ResultList.SelectMany(u => u.Specs).ToList();
- if (detail.SpecList != null)
- {
- specList.AddRange(detail.SpecList);
- }
-
- List<string> defectList = detail.ResultList.GetDefectDescList();
- if (detail.DefectList != null)
- {
- defectList.AddRange(detail.DefectList);
- }
-
- d.IsDone = detail.IsDone;
-
- //鍙栨秷琛ュ伩鍊硷紝閬垮厤鍙嶅簭鍒楀寲鏃堕噸澶嶆墽琛岃ˉ鍋�
- specList.ForEach(s =>
- {
- s.IsEnableCompensation = false;
- s.CompensationValue = new List<double>() { 0,0};
- });
-
- d.FAIData = JsonConvert.SerializeObject(specList);
- d.DefectDesc = JsonConvert.SerializeObject(defectList);
-
- d.UPDATE_TIME = DateTime.Now;
-
- context.SaveChanges();
- }
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{detail?.PID} 鏉$爜{detail?.SN} 宸ヤ綅{detail?.PositionName} 妫�娴嬬粨鏋滀繚瀛樺紓甯革紝{ex.GetExceptionMessage()}");
- }
- }
-
- public P_PRODUCT QueryProductByBarcode(string sn)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.OrderByDescending(p => p.ID).FirstOrDefault(u => u.SN == sn);
-
- if (p != null)
- {
- //var details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID);
-
- //details.GroupBy(u => u.STATION_CODE).ToList().ForEach(u =>
- //{
- // u.ToList().GroupBy(m => m.PositionName).ToList().ForEach(c =>
- // {
- // p.Details.Add(c.OrderByDescending(n => n.ID).FirstOrDefault());
- // });
- //});
-
- p.Details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID).ToList();
- }
- return p;
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏁版嵁搴撴牴鎹潯鐮亄sn}鑾峰彇浜у搧淇℃伅寮傚父,{ex.GetExceptionMessage()}");
- }
-
- return null;
- }
-
- public P_PRODUCT QueryProductBySequence(string sequence)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.OrderByDescending(p => p.ID).FirstOrDefault(u => u.SEQUENCE == sequence);
-
- if (p != null)
- {
- //var details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID);
-
- //details.GroupBy(u => u.STATION_CODE).ToList().ForEach(u =>
- //{
- // u.ToList().GroupBy(m => m.PositionName).ToList().ForEach(c =>
- // {
- // p.Details.Add(c.OrderByDescending(n => n.ID).FirstOrDefault());
- // });
- //});
-
- p.Details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID).ToList();
- }
- return p;
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏁版嵁搴撴牴鎹簭鍒楀彿{sequence}鑾峰彇浜у搧淇℃伅寮傚父,{ex.GetExceptionMessage()}");
- }
-
- return null;
- }
-
- public P_PRODUCT QueryProductByPID(string pid)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.OrderByDescending(p => p.ID).FirstOrDefault(u => u.PID == pid);
-
- if (p != null)
- {
- //var details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID);
-
- //details.GroupBy(u => u.STATION_CODE).ToList().ForEach(u =>
- //{
- // u.ToList().GroupBy(m => m.PositionName).ToList().ForEach(c =>
- // {
- // p.Details.Add(c.OrderByDescending(n => n.ID).FirstOrDefault());
- // });
- //});
-
- p.Details = context.P_PRODUCT_DETAIL.Where(u => u.PID == p.PID).ToList();
- }
- return p;
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏁版嵁搴撴牴鎹潯鐮亄pid}鑾峰彇浜у搧淇℃伅寮傚父,{ex.GetExceptionMessage()}");
- }
-
- return null;
- }
-
- public void UpdateProductSN(string pid, string sn)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.OrderByDescending(p => p.ID).FirstOrDefault(u => u.PID == pid);
- var details = context.P_PRODUCT_DETAIL.Where(u => u.PID == pid).ToList();
- DateTime dt = DateTime.Now;
- if (p != null)
- {
- p.SN = sn;
- p.UPDATE_TIME = dt;
- }
-
- if (details.Count > 0)
- {
- List<P_PRODUCT_DETAIL> latestDetail = new List<P_PRODUCT_DETAIL>();
- details.GroupBy(u => u.STATION_CODE).ToList().ForEach(u =>
- {
- u.ToList().GroupBy(m => m.PositionName).ToList().ForEach(c =>
- {
- latestDetail.Add(c.OrderByDescending(n => n.ID).FirstOrDefault());
- });
- });
-
- latestDetail.ForEach(d =>
- {
- if (string.IsNullOrWhiteSpace(d.SN) && !string.IsNullOrWhiteSpace(sn))
- {
- d.SN = sn;
- d.UPDATE_TIME = dt;
- }
- });
- }
-
- context.SaveChanges();
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{pid}鏇存柊鏉$爜{sn}鏃跺紓甯革紝{ex.GetExceptionMessage()}");
- }
- }
-
-
- public void UpdateProductPID(string pid, string newsen,string newpid)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.OrderByDescending(p => p.ID).FirstOrDefault(u => u.PID == pid);
- var details = context.P_PRODUCT_DETAIL.Where(u => u.PID == pid).ToList();
- DateTime dt = DateTime.Now;
- if (p != null)
- {
- p.PID = newpid;
- p.SEQUENCE = newsen;
- p.UPDATE_TIME = dt;
- }
-
- if (details.Count > 0)
- {
- List<P_PRODUCT_DETAIL> latestDetail = new List<P_PRODUCT_DETAIL>();
- details.GroupBy(u => u.STATION_CODE).ToList().ForEach(u =>
- {
- u.ToList().GroupBy(m => m.PositionName).ToList().ForEach(c =>
- {
- latestDetail.Add(c.OrderByDescending(n => n.ID).FirstOrDefault());
- });
- });
-
- latestDetail.ForEach(d =>
- {
- //if (string.IsNullOrWhiteSpace(d.SN) && !string.IsNullOrWhiteSpace(newpid))
- //{
- d.PID = newpid;
- d.UPDATE_TIME = dt;
- //}
- });
- }
-
- context.SaveChanges();
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{pid}鏇存柊鏉$爜{newpid}鏃跺紓甯革紝{ex.GetExceptionMessage()}");
- }
- }
-
- public void UpdateProductResult(int iD, string pid, string sn, string result)
- {
- try
- {
- using (var context = new M135DB())
- {
- var p = context.P_PRODUCT.FirstOrDefault(u => u.ID == iD);
- p.Result = result;
- context.SaveChanges();
- }
- }
- catch (Exception ex)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{pid} 鏉$爜{sn} 鏈�缁堢粨鏋渰result}涓婁紶澶辫触锛寋ex.GetExceptionMessage()}");
- }
- }
-
- public bool DeletOldData(DateTime timeLimit, int dataListCountOnce, out int deleteCount, out string msg, out bool isNoData)
- {
- deleteCount = 0;
- msg = "";
- isNoData = false;
- try
- {
- using (var context = new M135DB())
- {
- var pList = context.P_PRODUCT.Where(u => u.CREATE_TIME < timeLimit).Take(dataListCountOnce);
- if (!pList.Any())
- {
- isNoData = true;
- return true;
- }
-
- var pidList = pList.Select(p => p.PID).ToList();
- deleteCount = pidList.Count;
-
- var details = context.P_PRODUCT_DETAIL.Where(u => pidList.Contains(u.PID));
-
- context.P_PRODUCT_DETAIL.RemoveRange(details);
- context.P_PRODUCT.RemoveRange(pList);
- context.SaveChanges();
- }
- }
- catch (Exception ex)
- {
- msg = $"鑷姩鍒犻櫎鏃ф暟鎹紓甯革紝{ex.GetExceptionMessage()}";
- return false;
- }
-
- return true;
- }
- }
-
- public class Request_P_Product : BaseRequest
- {
- public bool IsIncludeDetail { get; set; } = false;
-
- public string ClassResult { get; set; }
- }
-}
diff --git a/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT_DETAIL.cs b/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT_DETAIL.cs
deleted file mode 100644
index 9b68a6a..0000000
--- a/src/Bro.M135.DBManager/Managers/Manager_P_PRODUCT_DETAIL.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-锘縰sing Bro.DataBase.Model;
-
-namespace Bro.M135.DBManager
-{
- public class Manager_P_PRODUCT_DETAIL : ModelManager<P_PRODUCT_DETAIL, M135DB>
- {
- }
-}
diff --git a/src/Bro.M135_App.Process.dll b/src/Bro.M135_App.Process.dll
deleted file mode 100644
index 0fb5749..0000000
--- a/src/Bro.M135_App.Process.dll
+++ /dev/null
Binary files differ
diff --git a/src/Bro.M141.Process/Bro.M141.Process.csproj b/src/Bro.M141.Process/Bro.M141.Process.csproj
index 9dd8be3..ff7af2b 100644
--- a/src/Bro.M141.Process/Bro.M141.Process.csproj
+++ b/src/Bro.M141.Process/Bro.M141.Process.csproj
@@ -17,34 +17,6 @@
-
- <!--<ItemGroup>
- <Compile Include="M141Process_Statistic.cs" />
- <Compile Include="M141Process_Statistic.cs" />
- </ItemGroup>-->
-
-
-
-
-
- <!--<ItemGroup>
- <Compile Include="M141Process_WorkShift.cs" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- -->
- <!--<Compile Include="M141Process_OEE.cs" />-->
- <!--
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="Connected Services\MESService\Reference.cs" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="Connected Services\MESService\Reference.cs" />
- </ItemGroup>-->
-
<ItemGroup>
<PackageReference Include="NPOI" Version="2.7.1" />
<PackageReference Include="ScottPlot.WinForms" Version="4.1.58" />
@@ -56,56 +28,7 @@
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
- <!--<ItemGroup>
- <Compile Include="UI\DefectRectangleIndicator.cs" />
- <Compile Include="UI\FrmDefectRectangleIndicatorEditor.cs" />
- <Compile Include="UI\FrmDefectRectangleIndicatorEditor.Designer.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="UI\FrmDefectRectangleIndicatorEditor.resx" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="UI\CtrlPositionDisplay.cs" />
- <Compile Include="UI\CtrlPositionDisplay.Designer.cs" />
- <Compile Include="UI\DefectRectangleIndicator.cs" />
- <Compile Include="UI\FrmDefectRectangleIndicatorEditor.cs" />
- <Compile Include="UI\FrmDefectRectangleIndicatorEditor.Designer.cs" />
- <Compile Include="UI\FrmProductList.cs" />
- <Compile Include="UI\FrmProductList.Designer.cs" />
- <Compile Include="UI\FrmProductList_M135.cs" />
- <Compile Include="UI\FrmProductStatus.cs" />
- <Compile Include="UI\FrmProductStatus.Designer.cs" />
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Include="UI\CtrlPositionDisplay.resx" />
- <EmbeddedResource Include="UI\FrmDefectRectangleIndicatorEditor.resx" />
- <EmbeddedResource Include="UI\FrmProductList.resx" />
- <EmbeddedResource Include="UI\FrmProductList_M135.resx" />
- <EmbeddedResource Include="UI\FrmProductStatus.resx" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="OldDataClear.cs" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="M141Models.cs" />
- <Compile Include="M141Process_ImageCheck.cs" />
- </ItemGroup>-->
-
- <!--<ItemGroup>
- <Compile Include="M141Config.cs" />
- <Compile Include="M141Process.cs" />
- <Compile Include="M141Process_DBOperation.cs" />
- </ItemGroup>-->
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M135.Common\Bro.M135.Common.csproj" />
- <ProjectReference Include="..\Bro.M135.DBManager\Bro.M135.DBManager.csproj" />
- </ItemGroup>
<ItemGroup>
<Reference Include="Autofac">
diff --git a/src/Bro.M141.Process/Connected Services/MESService/ConnectedService.json b/src/Bro.M141.Process/Connected Services/MESService/ConnectedService.json
deleted file mode 100644
index 1525178..0000000
--- a/src/Bro.M141.Process/Connected Services/MESService/ConnectedService.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "ExtendedData": {
- "inputs": [
- "https://localhost:44311/WSTEST.asmx"
- ],
- "collectionTypes": [
- "System.Array",
- "System.Collections.Generic.Dictionary`2"
- ],
- "namespaceMappings": [
- "*, MESService"
- ],
- "sync": true,
- "targetFramework": "net6.0",
- "typeReuseMode": "All"
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141.Process/Connected Services/MESService/Reference.cs b/src/Bro.M141.Process/Connected Services/MESService/Reference.cs
deleted file mode 100644
index f620f82..0000000
--- a/src/Bro.M141.Process/Connected Services/MESService/Reference.cs
+++ /dev/null
@@ -1,355 +0,0 @@
-锘�//------------------------------------------------------------------------------
-// <auto-generated>
-// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
-//
-// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝骞跺湪浠ヤ笅鏉′欢涓嬩涪澶�:
-// 浠g爜閲嶆柊鐢熸垚銆�
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MESService
-{
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ServiceModel.ServiceContractAttribute(ConfigurationName="MESService.WSTESTSoap")]
- public interface WSTESTSoap
- {
-
- // CODEGEN: 姝e湪鐢熸垚娑堟伅鍗忓畾锛屽洜涓哄懡鍚嶇┖闂� http://tempuri.org/ 鐨勫厓绱犲悕绉� json 鏈爣璁颁负 nillable
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/aoidataX2966aoi3Insert", ReplyAction="*")]
- MESService.aoidataX2966aoi3InsertResponse aoidataX2966aoi3Insert(MESService.aoidataX2966aoi3InsertRequest request);
-
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/aoidataX2966aoi3Insert", ReplyAction="*")]
- System.Threading.Tasks.Task<MESService.aoidataX2966aoi3InsertResponse> aoidataX2966aoi3InsertAsync(MESService.aoidataX2966aoi3InsertRequest request);
-
- // CODEGEN: 姝e湪鐢熸垚娑堟伅鍗忓畾锛屽洜涓哄懡鍚嶇┖闂� http://tempuri.org/ 鐨勫厓绱犲悕绉� json 鏈爣璁颁负 nillable
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/checkaoidataX2966aoi3Insert", ReplyAction="*")]
- MESService.checkaoidataX2966aoi3InsertResponse checkaoidataX2966aoi3Insert(MESService.checkaoidataX2966aoi3InsertRequest request);
-
- [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/checkaoidataX2966aoi3Insert", ReplyAction="*")]
- System.Threading.Tasks.Task<MESService.checkaoidataX2966aoi3InsertResponse> checkaoidataX2966aoi3InsertAsync(MESService.checkaoidataX2966aoi3InsertRequest request);
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
- public partial class aoidataX2966aoi3InsertRequest
- {
-
- [System.ServiceModel.MessageBodyMemberAttribute(Name="aoidataX2966aoi3Insert", Namespace="http://tempuri.org/", Order=0)]
- public MESService.aoidataX2966aoi3InsertRequestBody Body;
-
- public aoidataX2966aoi3InsertRequest()
- {
- }
-
- public aoidataX2966aoi3InsertRequest(MESService.aoidataX2966aoi3InsertRequestBody Body)
- {
- this.Body = Body;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
- public partial class aoidataX2966aoi3InsertRequestBody
- {
-
- [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
- public string json;
-
- public aoidataX2966aoi3InsertRequestBody()
- {
- }
-
- public aoidataX2966aoi3InsertRequestBody(string json)
- {
- this.json = json;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
- public partial class aoidataX2966aoi3InsertResponse
- {
-
- [System.ServiceModel.MessageBodyMemberAttribute(Name="aoidataX2966aoi3InsertResponse", Namespace="http://tempuri.org/", Order=0)]
- public MESService.aoidataX2966aoi3InsertResponseBody Body;
-
- public aoidataX2966aoi3InsertResponse()
- {
- }
-
- public aoidataX2966aoi3InsertResponse(MESService.aoidataX2966aoi3InsertResponseBody Body)
- {
- this.Body = Body;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
- public partial class aoidataX2966aoi3InsertResponseBody
- {
-
- [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
- public string aoidataX2966aoi3InsertResult;
-
- public aoidataX2966aoi3InsertResponseBody()
- {
- }
-
- public aoidataX2966aoi3InsertResponseBody(string aoidataX2966aoi3InsertResult)
- {
- this.aoidataX2966aoi3InsertResult = aoidataX2966aoi3InsertResult;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
- public partial class checkaoidataX2966aoi3InsertRequest
- {
-
- [System.ServiceModel.MessageBodyMemberAttribute(Name="checkaoidataX2966aoi3Insert", Namespace="http://tempuri.org/", Order=0)]
- public MESService.checkaoidataX2966aoi3InsertRequestBody Body;
-
- public checkaoidataX2966aoi3InsertRequest()
- {
- }
-
- public checkaoidataX2966aoi3InsertRequest(MESService.checkaoidataX2966aoi3InsertRequestBody Body)
- {
- this.Body = Body;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
- public partial class checkaoidataX2966aoi3InsertRequestBody
- {
-
- [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
- public string json;
-
- public checkaoidataX2966aoi3InsertRequestBody()
- {
- }
-
- public checkaoidataX2966aoi3InsertRequestBody(string json)
- {
- this.json = json;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
- public partial class checkaoidataX2966aoi3InsertResponse
- {
-
- [System.ServiceModel.MessageBodyMemberAttribute(Name="checkaoidataX2966aoi3InsertResponse", Namespace="http://tempuri.org/", Order=0)]
- public MESService.checkaoidataX2966aoi3InsertResponseBody Body;
-
- public checkaoidataX2966aoi3InsertResponse()
- {
- }
-
- public checkaoidataX2966aoi3InsertResponse(MESService.checkaoidataX2966aoi3InsertResponseBody Body)
- {
- this.Body = Body;
- }
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
- public partial class checkaoidataX2966aoi3InsertResponseBody
- {
-
- [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
- public string checkaoidataX2966aoi3InsertResult;
-
- public checkaoidataX2966aoi3InsertResponseBody()
- {
- }
-
- public checkaoidataX2966aoi3InsertResponseBody(string checkaoidataX2966aoi3InsertResult)
- {
- this.checkaoidataX2966aoi3InsertResult = checkaoidataX2966aoi3InsertResult;
- }
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- public interface WSTESTSoapChannel : MESService.WSTESTSoap, System.ServiceModel.IClientChannel
- {
- }
-
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
- public partial class WSTESTSoapClient : System.ServiceModel.ClientBase<MESService.WSTESTSoap>, MESService.WSTESTSoap
- {
-
- /// <summary>
- /// 瀹炵幇姝ゅ垎閮ㄦ柟娉曪紝閰嶇疆鏈嶅姟缁堢粨鐐广��
- /// </summary>
- /// <param name="serviceEndpoint">瑕侀厤缃殑缁堢粨鐐�</param>
- /// <param name="clientCredentials">瀹㈡埛绔嚟鎹�</param>
- static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
-
- public WSTESTSoapClient(EndpointConfiguration endpointConfiguration) :
- base(WSTESTSoapClient.GetBindingForEndpoint(endpointConfiguration), WSTESTSoapClient.GetEndpointAddress(endpointConfiguration))
- {
- this.Endpoint.Name = endpointConfiguration.ToString();
- ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
- }
-
- public WSTESTSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
- base(WSTESTSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
- {
- this.Endpoint.Name = endpointConfiguration.ToString();
- ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
- }
-
- public WSTESTSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
- base(WSTESTSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
- {
- this.Endpoint.Name = endpointConfiguration.ToString();
- ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
- }
-
- public WSTESTSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
- base(binding, remoteAddress)
- {
- }
-
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- MESService.aoidataX2966aoi3InsertResponse MESService.WSTESTSoap.aoidataX2966aoi3Insert(MESService.aoidataX2966aoi3InsertRequest request)
- {
- return base.Channel.aoidataX2966aoi3Insert(request);
- }
-
- public string aoidataX2966aoi3Insert(string json)
- {
- MESService.aoidataX2966aoi3InsertRequest inValue = new MESService.aoidataX2966aoi3InsertRequest();
- inValue.Body = new MESService.aoidataX2966aoi3InsertRequestBody();
- inValue.Body.json = json;
- MESService.aoidataX2966aoi3InsertResponse retVal = ((MESService.WSTESTSoap)(this)).aoidataX2966aoi3Insert(inValue);
- return retVal.Body.aoidataX2966aoi3InsertResult;
- }
-
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- System.Threading.Tasks.Task<MESService.aoidataX2966aoi3InsertResponse> MESService.WSTESTSoap.aoidataX2966aoi3InsertAsync(MESService.aoidataX2966aoi3InsertRequest request)
- {
- return base.Channel.aoidataX2966aoi3InsertAsync(request);
- }
-
- public System.Threading.Tasks.Task<MESService.aoidataX2966aoi3InsertResponse> aoidataX2966aoi3InsertAsync(string json)
- {
- MESService.aoidataX2966aoi3InsertRequest inValue = new MESService.aoidataX2966aoi3InsertRequest();
- inValue.Body = new MESService.aoidataX2966aoi3InsertRequestBody();
- inValue.Body.json = json;
- return ((MESService.WSTESTSoap)(this)).aoidataX2966aoi3InsertAsync(inValue);
- }
-
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- MESService.checkaoidataX2966aoi3InsertResponse MESService.WSTESTSoap.checkaoidataX2966aoi3Insert(MESService.checkaoidataX2966aoi3InsertRequest request)
- {
- return base.Channel.checkaoidataX2966aoi3Insert(request);
- }
-
- public string checkaoidataX2966aoi3Insert(string json)
- {
- MESService.checkaoidataX2966aoi3InsertRequest inValue = new MESService.checkaoidataX2966aoi3InsertRequest();
- inValue.Body = new MESService.checkaoidataX2966aoi3InsertRequestBody();
- inValue.Body.json = json;
- MESService.checkaoidataX2966aoi3InsertResponse retVal = ((MESService.WSTESTSoap)(this)).checkaoidataX2966aoi3Insert(inValue);
- return retVal.Body.checkaoidataX2966aoi3InsertResult;
- }
-
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- System.Threading.Tasks.Task<MESService.checkaoidataX2966aoi3InsertResponse> MESService.WSTESTSoap.checkaoidataX2966aoi3InsertAsync(MESService.checkaoidataX2966aoi3InsertRequest request)
- {
- return base.Channel.checkaoidataX2966aoi3InsertAsync(request);
- }
-
- public System.Threading.Tasks.Task<MESService.checkaoidataX2966aoi3InsertResponse> checkaoidataX2966aoi3InsertAsync(string json)
- {
- MESService.checkaoidataX2966aoi3InsertRequest inValue = new MESService.checkaoidataX2966aoi3InsertRequest();
- inValue.Body = new MESService.checkaoidataX2966aoi3InsertRequestBody();
- inValue.Body.json = json;
- return ((MESService.WSTESTSoap)(this)).checkaoidataX2966aoi3InsertAsync(inValue);
- }
-
- public virtual System.Threading.Tasks.Task OpenAsync()
- {
- return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
- }
-
- public virtual System.Threading.Tasks.Task CloseAsync()
- {
- return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
- }
-
- private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
- {
- if ((endpointConfiguration == EndpointConfiguration.WSTESTSoap))
- {
- System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
- result.MaxBufferSize = int.MaxValue;
- result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
- result.MaxReceivedMessageSize = int.MaxValue;
- result.AllowCookies = true;
- //result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
- result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.None;
- return result;
- }
- if ((endpointConfiguration == EndpointConfiguration.WSTESTSoap12))
- {
- System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
- System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
- textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
- result.Elements.Add(textBindingElement);
- System.ServiceModel.Channels.HttpsTransportBindingElement httpsBindingElement = new System.ServiceModel.Channels.HttpsTransportBindingElement();
- httpsBindingElement.AllowCookies = true;
- httpsBindingElement.MaxBufferSize = int.MaxValue;
- httpsBindingElement.MaxReceivedMessageSize = int.MaxValue;
- result.Elements.Add(httpsBindingElement);
- return result;
- }
- throw new System.InvalidOperationException(string.Format("鎵句笉鍒板悕绉颁负鈥渰0}鈥濈殑缁堢粨鐐广��", endpointConfiguration));
- }
-
- private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
- {
- if ((endpointConfiguration == EndpointConfiguration.WSTESTSoap))
- {
- return new System.ServiceModel.EndpointAddress("https://localhost:44311/WSTEST.asmx");
- }
- if ((endpointConfiguration == EndpointConfiguration.WSTESTSoap12))
- {
- return new System.ServiceModel.EndpointAddress("https://localhost:44311/WSTEST.asmx");
- }
- throw new System.InvalidOperationException(string.Format("鎵句笉鍒板悕绉颁负鈥渰0}鈥濈殑缁堢粨鐐广��", endpointConfiguration));
- }
-
- public enum EndpointConfiguration
- {
-
- WSTESTSoap,
-
- WSTESTSoap12,
- }
- }
-}
diff --git a/src/Bro.M141.Process/M141Config.cs b/src/Bro.M141.Process/M141Config.cs
index 41f455a..43c607b 100644
--- a/src/Bro.M141.Process/M141Config.cs
+++ b/src/Bro.M141.Process/M141Config.cs
@@ -31,29 +31,13 @@
+ [Category("閫氶亾鏁伴厤缃�")]
+ [Description("閫氶亾鏁�")]
+ [DisplayName("閫氶亾鏁�")]
+ public int channelva { get; set; } = 3;
-
- [Category("鐐规閰嶇疆")]
- [Description("鐐规寮�鍏�")]
- [DisplayName("鐐规寮�鍏�")]
-
- public bool PointState { get; set; } = false;
-
-
- [Category("璇荤爜鏁版嵁")]
- [Description("璇荤爜鏁版嵁")]
- [DisplayName("璇荤爜鏁版嵁")]
-
- public string TmpPath { get; set; }
-
- [Category("璇荤爜鏁版嵁")]
- [Description("璇荤爜鏁版嵁")]
- [DisplayName("璇荤爜鏁版嵁")]
- [TypeConverter(typeof(SimpleCollectionConvert<string>))]
- [Editor(typeof(SimpleCollectionEditor<string>), typeof(UITypeEditor))]
- [EditorBrowsable]
- public List<string> BarcodeDataList { get; set; } = new List<string>();
+
[Category("宸ヤ綅淇℃伅")]
[Description("宸ヤ綅淇℃伅閰嶇疆闆嗗悎")]
@@ -81,15 +65,7 @@
[DisplayName("妫�娴嬭秴鏃舵椂闂�")]
public int DetectTimeout { get; set; } = 1000;
- [Category("鏁版嵁搴撹缃�")]
- [Description("鏁版嵁搴撴暟鎹繚瀛樺ぉ鏁帮紝瓒呰繃璇ュぉ鏁扮殑鏁版嵁浼氳鑷姩鍒犻櫎銆傝缃负0鏃朵笉鎵ц鍒犻櫎鎿嶄綔")]
- [DisplayName("鏁版嵁淇濆瓨澶╂暟")]
- public int DBDataTimeLimit { get; set; } = 3;
-
- [Category("鏁版嵁搴撹缃�")]
- [Description("鍒濆鍖栨暟鎹簱鏃剁殑缂撳瓨闃熷垪鏁伴噺")]
- [DisplayName("鍒濆缂撳瓨鏁伴噺")]
- public int DBBufferListCount { get; set; } = 10;
+
[Category("妫�娴嬪紓甯告寚绀�")]
[Description("閫夋嫨鏌愪釜Spec锛屽叾琛ㄧず妫�娴嬭繃绋嬩腑寮傚父")]
@@ -98,13 +74,7 @@
public string CheckErrorSpecCode { get; set; } = "";
-
-
-
- //[Category("璋冭瘯浣跨敤璁剧疆")]
- //[Description("鏄惁鍏佽涓存椂浜у搧鍚敤锛屼娇鐢ㄤ簬涓嶅畬鏁存祦绋嬩腑涓存椂鎺ユ敹妫�娴嬫暟鎹�")]
- //[DisplayName("涓存椂浜у搧寮�鍏�")]
- //public bool IsAllowTempProduct { get; set; } = false;
+
[Category("浣嶇疆搴�/杞粨搴﹁缃�")]
[Description("浜у搧娴嬮噺鐐逛綅闆嗗悎")]
@@ -113,94 +83,7 @@
[Editor(typeof(ComplexCollectionEditor<ContourPoint>), typeof(UITypeEditor))]
public List<ContourPoint> MeasurePointCollection { get; set; } = new List<ContourPoint>();
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [Description("妫�娴嬮」閰嶇疆闆嗗悎锛岃缃寘鍚粍鍚堢偣浣嶇殑妫�娴嬮」")]
- [DisplayName("妫�娴嬮」閰嶇疆闆嗗悎")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<MeasureItemBind>), typeof(UITypeEditor))]
- public List<MeasureItemBind> MeasureItemBinds { get; set; } = new List<MeasureItemBind>();
-
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [DisplayName("杞粨鐐硅绠楀亸绉�")]
- [Description("璁$畻杞粨鐐逛綅缃椂鐨勭偣浣嶅亸绉诲ぇ灏忥紝鍗曚綅mm")]
- public float CountLineShift { get; set; } = 0.5f;
-
- [Category("浣嶇疆搴�/杞粨搴﹁缃�")]
- [DisplayName("娴嬮噺鐐硅ˉ鍋垮�艰缃�")]
- [Description("閽堝鍚勫伐浣嶅搴斾骇鍝佺殑鍚勬娴嬮」鐐癸紝鍋氬崟鐐硅ˉ鍋垮鐞�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<Product_CheckPointsOffsetList>), typeof(UITypeEditor))]
- public List<Product_CheckPointsOffsetList> Product_PointsOffsetList { get; set; } = new List<Product_CheckPointsOffsetList>();
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶URL鍦板潃")]
- [DisplayName("MES涓婁紶URL鍦板潃")]
- public string MESUploadURL { get; set; }
-
- [Category("MES閰嶇疆")]
- [Description("true锛氬惎鐢∕ES涓婁紶 false锛氭湭鍚敤MES涓婁紶")]
- [DisplayName("MES涓婁紶寮�鍏�")]
- public bool IsEnabelMESUpload { get; set; } = false;
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶椤圭洰浠g爜锛屼唬琛≒roject")]
- [DisplayName("MES绔欑偣浠g爜")]
- public string MESProjectCode { get; set; } = "";
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶鏈哄櫒鍙凤紝浠h〃MachineNumber")]
- [DisplayName("MES鏈哄櫒鍙�")]
- public string MESMachineNum { get; set; } = "";
-
- [Category("MES閰嶇疆")]
- [Description("MES涓婁紶浠g爜鍜屾娴嬮」浠g爜鐨勬槧灏勫叧绯�")]
- [DisplayName("MES涓婁紶浠g爜鏄犲皠鍏崇郴")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<MESCodeMapping>), typeof(UITypeEditor))]
- public List<MESCodeMapping> MESCodeMappingCollection { get; set; } = new List<MESCodeMapping>();
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("OEE鏁版嵁涓婁紶URL鍦板潃")]
- [DisplayName("OEE URL")]
- public string OEEDataUploadURL { get; set; } = "";
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("true: 鍚敤OEE鏁版嵁涓婁紶 false锛氱鐢∣EE鏁版嵁涓婁紶")]
- [DisplayName("OEE鏁版嵁涓婁紶鍚敤鏍囪")]
- public bool IsEnableOEEDataUpload { get; set; } = false;
-
- [Category("MES閰嶇疆-OEE涓婁紶")]
- [Description("OEE閰嶇疆WorkPlace淇℃伅")]
- [DisplayName("OEE_WorkPlace")]
- public string OEEConfig_WorkPlace { get; set; } = "";
-
- [Category("鍥剧墖鏄剧ず璁剧疆")]
- [Description("鑳屾櫙鍥剧墖鏂囦欢璺緞")]
- [DisplayName("鑳屾櫙鍥剧墖")]
- [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
- public string BackgroundImageFilePath { get; set; }
-
- [Category("鍥剧墖鏄剧ず璁剧疆")]
- [DisplayName("妫�娴嬬己闄锋樉绀哄竷灞�")]
- [Description("妫�娴嬬晫闈㈢己闄锋樉绀哄竷灞�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(DefectRectangleIndicatorEditor), typeof(UITypeEditor))]
- public List<DefectRectangleIndicator> DefectIndicatorCollection { get; set; } = new List<DefectRectangleIndicator>();
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鐨勬柟寮忥紝鎸夎鎴栧垪鏄剧ず涓�涓骇鍝佺殑鎵�鏈夋暟鎹�")]
- [DisplayName("琛ㄦ牸鏄剧ず")]
- public RefreshMode RefreshModeSelect { get; set; } = RefreshMode.琛�;
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鏁伴噺")]
- [DisplayName("琛ㄦ牸鏄剧ず浜у搧鏁版嵁鏁伴噺")]
- public int DataViewCount { get; set; } = 100;
-
- [Category("琛ㄦ牸鏄剧ず璁剧疆")]
- [Description("琛ㄦ牸浜у搧鏁版嵁鍒锋柊鐨勯鐜囷紝鍗曚綅us")]
- [DisplayName("琛ㄦ牸浜у搧鏁版嵁鍒锋柊棰戠巼")]
- public int DataViewRefreshTime { get; set; } = 1000;
+
[Category("NG鍜孫K鍥剧墖淇濆瓨閰嶇疆")]
[Description("鍥剧墖淇濆瓨鐩綍")]
@@ -270,8 +153,6 @@
-
-
[ResCategory("鍘嬬缉鍥剧墖淇濆瓨閰嶇疆")]
[ResDescription("鍥剧墖鍘嬬缉鐜�")]
[ResDisplayName("鍥剧墖鍘嬬缉鐜�")]
@@ -279,29 +160,7 @@
public zipZip SavezipZip { get; set; } = zipZip.zip;
- [Category("瀹炴椂鏁版嵁鍥炰紶璁剧疆")]
- [Description("閫夋嫨鍥炰紶瀹炴椂鏁版嵁鐨勬湰鍦皊ocket鏈嶅姟绔�")]
- [DisplayName("鍥炰紶鏈嶅姟绔�")]
- [TypeConverter(typeof(DeviceIdSelectorConverter<TcpListenerWrap>))]
- public string RealTimeDataServer { get; set; }
-
- [Category("瀹炴椂鏁版嵁鍥炰紶璁剧疆")]
- [Description("鍥炰紶鏁版嵁鐨勬牸寮忓拰鍐呭璁剧疆")]
- [DisplayName("鍥炰紶鏁版嵁璁剧疆闆嗗悎")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<RealTimeAdjustDataModel>), typeof(UITypeEditor))]
- public List<RealTimeAdjustDataModel> RealTimeDataModels { get; set; } = new List<RealTimeAdjustDataModel>();
-
- [Category("浜у搧璁剧疆")]
- [DisplayName("浜у搧灞曠ず鏁伴噺涓婇檺")]
- [Description("浜у搧灞曠ず鏁伴噺涓婇檺锛岃秴杩囪鏁伴噺鐨勬娴嬭褰曡嚜鍔ㄧЩ闄�")]
- public int MaxProductListAmount { get; set; } = 20;
-
- [Category("蹇冭烦閰嶇疆")]
- [DisplayName("蹇冭烦杩斿洖鍊�")]
- [Description("蹇冭烦杩斿洖鍊�")]
- public string Heartstr { get; set; } = "";
-
+
[Category("绠楁硶棰勭儹璁剧疆")]
@@ -317,19 +176,6 @@
public List<WarmUpOne> WarmUpList { get; set; } = new List<WarmUpOne>();
-
-
- //[Category("妫�娴嬬浉鍏�")]
- //[Description("娴佺▼鍙婅澶囨娴嬫爣鍑嗛泦鍚�")]
- //[DisplayName("妫�娴嬫爣鍑嗛泦鍚�2")]
- //[TypeConverter(typeof(GlobalSpecCollectionCountConverter))]
- //[Editor(typeof(GlobalSpecCollectionEditor), typeof(UITypeEditor))]
- //public List<ISpec> sss { get; set; } = new List<ISpec>();
-
- [Category("缁熻姹囨�婚厤缃�")]
- [Description("姹囨�荤晫闈骇鍝佸垪琛ㄦ渶澶ф暟閲�")]
- [DisplayName("浜у搧鍒楄〃鏈�澶ф暟閲�")]
- public int MaxProductNumForStatistic { get; set; } = 200;
}
diff --git a/src/Bro.M141.Process/M141Models.cs b/src/Bro.M141.Process/M141Models.cs
index 997c866..8eac0b7 100644
--- a/src/Bro.M141.Process/M141Models.cs
+++ b/src/Bro.M141.Process/M141Models.cs
@@ -7,45 +7,7 @@
namespace Bro.M141.Process
{
- public class CheckPoint : IComplexDisplay
- {
- [Browsable(false)]
- public string Id { get; set; } = Guid.NewGuid().ToString();
-
- [Category("妫�娴嬬偣浣�")]
- [Description("鐐逛綅鍚嶇О")]
- [DisplayName("鐐逛綅鍚嶇О")]
- public string Name { get; set; } = "";
-
- [Category("妫�娴嬬偣浣�")]
- [Description("鐐逛綅鍧愭爣锛屾娴嬬偣浣嶇殑杩愬姩鍧愭爣")]
- [DisplayName("鐐逛綅鍧愭爣")]
- [TypeConverter(typeof(ExpandableObjectConverter))]
- public CustomizedPoint PointPosition { get; set; } = new CustomizedPoint();
-
- [Category("妫�娴嬬偣浣�")]
- [Description("鐐逛綅鍧愭爣锛屾娴嬬偣浣嶇殑Z杞村潗鏍�")]
- [DisplayName("鐐逛綅鍧愭爣Z")]
- public double PointZ { get; set; }
-
- [Category("鏍囧畾璁剧疆")]
- [Description("璇ユ娴嬬偣浣嶇殑鏍囧畾鐭╅樀锛屽浘鍍廢V鍧愭爣杞崲涓哄ぇ鏉垮潗鏍囩郴XY鐨勬爣瀹氱煩闃�")]
- [DisplayName("鐐逛綅鏍囧畾鐭╅樀")]
- [TypeConverter(typeof(SimpleCollectionConvert<double>))]
- [Editor(typeof(SimpleCollectionEditor<double>), typeof(UITypeEditor))]
- public List<double> Matrix { get; set; } = new List<double>();
-
- [Category("鍚敤閰嶇疆")]
- [Description("true锛氬惎鐢ㄨ鐐逛綅 false锛氱鐢ㄨ鐐逛綅")]
- [DisplayName("鐐逛綅鍚敤鏍囧織")]
- public bool IsEnabled { get; set; } = true;
-
- public string GetDisplayText()
- {
- return $"{(IsEnabled ? "" : "绂佺敤 ")}{Name} {PointPosition.GetDisplayText()}";
- }
- }
-
+
public enum ContourEdge
{
X,
diff --git a/src/Bro.M141.Process/M141Process.cs b/src/Bro.M141.Process/M141Process.cs
index faaec0b..632d03c 100644
--- a/src/Bro.M141.Process/M141Process.cs
+++ b/src/Bro.M141.Process/M141Process.cs
@@ -22,6 +22,7 @@
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
+using System.Text;
using Windows.ApplicationModel.Appointments;
using Windows.Networking;
using static Org.BouncyCastle.Math.EC.ECCurve;
@@ -35,52 +36,44 @@
public M141Process(string productCode) : base(productCode) { }
#endregion
+ TaskFactory _taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.LongRunning);
- public event Action<string, P_PRODUCT_DETAIL, string> OnSinglePostionDetectResultUpdate;
protected M141Config M141Config => Config as M141Config;
public static object _productListLock = new object();
public List<ProductModel> ProductList = new List<ProductModel>();
MachineLearningBase ML = null;
- TcpListenerWrap TcpListener = null;
- Spec _errorSpec = null;
- public List<ProductModel> ProductSpecResultList { get; set; } = new List<ProductModel>();
- TcpListenerWrap _realTimeServer = null;
- volatile int _productIndex = 0;
-
- int _backgroundImageWidth = 2448;
- public event Action<string, string, List<IShapeElement>> OnPositionResultUpdated;
- public event Action<ProductModel> OnNewProductEnqueued;
- public event Action<ProductModel> OnProductDequeued;
public event Action<List<int>> RefreshUIplc;
public event Action<string> RefreshState;
List<ZipImage> ZipImages = new List<ZipImage>();
- List<OKNGImage> OKNGImages = new List<OKNGImage>();
+
public override void InitialProcessMethods()
{
base.InitialProcessMethods();
- OldDataClear.Instance.RunClearOldData(M141Config.DBDataTimeLimit);
- InitialInspectionConfig();
- InitialSummaryData();
+
+
+
+
+ if (ThHeartPlc == null)
+ {
+ ThHeartPlc = new Thread(Heartplc);
+ ThHeartPlc.IsBackground = true;
+ ThHeartPlc.Start();
+ }
}
public override void ProcessRunStateChanged()
{
base.ProcessRunStateChanged();
- if (CurrentState == EnumHelper.RunState.Running)
- {
- OldDataClear.Instance.SetAllowFlag(false, M141Config.DBDataTimeLimit);
- }
- else
- {
- OldDataClear.Instance.SetAllowFlag(true, M141Config.DBDataTimeLimit);
- }
+
}
public PLCBase Plc1;
Thread ThHeartPlc;
+ Spec _errorSpec;
+ bool isstart = false;
public override void Open()
{
base.Open();
@@ -98,7 +91,7 @@
}
_errorSpec = M141Config.SpecCollection.FirstOrDefault(u => u.Code == M141Config.CheckErrorSpecCode) as Spec;
- InitialProductList();
+
NetWarmUp();
@@ -106,25 +99,77 @@
_positionSpecHeads.Clear();
- if (ThHeartPlc == null)
- {
- ThHeartPlc = new Thread(Heartplc);
- ThHeartPlc.IsBackground = true;
- ThHeartPlc.Start();
- }
-
InitialContinuousNGAlarm();
+
+ int vava = 0;
+ if (M141Config.channelva == 3)
+ {
+ vava = 0;
+ }
+ else if (M141Config.channelva == 2)
+ {
+ vava = 1;
+ }
+
+ Plc1.WriteSingleAddress(3006, vava, out _);
+
+ isstart = true;
}
+ public override void Close()
+ {
+ isstart = false;
+ base.Close();
+ }
+
public void Heartplc()
{
+ Thread.Sleep(1000);
+
+ string _statisticFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Statistic.json");
+ if (File.Exists(_statisticFilePath))
+ {
+ try
+ {
+ string dataStr = "";
+ using (StreamReader reader = new StreamReader(_statisticFilePath, System.Text.Encoding.UTF8))
+ {
+ dataStr = reader.ReadToEnd();
+ }
+
+ lock (StatisticRecordsFull)
+ {
+ var temRecords = JsonConvert.DeserializeObject<StatisticRecords_Full>(dataStr);
+ if (StatisticRecordsFull != null && temRecords != null)
+ {
+ StatisticRecordsFull.CurRecord = temRecords.CurRecord;
+ StatisticRecordsFull.HistoryRecord = temRecords.HistoryRecord;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧缁熻淇℃伅鍙嶅簭鍒楀寲寮傚父");
+ StatisticRecordsFull = new StatisticRecords_Full();
+ }
+ }
int state = 0;
int state2 = 0;
+ int numsum = 0;
+ DateTime dtday = DateTime.Now;
while (true)
{
+ Thread.Sleep(1000);
+
+
+ if (!isstart)
+ {
+ continue;
+ }
+ numsum++;
try
{
@@ -134,10 +179,114 @@
{
}
- Thread.Sleep(1000);
+
+
+
try
{
- var tem = Plc1.Read(3030, 17, out _);
+ if (M141Config.WorkShiftList != null && M141Config.WorkShiftList.Count > 0 && numsum >= 0)
+ {
+ for (int i = 0; i < M141Config.WorkShiftList.Count; i++)
+ {
+
+ double timeshap = (DateTime.Now - M141Config.WorkShiftList[i].ShiftTime_Start).TotalMinutes % 1440;
+ double timeshap2 = (DateTime.Now - M141Config.WorkShiftList[i].ShiftTime_End).TotalMinutes % 1440;
+
+
+ if (timeshap2 > 0 && timeshap2 < 1)
+ {
+ if (M141Config.WorkShiftList[i].IsRecordProductSummary)
+ {
+ string csvPathAll = Path.Combine(M141Config.LogPath, "Alldata.csv");
+
+ using (StreamWriter writer = new StreamWriter(csvPathAll, true, Encoding.UTF8))
+ {
+ try
+ {
+ int sum = StatisticRecordsFull.CurRecord.ProductSummary.RecordsList.Where(u => u.IsStatistic).Sum(u => u.Amount);
+ int OKnum = 0;
+ string okpercent = "";
+ string headcsv = "鏃ユ湡,鐝,鎬绘暟,OK,OK鍗犳瘮";
+ string datacsv = "";
+
+ StatisticRecordsFull.CurRecord.ProductSummary.RecordsList.ForEach(u =>
+ {
+ if (u.ClassDesc.ToUpper() == "OK")
+ {
+ OKnum = u.Amount;
+ okpercent = u.PercentStr;
+ }
+ else
+ {
+ headcsv += $",{u.ClassDesc},{u.ClassDesc}鍗犳瘮";
+ datacsv += $",{u.Amount},{u.PercentStr}";
+ }
+
+ });
+
+ string daystr = DateTime.Now.ToString("yyyyMMdd");
+ if (M141Config.WorkShiftList[i].ShiftTime_End.TimeOfDay < M141Config.WorkShiftList[i].ShiftTime_Start.TimeOfDay)
+ {
+ daystr = DateTime.Now.AddDays(-1).ToString("yyyyMMdd");
+ }
+
+ datacsv = $"{daystr}T,{M141Config.WorkShiftList[i].ShiftName},{sum},{OKnum},{OKnum}" + datacsv;
+
+ writer.WriteLine(headcsv);
+ writer.WriteLine(datacsv);
+
+ }
+ catch (Exception exx)
+ {
+ LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, exx.ToString());
+ }
+ }
+
+ }
+ numsum = -62;
+ }
+
+ if (timeshap > 0 && timeshap < 1)
+ {
+
+ if (M141Config.WorkShiftList[i].IsClearProductSummary)
+ {
+ StatisticRecordsFull.CurRecord.ProductSummary.RecordsList.Clear();
+ StatisticRecordsFull.CurRecord.DefectSummary.RecordsList.Clear();
+ }
+ numsum = -62;
+ }
+ }
+ }
+
+ lock (StatisticRecordsFull)
+ {
+ if (numsum > 20)
+ {
+ numsum = 0;
+ using (FileStream fileStream = new FileStream(_statisticFilePath, FileMode.OpenOrCreate, FileAccess.Write))
+ {
+ fileStream.Seek(0L, SeekOrigin.Begin);
+ string s = JsonConvert.SerializeObject(StatisticRecordsFull);
+ byte[] bytes = Encoding.UTF8.GetBytes(s);
+ fileStream.Write(bytes, 0, bytes.Length);
+ fileStream.SetLength(bytes.Length);
+ fileStream.Flush();
+ fileStream.Close();
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+
+
+ try
+ {
+ var tem = Plc1.Read(3030, 18, out _);
if (tem != null && RefreshUIplc != null)
{
RefreshUIplc.Invoke(tem);
@@ -147,6 +296,7 @@
{
}
+
try
{
var tem = Plc1.Read(3010, 8, out _);
@@ -164,8 +314,6 @@
{
var tem = Plc1.Read(3027, 1, out _)[0];
var tem2 = Plc1.Read(3028, 1, out _)[0];
-
-
if (state != tem || state2 != tem2)
{
state = tem;
@@ -192,11 +340,9 @@
{
}
+
}
}
-
-
-
@@ -205,7 +351,7 @@
try
{
Plc1.WriteSingleAddress(add, va, out _);
- var tem = Plc1.Read(3030, 16, out _);
+ var tem = Plc1.Read(3030, 18, out _);
if (tem != null && RefreshUIplc != null)
{
RefreshUIplc.Invoke(tem);
@@ -311,1425 +457,12 @@
LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, "绠楁硶棰勭儹瀹屾垚");
}
-
-
static object _positionCheckTimeLock = new object();
Dictionary<string, List<int>> _positionCheckTimeDict = new Dictionary<string, List<int>>();
Dictionary<string, List<string>> _positionSpecHeads = new Dictionary<string, List<string>>();
- public ResponseMessage RunImageCheck(IOperationConfig config)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- try
- {
- RunImageCheckPreTreat(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
- return msg;
- }
-
- List<string> cameraIds = measureBinds.Select(u => u.CameraId).ToList();
- try
- {
- ConcurrentDictionary<MeasureBind, IImageSet> imgSetDicts = new ConcurrentDictionary<MeasureBind, IImageSet>();
-
- measureBinds.AsParallel().ForAll(b =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == b.CameraId) as CameraBase;
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮厤缃畕b.GetDisplayText()}鏈兘鑾峰彇鐩告満璁惧");
- imgSetDicts[b] = null;
- return;
- }
- imgSetDicts[b] = null;
- //if (config.TriggerStr.Split(',')[0].Contains("2"))
- //{
- //camera.ClearImageBufferQueue();
- try
- {
- imgSetDicts[b] = CollectHImage(camera, b.SnapshotOpConfig);
- camera.ClearImageBufferQueue();
- }
- catch (Exception ea)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{measureBinds[0].WorkPosition}鐨勭{measureBinds[0].CheckIndex}妫�娴嬭幏鍙栧浘鍍忎俊鎭紓甯� {ea.ToString()}");
- }
- finally
- {
- //try
- //{
- // if (imgSetDicts[b] == null || imgSetDicts[b].HImage == null)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{measureBinds[0].WorkPosition}鐨勭{measureBinds[0].CheckIndex}妫�娴嬭幏鍙栧浘鍍忎俊鎭负null ");
- // //if (camera is InsCameraDriver insCamera)
- // //{
- // // insCamera.Restart();
- // //}
- // }
- //}
- //catch (Exception ec)
- //{
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, "ins鐩告満閲嶈繛寮傚父" + ec.ToString());
- //}
- }
-
-
- var pList = b.ProductIndices.Select(pi =>
- {
- string pid = $"{inputSequence}_{pi}";
- return FindProductBySequence(pid, true);
- }).ToList();
-
- RunImageCheckAsync(pList, config.TriggerStr, config.TriggerSource, imgSetDicts[b], b);
-
- });
-
-
- //if (imgSetDicts.Values.Any(u => u == null || u.HImage == null))
- //{
- // //msg.Result = -1;
- // //msg.Message = $"宸ヤ綅{measureBinds[0].WorkPosition}鐨勭{measureBinds[0].CheckIndex}妫�娴嬭幏鍙栧浘鍍忎俊鎭け璐�";
- // //return msg;
- // throw new ProcessException($"宸ヤ綅{measureBinds[0].WorkPosition}鐨勭{measureBinds[0].CheckIndex}妫�娴嬭幏鍙栧浘鍍忎俊鎭け璐�");
- //}
-
-
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬪鐞嗗紓甯革紝{ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- return msg;
- }
-
-
- //if (triggerDatas[0].Contains("1"))
- //{
- // msg.Result = -1;
- // return msg;
- //}
-
- CheckPositionDoneAsync(measureBinds[0].WorkPosition, inputSequence, config, cameraIds);
- return msg;
- }
-
- public ResponseMessage RunImageCheck1(IOperationConfig config)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat1(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
- return msg;
- }
-
- List<string> cameraIds = measureBinds.Select(u => u.CameraId).ToList();
- try
- {
- ConcurrentDictionary<MeasureBind, IImageSet> imgSetDicts = new ConcurrentDictionary<MeasureBind, IImageSet>();
-
- measureBinds.AsParallel().ForAll(b =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == b.CameraId) as CameraBase;
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮厤缃畕b.GetDisplayText()}鏈兘鑾峰彇鐩告満璁惧");
- imgSetDicts[b] = null;
- return;
- }
- imgSetDicts[b] = null;
-
- try
- {
- imgSetDicts[b] = CollectHImage(camera, b.SnapshotOpConfig);
- camera.ClearImageBufferQueue();
- }
- catch (Exception ea)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{measureBinds[0].WorkPosition}鐨勭{measureBinds[0].CheckIndex}妫�娴嬭幏鍙栧浘鍍忎俊鎭け璐� {ea.ToString()}");
- }
-
-
- var pList = b.ProductIndices.Select(pi =>
- {
- string pid = $"{inputSequence}_{pi}";
- return FindProductBySequence(pid, true);
- }).ToList();
-
- RunImageCheckAsync(pList, config.TriggerStr, config.TriggerSource, imgSetDicts[b], b);
-
- });
- //DateTime.Now.DayOfWeek
-
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬪鐞嗗紓甯革紝{ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- return msg;
- }
-
-
- CheckPositionDoneAsync1(measureBinds[0].WorkPosition, inputSequence, config, cameraIds);
- return msg;
- }
-
-
-
- public void RunImageCheckPreTreat1(IOperationConfig config, out List<MeasureBind> measureBinds, out string inputSequence)
- {
- Task.Run(() =>
- {
- SetProcessRunState(EnumHelper.RunState.Running);
- });
-
- measureBinds = new List<MeasureBind>();
- inputSequence = "";
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1], out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
-
-
- measureBinds.Select(u => u.CameraId).ToList().ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鐩告満{camera.Name}妫�娴嬪墠娓呯悊缂撳瓨瀹屾垚");
- }
- });
-
- if (positionSet.IsSendClearSingal)
- {
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- TcpListener?.WriteAndRead(positionSet.ClearStr, out _, out _, false, ip, port);
- }
-
- inputSequence = triggerDatas[triggerDatas.Length - 1];
-
- string tempPID = inputSequence;
- string pidstr = DateTime.Now.ToString("yyyyMMddHHmmssfff");
- measureBinds.Where(b => b.IsFirstPosition).ToList().ForEach(b =>
- {
- b.ProductIndices.ForEach(i =>
- {
- ProductModel p = new ProductModel();
- p.SEQUENCE = $"{tempPID}_{i}";
- p.PID = $"{pidstr}T_{i}";
- p.Initial(M141Config.StationCode, M141Config.WorkPositionCollection.Select(u => u.PositionName).ToList());
- NewProductIntoList(p, true);
- });
- });
-
-
- int de = 2;
- //if (triggerDatas[0].Contains("11111"))
- //{
- // de = 2;
- //}
- //else
- //{
-
- // de = 2;
- //}
-
-
- measureBinds.Where(b => (b.CheckIndex == de || b.CheckIndex == 1) && b.ImageIndex == 0).AsParallel().ForAll(b =>
- {
- List<int> temint = new List<int>();
- if (triggerDatas[0].Contains("11111"))
- {
- if (triggerDatas[1] == "1")
- {
- temint = new List<int>() { 1 };
- }
- else
- {
- temint = new List<int>() { 2 };
- }
- }
- else
- {
- temint = new List<int>() { 1, 2 };
- }
-
-
- //new List<int>() { 1, 2 }.ForEach(i =>
- temint.ForEach(i =>
- {
- string sequence = $"{tempPID}_{i}";
- var p = FindProductBySequence(sequence, b.IsEnabelQueryFromQueue);
-
- //鍒濆鍖栦骇鍝佺殑妫�娴嬫鏁�
- var checkIndexList = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == b.WorkPosition && u.ProductIndices.Contains(i)).Select(u => u.CheckIndex).OrderBy(u => u).ToList();
- p.InitialPositionCheckList(b.WorkPosition, checkIndexList);
-
- //p.ClearPositionResult(M141Config.StationCode, b.WorkPosition);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"浜у搧{p.PID}_{p.SEQUENCE}宸叉竻鐞唟b.WorkPosition}妫�娴嬫暟鎹�傚綋鍓嶅凡瀹屾垚宸ヤ綅{string.Join(",", p.Details.Select(u => u.PositionName))}");
- });
-
- //鍒濆鍖栧伐浣嶇殑妫�娴嬫鏁�
- var positionCheckTimes = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == b.WorkPosition).Select(u => u.CheckIndex).ToList();
- lock (_positionCheckTimeLock)
- {
- _positionCheckTimeDict[b.WorkPosition] = positionCheckTimes;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{b.WorkPosition}鍒濆鍖栨娴嬫鏁帮細{string.Join(",", positionCheckTimes)}");
- }
- });
-
- measureBinds.AsParallel().ForAll(b =>
- {
- lock (_positionCheckTimeLock)
- {
- _positionCheckTimeDict[b.WorkPosition].RemoveAll(u => u == b.CheckIndex);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{b.WorkPosition}寮�濮嬬{b.CheckIndex}娆℃娴嬶紝寰呮娴嬪簭鍙凤細{string.Join(",", _positionCheckTimeDict[b.WorkPosition])}");
- }
- });
- }
-
- public void RunImageCheckPreTreat(IOperationConfig config, out List<MeasureBind> measureBinds, out string inputSequence)
- {
- Task.Run(() =>
- {
- SetProcessRunState(EnumHelper.RunState.Running);
- });
-
- measureBinds = new List<MeasureBind>();
- inputSequence = "";
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1].Replace("Scan", ""), out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
- measureBinds.Select(u => u.CameraId).ToList().ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鐩告満{camera.Name}妫�娴嬪墠娓呯悊缂撳瓨瀹屾垚");
- }
- });
-
- if (positionSet.IsSendClearSingal)
- {
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- TcpListener?.WriteAndRead(positionSet.ClearStr, out _, out _, false, ip, port);
- }
-
- inputSequence = triggerDatas[triggerDatas.Length - 1];
-
- string tempPID = inputSequence;
-
- string pidstr = DateTime.Now.ToString("yyyyMMddHHmmssfff");
- measureBinds.Where(b => b.IsFirstPosition).ToList().ForEach(b =>
- {
- b.ProductIndices.ForEach(i =>
- {
- ProductModel p = new ProductModel();
- p.SEQUENCE = $"{tempPID}_{i}";
- p.PID = $"{pidstr}T_{i}";
- p.Initial(M141Config.StationCode, M141Config.WorkPositionCollection.Select(u => u.PositionName).ToList());
- NewProductIntoList(p, true);
- });
- });
-
-
- int de = 0;
- if (triggerDatas[0].Contains("1") || triggerDatas[0].Contains("0"))
- {
- de = 2;
- }
- else
- {
- de = 1;
- }
-
-
- measureBinds.Where(b => (b.CheckIndex == de || b.CheckIndex == 1) && b.ImageIndex == 0).AsParallel().ForAll(b =>
- {
- List<int> temint = new List<int>();
- if (triggerDatas[0].Contains("1") || triggerDatas[0].Contains("0"))
- {
- if (triggerDatas[1].Contains("1"))
- {
- temint = new List<int>() { 1 };
- }
- else
- {
- temint = new List<int>() { 2 };
- }
- }
- else
- {
- temint = new List<int>() { 1, 2 };
- }
-
-
- //new List<int>() { 1, 2 }.ForEach(i =>
- temint.ForEach(i =>
- {
- string sequence = $"{tempPID}_{i}";
- var p = FindProductBySequence(sequence, b.IsEnabelQueryFromQueue);
-
- //鍒濆鍖栦骇鍝佺殑妫�娴嬫鏁�
- var checkIndexList = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == b.WorkPosition && u.ProductIndices.Contains(i)).Select(u => u.CheckIndex).OrderBy(u => u).ToList();
- p.InitialPositionCheckList(b.WorkPosition, checkIndexList);
-
- //p.ClearPositionResult(M141Config.StationCode, b.WorkPosition);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"浜у搧{p.PID}_{p.SEQUENCE}宸叉竻鐞唟b.WorkPosition}妫�娴嬫暟鎹�傚綋鍓嶅凡瀹屾垚宸ヤ綅{string.Join(",", p.Details.Select(u => u.PositionName))}");
- });
-
- //鍒濆鍖栧伐浣嶇殑妫�娴嬫鏁�
- var positionCheckTimes = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == b.WorkPosition).Select(u => u.CheckIndex).ToList();
- lock (_positionCheckTimeLock)
- {
- _positionCheckTimeDict[b.WorkPosition] = positionCheckTimes;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{b.WorkPosition}鍒濆鍖栨娴嬫鏁帮細{string.Join(",", positionCheckTimes)}");
- }
- });
-
- measureBinds.AsParallel().ForAll(b =>
- {
- lock (_positionCheckTimeLock)
- {
- _positionCheckTimeDict[b.WorkPosition].RemoveAll(u => u == b.CheckIndex);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{b.WorkPosition}寮�濮嬬{b.CheckIndex}娆℃娴嬶紝寰呮娴嬪簭鍙凤細{string.Join(",", _positionCheckTimeDict[b.WorkPosition])}");
- }
- });
- }
-
- public async Task<List<ProductModel>> CheckPositionDoneAsync(string positionName, string inputSequence, IOperationConfig config, List<string> cameraIds)
- {
- string triggerSource = config.TriggerSource;
- return await _taskFactory.StartNew(() =>
- {
- try
- {
-
- if (positionName.Contains("1") || positionName.Contains("0"))
- {
-
- string index = config.TriggerStr.Split(',')[1];
- var positionSet = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName);
-
- var checkRemains = _positionCheckTimeDict[positionName];
- //if (checkRemains.Count != 0)
- //{
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬫湭瀹屾垚锛屽墿浣欙細{string.Join(",", checkRemains)}");
- // return null;
- //}
-
- string replyData = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName).TriggerValue;
-
-
- //if (checkRemains.Count != 0)
- //{
- replyData += "," + index;
- //}
- //else
- //{
- // replyData += ",2";
- //}
-
- var pIndices = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionName).SelectMany(u => u.ProductIndices).Distinct().OrderBy(u => u).ToList();
- if (index.Contains("1"))
- {
- pIndices = new List<int> { 1 };
- }
- else
- {
- pIndices = new List<int> { 2 };
- }
- //var measureNum = M141Config.MeasureBindCollection.Count(u => u.WorkPosition == positionName && u.ProductIndices.Contains(pIndices[0]));
- //if (measureNum > 1)
- //{
- // replyData += ",C";
- //}
-
- var pList = pIndices.Select(u =>
- {
- string sequence = $"{inputSequence}_{u}";
- return FindProductBySequence(sequence, true);
- }).ToList();
-
- if (pList.Any(u => u == null))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑾峰彇宸ヤ綅{positionName}姹囨�荤粨鏋滄椂浜у搧淇℃伅涓虹┖");
- pList.ForEach(u =>
- {
- replyData += ",NG";
- });
- }
- else
- {
- int waitInterval = 300;
- int repeatTime = M141Config.DetectTimeout / waitInterval;
- do
- {
- if (!pList.All(p =>
- {
- p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- return detail?.IsDone ?? false;
- }))
- {
- Thread.Sleep(waitInterval);
- repeatTime--;
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鎴愬姛瀹屾垚宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴�");
- break;
- }
-
- if (repeatTime < 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴嬭幏鍙栫粨鏋滆秴鏃�");
- break;
- }
- } while (true);
- }
-
- pList.ForEach(p =>
- {
- var isOK = p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- replyData += $",{(isOK ? "OK" : "NG")}";
- List<string> specHeads = new List<string>();
- string head = p.GetCSVHead(ref specHeads, positionName);
- if (!_positionSpecHeads.ContainsKey(positionName))
- {
- _positionSpecHeads[positionName] = specHeads;
- }
-
- string data = p.GetCSVData(_positionSpecHeads[positionName], positionName);
- CSVRecordAsync($"{positionName}_Record_{DateTime.Now.ToString("yyyyMMdd")}.csv", data, head);
-
- UpdatePositionResultToDB(detail);
- var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- UpdatePositionResultDisplay(detail, isOK, positionName, seqData[seqData.Count - 1]);
- if (IsInspectionDoing)
- {
- OnSinglePostionDetectResultUpdate.Invoke(positionName, detail, seqData[seqData.Count - 1]);
- }
-
- if (positionSet.IsLastPosition)
- {
- UpdateProductResultAsync(p);
- UpdateOverAllProductResultToUI(p, isOK);
- OnNewProductEnqueued?.Invoke(p);
- OnProductDequeued?.Invoke(p);
- }
-
- SetSpecResult(p);
- });
-
- if (positionSet.IsLastPosition)
- {
- if (_ct != null)
- {
- UpdateCT(null, (float)((DateTime.Now - _ct.Value).TotalSeconds / 2.0));
- }
- _ct = DateTime.Now;
- }
- //replyData += ",No Read,No Read";
- if (positionName.Contains("0"))
- {
- var isOK = pList[0].GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
-
- if (index.Contains("1"))
- {
- replyData = "0#,Scan1,Scan" + (isOK ? "OK" : "NG") + "1";
- }
- else
- {
- replyData = "0#,Scan2,Scan" + (isOK ? "OK" : "NG") + "2";
- //replyData = "0#,Scan2,ScanOK2";
- }
- }
-
- ReplyTcpData(positionName, triggerSource, replyData);
-
- cameraIds.ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"鐩告満{camera.Name}娓呯悊缂撳瓨");
- }
- });
-
- return pList;
- }
- else
- {
- var positionSet = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName);
-
- var checkRemains = _positionCheckTimeDict[positionName];
- if (checkRemains.Count != 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬫湭瀹屾垚锛屽墿浣欙細{string.Join(",", checkRemains)}");
- return null;
- }
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬪凡瀹屾垚锛岀瓑寰呰緭鍑虹粨鏋�");
-
- string replyData = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName).TriggerValue;
-
- var pIndices = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionName).SelectMany(u => u.ProductIndices).Distinct().OrderBy(u => u).ToList();
-
- var measureNum = M141Config.MeasureBindCollection.Count(u => u.WorkPosition == positionName && u.ProductIndices.Contains(pIndices[0]));
- if (measureNum > 1)
- {
- replyData += ",C";
- }
-
- var pList = pIndices.Select(u =>
- {
- string sequence = $"{inputSequence}_{u}";
- return FindProductBySequence(sequence, true);
- }).ToList();
-
- if (pList.Any(u => u == null))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑾峰彇宸ヤ綅{positionName}姹囨�荤粨鏋滄椂浜у搧淇℃伅涓虹┖");
- pList.ForEach(u =>
- {
- replyData += ",NG";
- });
- }
- else
- {
- int waitInterval = 300;
- int repeatTime = M141Config.DetectTimeout / waitInterval;
- do
- {
- if (!pList.All(p =>
- {
- p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- return detail?.IsDone ?? false;
- }))
- {
- Thread.Sleep(waitInterval);
- repeatTime--;
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鎴愬姛瀹屾垚宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴�");
- break;
- }
-
- if (repeatTime < 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴嬭幏鍙栫粨鏋滆秴鏃�");
- break;
- }
- } while (true);
- }
-
- pList.ForEach(p =>
- {
- var isOK = p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- replyData += $",{(isOK ? "OK" : "NG")}";
-
- List<string> specHeads = new List<string>();
- string head = p.GetCSVHead(ref specHeads, positionName);
- if (!_positionSpecHeads.ContainsKey(positionName))
- {
- _positionSpecHeads[positionName] = specHeads;
- }
-
- string data = p.GetCSVData(_positionSpecHeads[positionName], positionName);
-
- CSVRecordAsync($"{positionName}_Record_{DateTime.Now.ToString("yyyyMMdd")}.csv", data, head);
-
- UpdatePositionResultToDB(detail);
- var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- UpdatePositionResultDisplay(detail, isOK, positionName, seqData[seqData.Count - 1]);
- if (IsInspectionDoing)
- {
- OnSinglePostionDetectResultUpdate.Invoke(positionName, detail, seqData[seqData.Count - 1]);
- }
-
- if (positionSet.IsLastPosition)
- {
- UpdateProductResultAsync(p);
- UpdateOverAllProductResultToUI(p, isOK);
- OnNewProductEnqueued?.Invoke(p);
- OnProductDequeued?.Invoke(p);
- }
-
- SetSpecResult(p);
- });
-
- if (positionSet.IsLastPosition)
- {
- if (_ct != null)
- {
- UpdateCT(null, (float)((DateTime.Now - _ct.Value).TotalSeconds / 2.0));
- }
- _ct = DateTime.Now;
- }
- replyData += "," + pList[0]?.SN + "," + pList[1]?.SN;
-
-
- ReplyTcpData(positionName, triggerSource, replyData);
-
- cameraIds.ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"鐩告満{camera.Name}娓呯悊缂撳瓨");
- }
- });
-
- return pList;
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, ex.ToString());
- return null;
- }
-
- });
- }
-
- public async Task<List<ProductModel>> CheckPositionDoneAsync1(string positionName, string inputSequence, IOperationConfig config, List<string> cameraIds)
- {
- string triggerSource = config.TriggerSource;
- return await _taskFactory.StartNew(() =>
- {
-
- var positionSet = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName);
-
- var checkRemains = _positionCheckTimeDict[positionName];
- if (checkRemains.Count != 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬫湭瀹屾垚锛屽墿浣欙細{string.Join(",", checkRemains)}");
- return null;
- }
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬪凡瀹屾垚锛岀瓑寰呰緭鍑虹粨鏋�");
-
- string replyData = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName).TriggerValue;
-
- var pIndices = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionName).SelectMany(u => u.ProductIndices).Distinct().OrderBy(u => u).ToList();
-
- var measureNum = M141Config.MeasureBindCollection.Count(u => u.WorkPosition == positionName && u.ProductIndices.Contains(pIndices[0]));
- if (measureNum > 1)
- {
- replyData += ",C";
- }
-
- var pList = pIndices.Select(u =>
- {
- string sequence = $"{inputSequence}_{u}";
- return FindProductBySequence(sequence, true);
- }).ToList();
-
- if (pList.Any(u => u == null))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑾峰彇宸ヤ綅{positionName}姹囨�荤粨鏋滄椂浜у搧淇℃伅涓虹┖");
- pList.ForEach(u =>
- {
- replyData += ",NG";
- });
- }
- else
- {
- int waitInterval = 300;
- int repeatTime = M141Config.DetectTimeout / waitInterval;
- do
- {
- if (!pList.All(p =>
- {
- p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- return detail?.IsDone ?? false;
- }))
- {
- Thread.Sleep(waitInterval);
- repeatTime--;
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鎴愬姛瀹屾垚宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴�");
- break;
- }
-
- if (repeatTime < 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴嬭幏鍙栫粨鏋滆秴鏃�");
- break;
- }
- } while (true);
- }
-
- pList.ForEach(p =>
- {
- var isOK = p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- replyData += $",{(isOK ? "OK" : "NG")}";
-
- List<string> specHeads = new List<string>();
- string head = p.GetCSVHead(ref specHeads, positionName);
- if (!_positionSpecHeads.ContainsKey(positionName))
- {
- _positionSpecHeads[positionName] = specHeads;
- }
-
- string data = p.GetCSVData(_positionSpecHeads[positionName], positionName);
-
- CSVRecordAsync($"{positionName}_Record_{DateTime.Now.ToString("yyyyMMdd")}.csv", data, head);
-
- UpdatePositionResultToDB(detail);
- var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- UpdatePositionResultDisplay(detail, isOK, positionName, seqData[seqData.Count - 1]);
-
-
- if (IsInspectionDoing)
- {
- OnSinglePostionDetectResultUpdate.Invoke(positionName, detail, seqData[seqData.Count - 1]);
- }
-
-
- if (positionSet.IsLastPosition)
- {
- UpdateProductResultAsync(p);
- UpdateOverAllProductResultToUI(p, isOK);
- OnNewProductEnqueued?.Invoke(p);
- OnProductDequeued?.Invoke(p);
- }
-
- SetSpecResult(p);
- });
-
- if (positionSet.IsLastPosition)
- {
- if (_ct != null)
- {
- UpdateCT(null, (float)((DateTime.Now - _ct.Value).TotalSeconds / 2.0));
- }
- _ct = DateTime.Now;
- }
- replyData += "," + pList[0].SN + "," + pList[1].SN;
- if (!positionName.Contains("0"))
- {
- ReplyTcpData(positionName, triggerSource, replyData);
- }
- else
- {
- //replyData += "," + pList[0].SN=="NOREAD" + "," + pList[1]?.SN;
-
-
- //replyData = "0#,2,"+ ((pList[0].SN == "NOREAD" || pList[1]?.SN=="NOREAD")? "NG":"OK") +","+ pList[0].SN+ ","+ pList[1].SN;
- replyData = "0#,2,OK," + pList[0].SN + "," + pList[1].SN;
-
- ReplyTcpData(positionName, triggerSource, replyData);
- }
-
-
- cameraIds.ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"鐩告満{camera.Name}娓呯悊缂撳瓨");
- }
- });
-
- return pList;
-
- });
- }
-
-
- public async Task<List<ProductModel>> CheckPositionDoneAsyncforsb(string positionName, string inputSequence, IOperationConfig config, List<string> cameraIds)
- {
- string triggerSource = config.TriggerSource;
- return await _taskFactory.StartNew(() =>
- {
-
- var positionSet = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName);
-
- var checkRemains = _positionCheckTimeDict[positionName];
- if (checkRemains.Count != 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬫湭瀹屾垚锛屽墿浣欙細{string.Join(",", checkRemains)}");
- return null;
- }
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅{positionName}妫�娴嬪凡瀹屾垚锛岀瓑寰呰緭鍑虹粨鏋�");
-
- string replyData = M141Config.WorkPositionCollection.FirstOrDefault(u => u.PositionName == positionName).TriggerValue;
-
- var pIndices = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionName).SelectMany(u => u.ProductIndices).Distinct().OrderBy(u => u).ToList();
-
- var measureNum = M141Config.MeasureBindCollection.Count(u => u.WorkPosition == positionName && u.ProductIndices.Contains(pIndices[0]));
- if (measureNum > 1)
- {
- replyData += ",C";
- }
-
- var pList = pIndices.Select(u =>
- {
- string sequence = $"{inputSequence}_{u}";
- return FindProductBySequence(sequence, true);
- }).ToList();
-
- if (pList.Any(u => u == null))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑾峰彇宸ヤ綅{positionName}姹囨�荤粨鏋滄椂浜у搧淇℃伅涓虹┖");
- pList.ForEach(u =>
- {
- replyData += ",NG";
- });
- }
- else
- {
- int waitInterval = 300;
- int repeatTime = M141Config.DetectTimeout / waitInterval;
- do
- {
- if (!pList.All(p =>
- {
- p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- return detail?.IsDone ?? false;
- }))
- {
- Thread.Sleep(waitInterval);
- repeatTime--;
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鎴愬姛瀹屾垚宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴�");
- break;
- }
-
- if (repeatTime < 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{positionName}浜у搧{string.Join(",", pList.Select(u => $"{u.PID}_{u.SEQUENCE}"))}妫�娴嬭幏鍙栫粨鏋滆秴鏃�");
- break;
- }
- } while (true);
- }
-
- pList.ForEach(p =>
- {
- var isOK = p.GetPositionResult(M141Config.StationCode, positionName, out P_PRODUCT_DETAIL detail);
- replyData += $",{(isOK ? "OK" : "NG")}";
-
- List<string> specHeads = new List<string>();
- string head = p.GetCSVHead(ref specHeads, positionName);
- if (!_positionSpecHeads.ContainsKey(positionName))
- {
- _positionSpecHeads[positionName] = specHeads;
- }
-
- string data = p.GetCSVData(_positionSpecHeads[positionName], positionName);
-
- CSVRecordAsync($"{positionName}_Record_{DateTime.Now.ToString("yyyyMMdd")}.csv", data, head);
-
- UpdatePositionResultToDB(detail);
- var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- UpdatePositionResultDisplay(detail, isOK, positionName, seqData[seqData.Count - 1]);
-
- var temokimage = OKNGImages.Where(u => u.pid == p.PID).ToList();
-
- if (isOK)
- {
- if (temokimage.Any(u => u.issave))
- {
- for (int i = 0; i < temokimage.Count; i++)
- {
- string realpath = Path.Combine(temokimage[i].path, $"{temokimage[i].name}.{temokimage[i].post}");
- temokimage[i].bitmap.Save(realpath, temokimage[i].ImageFormat);
- }
- }
- }
- else
- {
- if (temokimage.Any(u => u.issave))
- {
- var temin = temokimage.FirstOrDefault(u => u.result == "NG");
- if (temin != null)
- {
- for (int i = 0; i < temokimage.Count; i++)
- {
- string realpath = Path.Combine(temin.path, $"{temokimage[i].name}.{temokimage[i].post}");
- temokimage[i].bitmap.Save(realpath, temokimage[i].ImageFormat);
- }
- }
- else
- {
- for (int i = 0; i < temokimage.Count; i++)
- {
- string realpath = Path.Combine(temokimage[i].path, $"{temokimage[i].name}.{temokimage[i].post}");
- temokimage[i].bitmap.Save(realpath, temokimage[i].ImageFormat);
- }
- }
- }
- }
-
-
-
- //string ngImageFile = Path.Combine(folder, $"{id}.{post}");
- //var bitmap = imgSet.HImage.ConvertHImageToBitmap();
- //bitmap.Save(ngImageFile, M141Config.ImageFormatNG);
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{id}NG鍥剧墖宸蹭繚瀛�");
-
-
-
-
-
- if (IsInspectionDoing)
- {
- OnSinglePostionDetectResultUpdate.Invoke(positionName, detail, seqData[seqData.Count - 1]);
- }
-
-
- if (positionSet.IsLastPosition)
- {
- UpdateProductResultAsync(p);
- UpdateOverAllProductResultToUI(p, isOK);
- OnNewProductEnqueued?.Invoke(p);
- OnProductDequeued?.Invoke(p);
- }
-
- SetSpecResult(p);
- });
-
-
- OKNGImages.ForEach(x =>
- {
- x.bitmap.Dispose();
- });
- OKNGImages.Clear();
-
-
- if (positionSet.IsLastPosition)
- {
- if (_ct != null)
- {
- UpdateCT(null, (float)((DateTime.Now - _ct.Value).TotalSeconds / 2.0));
- }
- _ct = DateTime.Now;
- }
- replyData += "," + pList[0].SN + "," + pList[1].SN;
- if (!positionName.Contains("0"))
- {
- ReplyTcpData(positionName, triggerSource, replyData);
- }
- else
- {
- //replyData += "," + pList[0].SN=="NOREAD" + "," + pList[1]?.SN;
-
-
- //replyData = "0#,2,"+ ((pList[0].SN == "NOREAD" || pList[1]?.SN=="NOREAD")? "NG":"OK") +","+ pList[0].SN+ ","+ pList[1].SN;
- replyData = "0#,2,OK," + pList[0].SN + "," + pList[1].SN;
-
- ReplyTcpData(positionName, triggerSource, replyData);
- }
-
-
- cameraIds.ForEach(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c) as CameraBase;
- if (camera != null)
- {
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"鐩告満{camera.Name}娓呯悊缂撳瓨");
- }
- });
-
- return pList;
-
- });
- }
-
- private async void UpdatePositionResultDisplay(P_PRODUCT_DETAIL detail, bool isOK, string positionName, string productSequence)
- {
- await Task.Run(() =>
- {
- if (detail == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏃犳硶鏄剧ず妫�娴嬫槑缁嗕俊鎭�");
- return;
- }
-
- List<IShapeElement> eleList = new List<IShapeElement>();
-
- TextDisplay txt = new TextDisplay();
- txt.LineLimit = 30;
- eleList.Add(txt);
-
- txt.StartX = txt.StartY = 0;
-
- txt.AddText($"{detail.SN} {(isOK ? "OK" : "NG")}", isOK ? Color.Lime : Color.White, isOK ? Color.Transparent : Color.Red);
-
- txt.AddText(" ", Color.Transparent, Color.Transparent);
-
- var ngSpecCode = new List<string>();
-
- detail.SpecList.ToList().ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
-
- });
-
- detail.ResultList.ToList().SelectMany(u => u.Specs).ToList().ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- var defects = new List<string>(detail.DefectList);
- defects.AddRange(detail.ResultList.GetDefectDescList());
-
- defects = defects.Except(ngSpecCode).Distinct().ToList();
- defects.ForEach(u =>
- {
- txt.AddText(u, Color.Red, Color.Transparent);
-
- var indicator = M141Config.DefectIndicatorCollection.FirstOrDefault(d => d.DefectName == u);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- eleList.Add(cloneIndicator);
- }
- });
-
- OnPositionResultUpdated?.Invoke(positionName, productSequence, eleList);
-
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"浜у搧{detail.PID} 搴忓彿{productSequence} 宸ヤ綅{positionName}鏄剧ず淇℃伅{JsonConvert.SerializeObject(detail)}");
- });
- }
-
- private void GetIndicatorFromSpec(ISpec s, List<IShapeElement> eleList, TextDisplay txt, List<string> ngSpecCode)
- {
- txt.AddText($"{s.Code} {s.GetMeasureValueStr()}", s.MeasureResult == true ? Color.Lime : Color.Red, Color.Transparent);
-
- var indicator = M141Config.DefectIndicatorCollection.FirstOrDefault(u => u.DefectName == s.Code);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- cloneIndicator.DefectName += $"{s.Code} {s.GetMeasureValueStr()}";
- cloneIndicator.IsOK = s.MeasureResult == true;
-
- eleList.Add(cloneIndicator);
- }
-
- if (s.MeasureResult != true)
- {
- ngSpecCode.Add(s.Code);
- }
- }
-
- private async void UpdateOverAllProductResultToUI(ProductModel product, bool isOK)
- {
- await Task.Run(() =>
- {
- List<IShapeElement> eleList = new List<IShapeElement>();
-
- TextDisplay txt = new TextDisplay();
- txt.LineLimit = 30;
- eleList.Add(txt);
-
- txt.StartX = txt.StartY = 0;
-
- txt.AddText($"{product.SN} {product.Result}", isOK ? Color.Lime : Color.White, isOK ? Color.Transparent : Color.Red);
-
- txt.AddText(" ", Color.Transparent, Color.Transparent);
-
- var ngSpecCode = new List<string>();
-
- product.Details.ForEach(d =>
- {
- d.SpecList.ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- d.ResultList.SelectMany(u => u.Specs).ToList().ForEach(s =>
- {
- GetIndicatorFromSpec(s, eleList, txt, ngSpecCode);
- });
-
- var defects = new List<string>(d.DefectList);
- defects.AddRange(d.ResultList.GetDefectDescList());
-
- defects = defects.Except(ngSpecCode).Distinct().ToList();
- defects.ForEach(u =>
- {
- txt.AddText(u, Color.Red, Color.Transparent);
-
- var indicator = M141Config.DefectIndicatorCollection.FirstOrDefault(d => d.DefectName == u);
- if (indicator != null)
- {
- var cloneIndicator = indicator.Clone() as DefectRectangleIndicator;
- eleList.Add(cloneIndicator);
- }
- });
- });
-
- OnPositionResultUpdated?.Invoke("", product.SEQUENCE.Split("_")[product.SEQUENCE.Split("_").Count() - 1], eleList);
- });
- }
-
- public virtual int UploadProductDataToMES(List<ProductModel> pList)
- {
- List<int> isUploadOK = new List<int>();
- pList.ForEach(p =>
- {
- var pData = GetProductUploadMESData(p, p.Result);
-
- ResponseMessage response = UploadDataToMES(new OperationConfigBase() { TriggerStr = pData }, null, null);
-
- if (response.Result == -1)
- {
- //鍏堜笂浼犱竴娆★紝濡傛灉澶辫触鍐嶈瘯2娆�
- for (int i = 0; i < 2; i++)
- {
- Thread.Sleep(500);
- response = UploadDataToMES(new OperationConfigBase() { TriggerStr = pData }, null, null);
- if (response.Result != -1)
- {
- break;
- }
- }
- }
-
- if (p.SN.Replace(" ", "").ToLower().Contains("noread") && response.Result == 1000)
- {
- isUploadOK.Add(3);
- }
- else
- {
- isUploadOK.Add(response.Result);
- }
- });
- if (isUploadOK.All(u => u == 1000))
- {
- return 0;
- }
- else if (isUploadOK.Contains(1))
- {
- return 1;
- }
- else if (isUploadOK.Contains(4))
- {
- return 4;
- }
- else if (isUploadOK.Contains(-1))
- {
- return 2;
- }
- else if (isUploadOK.Contains(3))
- {
- return 3;
- }
- return 2;
- }
volatile int uploadId = 0;
- private string GetProductUploadMESData(ProductModel p, string pResult)
- {
- JObject jObj = new JObject();
- Interlocked.Increment(ref uploadId);
- //jObj.Add($"id", uploadId);
- //jObj.Add($"Createor", Config.StationCode ?? "2966AOI3");
- //jObj.Add($"CreateTime", p.CREATE_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- //jObj.Add($"Project", M141Config.MESProjectCode);
- //jObj.Add($"MachineNumber", M141Config.MESMachineNum);
- //jObj.Add($"DateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
- //jObj.Add($"Cycle", ((p.EndTime ?? DateTime.Now) - p.CREATE_TIME.Value).TotalSeconds.ToString("f2"));
- //jObj.Add($"SN", p.SN);
- //jObj.Add($"Result", pResult == "OK" ? "OK" : "NG");
-
-
- //jObj.Add($"id", uploadId);
- //jObj.Add($"Createor", Config.StationCode ?? "2966AOI3");
- jObj.Add($"CreateTime", p.CREATE_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- jObj.Add($"SN", p.SN);
- jObj.Add($"Project", M141Config.MESProjectCode);
- jObj.Add($"MachineNumber", M141Config.MESMachineNum);
- jObj.Add($"DateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
-
- List<string> ngitem = new List<string>();
- foreach (var v in p.Details)
- {
- ngitem.AddRange(v.ResultList.GetDefectDescList());
- ngitem.AddRange(v.DefectList);
- }
- ngitem = ngitem.Distinct().ToList();
-
-
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES 浜у搧NG椤规眹鎬伙細{string.Join(",", ngitem)}");
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES 锛歿JsonConvert.SerializeObject(p)}");
-
-
- List<string> ngitemD = ngitem.Where(u => u.ToUpper().Contains("FAI")).ToList();
-
- List<string> ngitemC = ngitem.Where(u => !u.ToUpper().Contains("FAI")).ToList();
-
- jObj.Add($"Result_Dimension", ngitemD.Count == 0 ? "OK" : "NG");
- jObj.Add($"Dimension_NGItems", string.Join(",", ngitemD));
- //jObj.Add("NGItems", string.Join(",", defectList));
- jObj.Add($"Result_Cosmetic", ngitemC.Count == 0 ? "OK" : "NG");
- jObj.Add($"Cosmetic_NGItems", string.Join(",", ngitemC));
-
- jObj.Add($"CycleTime", ((p.EndTime ?? DateTime.Now) - p.CREATE_TIME.Value).TotalSeconds.ToString("f2"));
-
- var specList = p.Details.SelectMany(u => u.ResultList.SelectMany(r => r.Specs)).ToList();
- p.Details.SelectMany(u => u.SpecList).ToList().ForEach(s =>
- {
- if (!specList.Any(u => u.Code == s.Code))
- {
- specList.Add(s);
- }
- });
-
- List<string> temmescode = new List<string>();
- specList.ForEach(s =>
- {
- var mapping = M141Config.MESCodeMappingCollection.FirstOrDefault(u => u.SpcCode == s.Code);
- if (mapping != null)
- {
- if (!temmescode.Contains(mapping.MESCode))
- {
- temmescode.Add(mapping.MESCode);
- jObj.Add(mapping.MESCode, s.GetMeasureValueStr(4));
- }
- }
- else
- {
- if (!temmescode.Contains(s.Code))
- {
- temmescode.Add(s.Code);
- jObj.Add(s.Code, s.GetMeasureValueStr(4));
- }
- }
- });
-
- var defectList = p.Details.SelectMany(u => u.ResultList).ToList().GetDefectDescList();
- defectList.AddRange(p.Details.SelectMany(u => u.DefectList));
-
- defectList = defectList.Except(specList.Select(u => u.Code)).Distinct().ToList();
- //jObj.Add("NGItems", string.Join(",", defectList));
-
- return JsonConvert.SerializeObject(jObj);
- }
-
- protected void ReplyTcpData(string positionName, string triggerSource, string replyData)
- {
- if (!string.IsNullOrWhiteSpace(triggerSource))
- {
- var sourceData = triggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- string error = "";
- if (!(TcpListener?.WriteAndRead(replyData, out error, out _, false, ip, port) ?? false))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{positionName}妫�娴嬬粨鏋滃弽棣堝紓甯革紝{error}");
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"宸ヤ綅{positionName}妫�娴嬬粨鏋滃弽棣堝畬鎴愶紝{replyData}");
- }
- }
- }
public void NewProductIntoList(ProductModel p, bool isSaveDB)
{
@@ -1743,14 +476,14 @@
}
}
- if (isSaveDB)
- {
- var isNewDone = _manager_P_Product.NewProduct(p, p.Details, out string msg);
- if (!isNewDone)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{p.PID}鏁版嵁搴撴柊澧炲紓甯革紝{msg}");
- }
- }
+ //if (isSaveDB)
+ //{
+ // var isNewDone = _manager_P_Product.NewProduct(p, p.Details, out string msg);
+ // if (!isNewDone)
+ // {
+ // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{p.PID}鏁版嵁搴撴柊澧炲紓甯革紝{msg}");
+ // }
+ //}
LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"{p.PID}_{p.SEQUENCE}浜у搧鍏ュ垪瀹屾垚");
}
@@ -1772,12 +505,12 @@
}
else
{
- var pDB = _manager_P_Product.QueryProductBySequence(sequence);
- if (pDB != null)
- {
- p = new ProductModel(pDB);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浠庢暟鎹簱鑾峰彇浜у搧瀵硅薄{pDB.PID}锛屽簭鍙穥pDB.SEQUENCE}锛屾潯鐮亄pDB.SN}");
- }
+ //var pDB = _manager_P_Product.QueryProductBySequence(sequence);
+ //if (pDB != null)
+ //{
+ // p = new ProductModel(pDB);
+ // LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浠庢暟鎹簱鑾峰彇浜у搧瀵硅薄{pDB.PID}锛屽簭鍙穥pDB.SEQUENCE}锛屾潯鐮亄pDB.SN}");
+ //}
if (p == null)
{
@@ -1786,7 +519,7 @@
p.PID = p.PID + "_" + sequence.Split('_')[sequence.Split('_').Length - 1];
p.Initial(M141Config.StationCode, M141Config.WorkPositionCollection.Where(u => u.IsEnabled).Select(u => u.PositionName).ToList());
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏈兘浠庢暟鎹簱鑾峰彇浜у搧瀵硅薄锛屼娇鐢ㄤ复鏃舵柊寤轰骇鍝佸璞�");
+ LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏈兘鑾峰彇浜у搧瀵硅薄锛屼娇鐢ㄤ复鏃舵柊寤轰骇鍝佸璞�");
}
NewProductIntoList(p, false);
@@ -1794,9 +527,6 @@
return p;
}
-
-
-
public async Task RunImageCheckAsync(List<ProductModel> products, string triggerText, string triggerSource, IImageSet imgSet, MeasureBind measureBind)
{
@@ -2034,249 +764,6 @@
});
}
-
- public async Task RunImageCheckAsyncForSB(List<ProductModel> products, string triggerText, string triggerSource, IImageSet imgSet, MeasureBind measureBind)
- {
- await Task.Run(() =>
- {
- List<DetectResult> resultList = new List<DetectResult>();
- if (products == null || products.Count == 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"宸ヤ綅{measureBind.WorkPosition}妫�娴嬫椂浜у搧淇℃伅涓虹┖");
- imgSet.HImage?.Dispose();
- imgSet.HImage = null;
- return;
- }
-
- try
- {
- List<string> pidList = products.Select(u => u.PID).OrderBy(u => u).ToList();
- if (imgSet == null || imgSet.HImage == null)
- {
- throw new Exception($"浜у搧{string.Join(",", pidList)}妫�娴媨measureBind.GetDisplayText()}鏈兘鑾峰彇鍥剧墖瀵硅薄");
- }
-
- //妫�娴嬮『搴� ML->鑷畾涔夋娴�
- if (!string.IsNullOrWhiteSpace(measureBind.DetectionId))
- {
- string detectionName = (ML.InitialConfig as MLInitialConfigBase).DetectionConfigs.FirstOrDefault(u => u.Id == measureBind.DetectionId)?.Name;
-
-
- //List<string> pidList2 = new List<string>();//pidList.Select(u => u.Split('_')[u.Split('_').Length - 1]).ToList();
- //Dictionary<string, string> dicpid = new Dictionary<string, string>();
-
- //for (int i = 0; i < pidList.Count; i++)
- //{
- // var tem = pidList[i].Split('_')[pidList[i].Split('_').Length - 1];
- // pidList2.Add(tem);
- // dicpid[tem] = pidList[i];
- //}
-
-
- List<DetectResult> detectResults = ML?.RunMLDetectionSync(imgSet, pidList, measureBind.DetectionId);
- List<DetectResult> ngResults = new List<DetectResult>();
-
-
- //for (int i = 0; i < detectResults.Count; i++)
- //{
- // detectResults[i].PID = dicpid[detectResults[i].PID];
- //}
-
-
- detectResults.GroupBy(u => u.PID).ToList().ForEach(u =>
- {
- if (u.ToList().Count > 0 && u.ToList().Any(m => m.ResultState != EnumHelper.ResultState.OK))
- {
- if (u.ToList().GetDefectDescList().Count == 0)
- {
- var errorSpec = _errorSpec.Copy();
- errorSpec.Code = "妫�娴婽BD";
- errorSpec.ActualValue = -999;
- DetectResult ngResult = new DetectResult() { Specs = new List<ISpec>() { errorSpec }, PID = u.Key };
- ngResults.Add(ngResult);
- }
- }
- });
-
- detectResults.AddRange(ngResults);
- resultList.AddRange(detectResults);
- }
-
- RunCustomizedMethod(products, triggerText, triggerSource, imgSet, measureBind.CustomizedMonitorId, resultList);
- RunCustomizedMethod(products, triggerText, triggerSource, imgSet, measureBind.CustomizedCombineMethodId, resultList);
-
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{measureBind.WorkPosition}妫�娴嬭繃绋嬪紓甯革紝{ex.ToString()}");
-
- var errorSpec = _errorSpec.Copy();
- errorSpec.ActualValue = -999;
- products.ForEach(p =>
- {
- p.AddNewDetectResults(M141Config.StationCode, measureBind.WorkPosition, new List<DetectResult>()
- {
- new DetectResult()
- {
- Specs = new List<ISpec>()
- {
- errorSpec
- },
- PID = p.PID,
- }
- });
- });
- }
- finally
- {
-
- try
- {
- if (resultList.Count > 0)
- {
- products.ForEach(p =>
- {
- var pResults = resultList.Where(u => u.PID == p.PID).ToList();
- p.AddNewDetectResults(M141Config.StationCode, measureBind.WorkPosition, pResults);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{p.PID}_{p.SEQUENCE}娣诲姞宸ヤ綅{measureBind.WorkPosition}妫�娴嬬粨鏋滐紝鏁伴噺{pResults.Count}");
- });
- }
-
- products.ForEach(p =>
- {
- if (p.PositoinCheckDone(measureBind.WorkPosition, measureBind.CheckIndex, out string msg))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{p.PID}_{p.SEQUENCE}宸ヤ綅{measureBind.WorkPosition}鐨勭{measureBind.CheckIndex}妫�娴嬪畬鎴愶紝璇ュ伐浣嶆娴嬪叏閮ㄧ粨鏉�");
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{p.PID}_{p.SEQUENCE}宸ヤ綅{measureBind.WorkPosition}鐨勭{measureBind.CheckIndex}妫�娴嬪畬鎴愶紝{msg}");
- }
- });
-
-
- if (resultList.Any(u => u.ResultState != EnumHelper.ResultState.OK))
- {
- if (!products[0].SEQUENCE.ToLower().Contains("test"))
- {
- SaveZipPreparation(string.Join("_", products.Select(u => $"{u.PID}_{u.SN}")) + $"-{measureBind.ImageIndex}_{DateTime.Now.ToString("HHmmssfff")}", imgSet, measureBind.WorkPosition);
- }
-
- //if (measureBind.NGImageSwitch)
- //{
- if (string.IsNullOrWhiteSpace(M141Config.NGImageFolder))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈厤缃甆G鍥剧墖淇濆瓨鐩綍");
- }
- else
- {
- string folder = Path.Combine(M141Config.NGImageFolder, DateTime.Now.ToString("yyyyMMdd"), measureBind.WorkPosition, "NG");
-
- if (!Directory.Exists(folder))
- {
- Directory.CreateDirectory(folder);
- }
-
- string id = string.Join("_", products.Select(u => $"{u.PID}_{u.SN}")) + $"-{measureBind.ImageIndex}_{DateTime.Now.ToString("HHmmssfff")}";
-
- string post = "";
- if (ImageSet.ImageFormatPostDict.ContainsKey(M141Config.ImageFormatNG))
- {
- post = ImageSet.ImageFormatPostDict[M141Config.ImageFormatNG];
- }
- else
- {
- post = M141Config.ImageFormatNG.ToString().ToLower();
- }
-
- //string ngImageFile = Path.Combine(folder, $"{id}.{post}");
- //var bitmap = imgSet.HImage.ConvertHImageToBitmap();
- //bitmap.Save(ngImageFile, M141Config.ImageFormatNG);
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{id}NG鍥剧墖宸蹭繚瀛�");
-
- OKNGImages.Add(new OKNGImage()
- {
- pid = products[0].PID,
- name = id,
- path = folder,
- post = post,
- result = "NG",
- bitmap = imgSet.HImage.ConvertHImageToBitmap(),
- ImageFormat = M141Config.ImageFormatNG,
- issave = measureBind.NGImageSwitch
- });
-
-
-
- }
- //}
- }
- else
- {
- if (!products[0].SEQUENCE.ToLower().Contains("test"))
- {
- SaveZipPreparation(string.Join("_", products.Select(u => $"{u.PID}_{u.SN}")) + $"-{measureBind.ImageIndex}_{DateTime.Now.ToString("HHmmssfff")}", imgSet, measureBind.WorkPosition);
- }
- //if (measureBind.OKImageSwitch)
- //{
- if (string.IsNullOrWhiteSpace(M141Config.NGImageFolder))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈厤缃甆G鍥剧墖淇濆瓨鐩綍");
- }
- else
- {
- string folder = Path.Combine(M141Config.NGImageFolder, DateTime.Now.ToString("yyyyMMdd"), measureBind.WorkPosition, "OK");
-
- if (!Directory.Exists(folder))
- {
- Directory.CreateDirectory(folder);
- }
-
- string id = string.Join("_", products.Select(u => $"{u.PID}_{u.SN}")) + $"-{measureBind.ImageIndex}_{DateTime.Now.ToString("HHmmssfff")}";
- string post = "";
- if (ImageSet.ImageFormatPostDict.ContainsKey(M141Config.ImageFormatOK))
- {
- post = ImageSet.ImageFormatPostDict[M141Config.ImageFormatOK];
- }
- else
- {
- post = M141Config.ImageFormatOK.ToString().ToLower();
- }
-
- //string ngImageFile = Path.Combine(folder, $"{id}.{post}");
- //var bitmap = imgSet.HImage.ConvertHImageToBitmap();
- //bitmap.Save(ngImageFile, M141Config.ImageFormatOK);
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{id}OK鍥剧墖宸蹭繚瀛�");
- OKNGImages.Add(new OKNGImage()
- {
- pid = products[0].PID,
- name = id,
- path = folder,
- post = post,
- result = "OK",
- bitmap = imgSet.HImage.ConvertHImageToBitmap(),
- ImageFormat = M141Config.ImageFormatOK,
- issave = measureBind.OKImageSwitch
- });
- }
- //}
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"{measureBind.WorkPosition}锛屼骇鍝亄string.Join(",", products.Select(u => u.PID))}鐨凬G鍥剧墖淇濆瓨寮傚父锛寋ex.GetExceptionMessage()}");
- }
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鍥剧墖{imgSet.PID}寮�濮嬮噴鏀�");
- imgSet.HImage?.Dispose();
- imgSet.HImage = null;
- imgSet.Dispose();
- imgSet = null;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鍥剧墖宸查噴鏀�");
-
- }
- });
- }
-
private void RunCustomizedMethod(List<ProductModel> products, string triggerText, string triggerSource, IImageSet imgSet, string methodId, List<DetectResult> resultList)
{
try
@@ -2322,50 +809,6 @@
{
LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑷畾涔夋娴嬭繃绋嬪紓甯革紝{ex.GetExceptionMessage()}");
}
- }
-
- private void SetSpecResult(ProductModel productModel)
- {
- // 鏇存柊鏃㈡湁鐨勬娴嬭褰曞唴瀹�
- var existProduct = ProductSpecResultList.FirstOrDefault(x => x.PID == productModel.PID);
- if (existProduct != null)
- {
- existProduct.Details = productModel.Details;
- return;
- }
-
- // 鏂板妫�娴嬩骇鍝佽褰�
- ProductSpecResultList.Insert(0, productModel);
- while (ProductSpecResultList.Count > M141Config.MaxProductListAmount)
- {
- ProductSpecResultList.RemoveAt(ProductSpecResultList.Count - 1);
- }
- }
-
-
- [ProcessMethod("", "HeartBeat", "蹇冭烦", InvokeType.TestInvoke)]
- public ResponseMessage HeartBeat(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = true;
- msg.DataStr = M141Config.Heartstr;
-
- if (M141Config.PointState)
- {
- if (!CheckInspectionInPeriodic(3000))
- {
- msg.IsReply = false;
- }
- }
-
- //DateTime now = DateTime.Now;
- //DateTime today8am = new DateTime(now.Year, now.Month, now.Day, 8, 0, 0);
- //DateTime today20am = new DateTime(now.Year, now.Month, now.Day, 20, 0, 0);
-
-
- //InitialOEEStatistic()
-
- return msg;
}
@@ -2527,40 +970,6 @@
}
}
-
- public void SaveZip(string pid, string result)
- {
- try
- {
- if (M141Config.SaveStateZip)
- {
- lock (ZipImages)
- {
- var zipimagespid = ZipImages.Where(u => u.name.Contains(pid)).ToList();
- if (zipimagespid != null)
- {
- for (int i = 0; i < zipimagespid.Count; i++)
- {
- string ngImageFile = Path.Combine(zipimagespid[i].path, $"{zipimagespid[i].name}_{result}.{zipimagespid[i].post}");
- var bitmap = zipimagespid[i].image.ConvertHImageToBitmap();
- bitmap.Save(ngImageFile, M141Config.ImageFormatZip);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{zipimagespid[i].name}鍘嬬缉鍥剧墖宸蹭繚瀛�");
- zipimagespid[i].image.Dispose();
- zipimagespid[i].image = null;
- bitmap.Dispose();
- }
- ZipImages.RemoveAll(u => u.name.Contains(pid));
- }
- }
- }
- }
- catch (Exception e)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍘嬬缉鍥剧墖淇濆瓨寮傚父{e.ToString()}");
- }
- }
-
-
#region plc
public ResponseMessage RunImageCheck_plc(IOperationConfig config, int plcnum)
{
@@ -2627,7 +1036,6 @@
return msg;
}
-
public void RunImageCheckPreTreat_plc(IOperationConfig config, out List<MeasureBind> measureBinds, out string inputSequence)
{
Task.Run(() =>
@@ -2673,20 +1081,6 @@
LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鐩告満{camera.Name}妫�娴嬪墠娓呯悊缂撳瓨瀹屾垚");
}
});
-
- if (positionSet.IsSendClearSingal)
- {
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- TcpListener?.WriteAndRead(positionSet.ClearStr, out _, out _, false, ip, port);
- }
inputSequence = triggerDatas[triggerDatas.Length - 1];
@@ -2870,17 +1264,12 @@
});
}
-
public virtual void ReplyPlcData(List<bool> result, int plcnum)
{
}
-
-
-
#endregion
-
public void wirtePLC(int add, int value)
@@ -2889,17 +1278,7 @@
}
-
-
-
-
-
-
-
-
}
-
-
diff --git a/src/Bro.M141.Process/M141Process_DBOperation.cs b/src/Bro.M141.Process/M141Process_DBOperation.cs
deleted file mode 100644
index 1947d13..0000000
--- a/src/Bro.M141.Process/M141Process_DBOperation.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.M135.DBManager;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
- Lazy<Manager_P_PRODUCT> managerPProductLazy = new Lazy<Manager_P_PRODUCT>();
- protected Manager_P_PRODUCT _manager_P_Product => managerPProductLazy.Value;
- TaskFactory _taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.LongRunning);
-
- protected void InitialProductList()
- {
- if (M141Config.DBBufferListCount > 0)
- {
- Request_P_Product request = new Request_P_Product();
- request.PageNum = 1;
- request.PageSize = M141Config.DBBufferListCount;
- request.IsOrderAsc = false;
- request.IsIncludeDetail = true;
-
- var list = _manager_P_Product.QueryProduct(request).OrderByDescending(u => u.ID).ToList();
- if (list != null && list.Count > 0)
- {
- ProductList.AddRange(list.Select(u => new M135.Common.ProductModel(u)));
- }
- }
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧闃熷垪鍒濆鍖栬浇鍏ProductList.Count}");
- }
-
- protected async void UpdateProductSNIntoDB(string pid, string sn)
- {
- await _taskFactory.StartNew(() =>
- {
- _manager_P_Product.UpdateProductSN(pid, sn);
- });
- }
-
-
- protected async void UpdateProductSNIntopid(string pid, string newse,string newpid)
- {
- await _taskFactory.StartNew(() =>
- {
- _manager_P_Product.UpdateProductPID(pid, newse, newpid);
- });
- }
-
- protected async void UpdatePositionResultToDB(P_PRODUCT_DETAIL detail)
- {
- await _taskFactory.StartNew(() =>
- {
- _manager_P_Product.UpdatePositionResult(detail);
- });
- }
- }
-}
diff --git a/src/Bro.M141.Process/M141Process_ImageCheck.cs b/src/Bro.M141.Process/M141Process_ImageCheck.cs
index f5a1735..4fd9be8 100644
--- a/src/Bro.M141.Process/M141Process_ImageCheck.cs
+++ b/src/Bro.M141.Process/M141Process_ImageCheck.cs
@@ -113,327 +113,6 @@
return msg;
}
- [ProcessMethod("ImageCheck", "ImageCheckOperation2", "閫氱敤鍥剧墖妫�娴嬫搷浣�,鏁版嵁浜や簰杈撳嚭", InvokeType.TestInvoke)]
- public ResponseMessage ImageCheckOperationOUT(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
-
-
- if (opConfig.BDstate)
- {
- List<double> bdlist = M141Config.BDCollection.FirstOrDefault(u => u.CameraId == opConfig.ExecuteDevice && u.CheckIndex == opConfig.BDindex)?.BDList;
- if (bdlist == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈壘鍒版爣瀹氶厤缃紝搴忓彿{opConfig.BDindex}");
- return msg;
- }
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_CalibrationData", bdlist.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2", "OUTPUT_TransmitData" }, null);
- }
- else
- {
- ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2", "OUTPUT_TransmitData" }, null);
- }
-
-
- //var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- //for (int i = 1; i <= 2; i++)
- //{
- // var p = opConfig.Products.FirstOrDefault(u => u.SEQUENCE.EndsWith(i.ToString()));
- // if (p != null)
- // {
- // var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- // var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- // if (pResult != null && datas.Count > 0)
- // {
- // FillSpecResults(pResult.PID, pResult.Specs, datas);
- // }
- // }
- //}
-
- opConfig.Products.ForEach(p =>
- {
- var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- string i = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
- dicdate[i] = ret.Item2["OUTPUT_TransmitData"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏁版嵁浜や簰杈撳嚭{i} {string.Join(",", dicdate[i])}");
- if (i == "1")
- {
- set1.Set();
- }
- else
- {
- set2.Set();
- }
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- if (pResult != null && datas.Count > 0)
- {
- FillSpecResults(pResult.PID, pResult.Specs, datas, p.SEQUENCE);
- }
- });
- }
- }
-
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "ImageCheckOperation3", "閫氱敤鍥剧墖妫�娴嬫搷浣�,鏁版嵁浜や簰杈撳叆,涓嶆竻鏁版嵁", InvokeType.TestInvoke)]
- public ResponseMessage ImageCheckOperationIN1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
-
- string index = "1";
- opConfig.Products.ForEach(p =>
- {
- index = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- });
-
- if (dicdate[index].Count == 0)
- {
- if (index == "1")
- {
- set1.Reset();
- set1.WaitOne(3000);
- }
- else
- {
- set2.Reset();
- set2.WaitOne(3000);
- }
- }
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏁版嵁浜や簰杈撳叆{index} {string.Join(",", dicdate[index])}");
- double[] tem = dicdate[index].ToArray();
-
-
- if (opConfig.BDstate)
- {
- List<double> bdlist = M141Config.BDCollection.FirstOrDefault(u => u.CameraId == opConfig.ExecuteDevice && u.CheckIndex == opConfig.BDindex)?.BDList;
- if (bdlist == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈壘鍒版爣瀹氶厤缃紝搴忓彿{opConfig.BDindex}");
- return msg;
- }
-
-
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem }, { "INPUT_CalibrationData", bdlist.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- }
- else
- {
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
- }
-
-
-
-
-
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- //var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- //for (int i = 1; i <= 2; i++)
- //{
- // var p = opConfig.Products.FirstOrDefault(u => u.SEQUENCE.EndsWith(i.ToString()));
- // if (p != null)
- // {
- // var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- // var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- // if (pResult != null && datas.Count > 0)
- // {
- // FillSpecResults(pResult.PID, pResult.Specs, datas);
- // }
- // }
- //}
-
- opConfig.Products.ForEach(p =>
- {
- var pResult = results.FirstOrDefault(u => u.PID == p.PID);
-
- string i = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- if (pResult != null && datas.Count > 0)
- {
- FillSpecResults(pResult.PID, pResult.Specs, datas, p.SEQUENCE);
- }
- });
- }
- }
-
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "ImageCheckOperation4", "閫氱敤鍥剧墖妫�娴嬫搷浣�,鏁版嵁浜や簰杈撳叆,娓呮暟鎹�", InvokeType.TestInvoke)]
- public ResponseMessage ImageCheckOperationIN2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- string index = "1";
- opConfig.Products.ForEach(p =>
- {
- index = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
-
- });
-
- if (dicdate[index].Count == 0)
- {
- if (index == "1")
- {
- set1.Reset();
- set1.WaitOne(3000);
- }
- else
- {
- set2.Reset();
- set2.WaitOne(3000);
- }
- }
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏁版嵁浜や簰杈撳叆{index} {string.Join(",", dicdate[index])}");
- double[] tem = dicdate[index].ToArray();
-
-
-
-
- if (opConfig.BDstate)
- {
- List<double> bdlist = M141Config.BDCollection.FirstOrDefault(u => u.CameraId == opConfig.ExecuteDevice && u.CheckIndex == opConfig.BDindex)?.BDList;
- if (bdlist == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏈壘鍒版爣瀹氶厤缃紝搴忓彿{opConfig.BDindex}");
- return msg;
- }
-
-
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem }, { "INPUT_CalibrationData", bdlist.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- }
- else
- {
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
- }
- //ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- dicdate[index].Clear();
-
- //var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- //for (int i = 1; i <= 2; i++)
- //{
- // var p = opConfig.Products.FirstOrDefault(u => u.SEQUENCE.EndsWith(i.ToString()));
- // if (p != null)
- // {
- // var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- // var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- // if (pResult != null && datas.Count > 0)
- // {
- // FillSpecResults(pResult.PID, pResult.Specs, datas);
- // }
- // }
- //}
-
- opConfig.Products.ForEach(p =>
- {
- var pResult = results.FirstOrDefault(u => u.PID == p.PID);
-
- string i = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"褰撳墠鑴氭湰缁撴灉OUTPUT_Results_{i}锛歿string.Join(",", datas.Select(u => u.ToString("f3")))}");
-
- if (pResult != null && datas.Count > 0)
- {
- FillSpecResults(pResult.PID, pResult.Specs, datas, p.SEQUENCE);
- }
- });
- }
- }
-
- return msg;
- }
-
protected List<ISpec> GetSpecListFromConfigSelection(List<SpecSelector> specSelectors)
{
@@ -529,159 +208,7 @@
}
DateTime? _ct = null;
- [ProcessMethod("", "ProductDataUpload", "浜у搧鏁版嵁涓婁紶", InvokeType.TestInvoke)]
- public ResponseMessage ProductDataUpload(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- string inputSequence = triggerDatas[triggerDatas.Length - 1];
-
- var productList = new List<int>() { 1, 2 }.Select(u =>
- {
- string sequence = $"{inputSequence}_{u}";
- return FindProductBySequence(sequence, true);
- }).ToList();
-
- string replyData = "#,UpData";
-
- int waitInterval = 300;
- int repeatTime = /*M141Config.DetectTimeout / waitInterval+*/2;
-
- do
- {
- if (productList.All(p => !string.IsNullOrWhiteSpace(p.Result)))
- {
- break;
- }
- else
- {
- Thread.Sleep(waitInterval);
- repeatTime--;
- }
-
- if (repeatTime < 0)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{string.Join(",", productList.Select(u => u.PID))}妫�娴嬭幏鍙栨眹鎬荤粨鏋滆秴鏃讹紝浣跨敤褰撳墠缁撴灉");
- break;
- }
- } while (true);
-
-
- var Defaultclass = M141Config.DefectClassCollection.FirstOrDefault(u => u.IsDefault);
- productList.ForEach(p =>
- {
- if (Defaultclass == null)
- {
- replyData += $",{(string.IsNullOrEmpty(p.Result) ? "NG" : p.Result)}";
- if (string.IsNullOrEmpty(p.Result))
- {
- p.Result = "NG";
- }
- }
- else
- {
- replyData += $",{(string.IsNullOrEmpty(p.Result) ? Defaultclass.ClassName : p.Result)}";
-
- if (string.IsNullOrEmpty(p.Result))
- {
- p.Result = Defaultclass.ClassName;
- }
- }
-
- var specList = p.Details.SelectMany(u => u.ResultList.SelectMany(r => r.Specs)).ToList();
- p.Details.SelectMany(u => u.SpecList).ToList().ForEach(s =>
- {
- if (!specList.Any(u => u.Code == s.Code))
- {
- specList.Add(s);
- }
- });
-
- List<Pointdata> Pointdatas11 = new List<Pointdata>();
-
- foreach (var item in specList)
- {
- try
- {
- Pointdatas11.Add(new Pointdata()
- {
- Code = item.Code,
- Value = Convert.ToDouble(item.GetMeasureValueStr()),
- Stand = item.StandardValue,
- Min = item.StandardValue - item.Tolrenance_Negative,
- Max = item.StandardValue + item.Tolrenance_Positive,
- ispoint = false,
- });
- }
- catch
- {
-
- }
- }
- M141Codelist.Add(Pointdatas11);
-
- HandleProductStatistc(p);
- });
-
- if (!M141Config.IsEnabelMESUpload)
- {
- replyData += ",OK";
- }
- else
- {
- int mesres = UploadProductDataToMES(productList);
- if (mesres == 0)
- {
- replyData += $",OK";
- }
- else
- {
- if (M141Config.MESProjectCode.ToUpper().Contains("AOI2"))
- {
- if (mesres == 3)
- {
- replyData += $",OK";
- }
- else
- {
- replyData += $",NG";
- }
- }
- else
- {
- replyData += $",NG{mesres.ToString()}";
- }
- }
- }
-
-
- productList.ForEach(p =>
- {
- replyData += $",{(p.SN.ToLower().Contains("read") ? "No Read" : p.SN)}";
- });
-
- ReplyTcpData("All", config.TriggerSource, replyData);
-
-
- //淇濆瓨鍘嬬缉鍥�
- productList.ForEach(p =>
- {
- SaveZip(p.PID, p.Result);
- });
-
-
-
- //if (M141Config.IsEnableOEEDataUpload)
- //{
- // productList.ForEach(p =>
- // {
- // OEEDataUpload(M141Config.OEEConfig_WorkPlace, p.SN, p.Details.SelectMany(u => u.ResultList).ToList());
- // });
- //}
-
- return msg;
- }
+
string _csvHead = "";
List<string> _specHeadList = null;
@@ -694,19 +221,7 @@
int waitTimes = 1;
if (p.Details.Any(u => u.IsDone == false) && waitTimes > 0)
{
- //var pDB = _manager_P_Product.QueryProductByPID(p.PID);
-
- //for (int i = 0; i < p.Details.Count; i++)
- //{
- // if (!p.Details[i].IsDone)
- // {
- // var correspondingDetail = pDB?.Details.FirstOrDefault(u => u.PositionName == p.Details[i].PositionName);
- // if (correspondingDetail?.IsDone ?? false)
- // {
- // p.Details[i] = correspondingDetail;
- // }
- // }
- //}
+
waitTimes--;
}
@@ -743,9 +258,7 @@
var defectClass = GetDefectClassFromDefectList(defects);
UpdateResult(DateTime.Now, p.SN, defectClass.ClassName, "");
- //浜у搧搴忓彿+1
- Interlocked.Increment(ref _productIndex);
-
+
List<ISpec> specList = new List<ISpec>();
specList.AddRange(p.Details.SelectMany(u => u.SpecList).ToList().ConvertAll(u => (ISpec)u));
specList.AddRange(p.Details.SelectMany(u => u.ResultList.SelectMany(d => d.Specs)));
@@ -763,80 +276,7 @@
//}
}
- private void ReplyRealTimeData(List<ContourPoint>? contourPoints, List<ISpec> specList)
- {
- if (contourPoints != null && contourPoints.Count > 0)
- {
- M141Config.RealTimeDataModels.ForEach(r =>
- {
- if (!r.IsEnabled)
- return;
-
- List<string> selectPoints = new List<string>();
- r.DataDetails.ForEach(u =>
- {
- var point = contourPoints.FirstOrDefault(c => c.Name == u.PointName);
- if (point != null)
- {
- double pValue = 0;
- switch (u.EdgeSelect)
- {
- case ContourEdge.X:
- pValue = point.ActualX;
- break;
- case ContourEdge.Y:
- pValue = point.ActualY;
- break;
- }
-
- if (pValue > u.ValidRangeMin && pValue < u.ValidRangeMax)
- {
- selectPoints.Add($"{point.Name.Replace(' ', '-').Replace('_', '-')}-{u.EdgeSelect.ToString()}:{pValue.ToString("f3")}");
- }
- }
- });
-
- if (selectPoints.Count == r.DataDetails.Count)
- {
- string reply = r.DataHead + ",";
- reply += $"{string.Join(",", selectPoints)},Count:{_productIndex}*\r\n";
- _realTimeServer.WriteAndRead(reply, out _, out _);
- }
- });
- }
-
- if (specList != null && specList.Count > 0)
- {
- M141Config.RealTimeDataModels.ForEach(r =>
- {
- if (!r.IsEnabled)
- return;
-
- List<string> selectPoints = new List<string>();
- r.DataDetails.ForEach(u =>
- {
- var spec = specList.FirstOrDefault(s => s.Code == u.SpecCode);
- if (spec != null)
- {
- double pValue = spec.ActualValue ?? -999;
- if (pValue > u.ValidRangeMin && pValue < u.ValidRangeMax)
- {
- selectPoints.Add($"{spec.Code.Replace(' ', '-').Replace('_', '-')}{u.SpecAfter}:{pValue.ToString("f3")}");
- //selectPoints.Add($"{u.EdgeSelect.ToString()}:{pValue.ToString("f3")}");
- }
- }
- });
-
- if (selectPoints.Count == r.DataDetails.Count)
- {
- string reply = r.DataHead + ",";
- reply += $"{string.Join(",", selectPoints)},Count:{_productIndex}*\r\n";
- _realTimeServer.WriteAndRead(reply, out _, out _);
- }
- });
- }
-
- }
+
private void UpdateProductResultAsync(ProductModel p)
{
@@ -860,215 +300,11 @@
//_manager_P_Product.UpdateProductResult(p.ID, p.PID, p.SN, p.Result);
});
- //return await _taskFactory.StartNew(() =>
- // {
- // UpdateProductResult(p, out bool isOK);
- // return isOK;
- // });
+
}
- [ProcessMethod("", "UploadDataToMES", "涓婁紶淇℃伅鑷矼ES", InvokeType.TestInvoke)]
- public ResponseMessage UploadDataToMES(IOperationConfig config, IDevice executeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- try
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES涓婁紶淇℃伅锛歿config.TriggerStr}");
- //MESService.WSTESTSoapClient client = new MESService.WSTESTSoapClient(MESService.WSTESTSoapClient.EndpointConfiguration.WSTESTSoap, M141Config.MESUploadURL);
- //string reply = client.aoidataX2966aoi3Insert(config.TriggerStr);
- HttpPost(M141Config.MESUploadURL, config.TriggerStr, out string reply, out StatusCode_en encode);
+
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES鍙嶉淇℃伅锛歿reply}\r\n{JsonConvert.SerializeObject(encode)}");
- XDocument doc = XDocument.Parse(reply);
- foreach (XElement element in doc.Root.Elements())
- {
- reply = element.Value;
- }
-
- msg.DataStr = reply;
- Mes_re jObj = JsonConvert.DeserializeObject<Mes_re>(reply);
-
-
- msg.Result = jObj.code; /*== 1000 ? 1 : -1;*/
-
- if (msg.Result == 1003)
- {
- if (jObj.msg.Contains("瀵奸�氭祴璇�"))
- {
- msg.Result = 4;
- }
- else
- {
- msg.Result = 1;
- }
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"涓婁紶淇℃伅鑷硔M141Config.MESUploadURL}寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- }
- return msg;
- }
-
- public bool HttpPost(string url, string postDataStr, out string Result, out StatusCode_en ResultStatus)
- {
- if (M141Config.MESProjectCode.ToUpper().Contains("3221AOI1"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3221_AOI1_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3221_AOI1_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
- else if (M141Config.MESProjectCode.ToUpper().Contains("3221AOI2"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3221_AOI2_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3221_AOI2_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
- else if (M141Config.MESProjectCode.ToUpper().Contains("3221AOI3B"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3221_AOI3B_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3221_AOI3B_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
- else if (M141Config.MESProjectCode.ToUpper().Contains("3221AOI3"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3221_AOI3_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3221_AOI3_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
- else if (M141Config.MESProjectCode.ToUpper().Contains("3222AOI2"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3222_AOI2_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3222_AOI2_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
- else if (M141Config.MESProjectCode.ToUpper().Contains("3222AOI3"))
- {
- postDataStr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <X3222_AOI3_Upload xmlns=\"http://tempuri.org/\">\r\n <json>" + postDataStr + "</json>\r\n </X3222_AOI3_Upload>\r\n </soap:Body>\r\n</soap:Envelope>";
- }
-
- bool flag = false;
- Result = string.Empty;
- ResultStatus = new StatusCode_en();
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
- HttpWebResponse response;
- try
- {
- request.Timeout = 2000;//杩炴帴MES瓒呮椂涓嶈秴杩�2S
- byte[] bytesToPost = System.Text.Encoding.UTF8.GetBytes(postDataStr); //杞崲涓篵ytes鏁版嵁
- request.Method = "POST";
- request.ContentType = "text/xml; charset=utf-8";
- //request.ContentLength = bytesToPost.Length;
-
- // POST / CYWebService.asmx / X3221_AOI2_Upload HTTP / 1.1
- //Host: 10.8.0.66
- //Content - Type: application / x - www - form - urlencoded
- //Content - Length: length
-
- //json = string
-
- //request.ContentType = "application/json";
-
- //request.Headers["Authorization"] = "09a2815ab6814ea3a87166d2bf866085"; //瀹緵
- //request.Headers["Content-MD5"] = "c69fac58411218a8f4a7b1f8e00cf791";//MD5瑙f瀽
- request.Accept = "*/*";
- CookieContainer cookie = new CookieContainer();
- request.CookieContainer = cookie;
- #region 鍏朵粬娌℃湁璁剧疆鐨勫弬鏁�
- //request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr);//娣诲姞闀垮害鍚庡啓鍏ユ祦鍚庡叧闂笉浜�,鍙兘娴佹柟寮忎笉鍚岄棶棰�
- //request.Referer = "";
- //request.Accept = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
- //request.Headers["Accept-Language"] = "zh-CN,zh;q=0.";
- //request.Headers["Accept-Charset"] = "GBK,utf-8;q=0.7,*;q=0.3";
- //request.UserAgent = "User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1";
- //request.KeepAlive = true;
- //Stream myRequestStream = request.GetRequestStream();
- //StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312"));
- //myStreamWriter.Write(bytesToPost);
- //myStreamWriter.Flush();
- //myStreamWriter.Close();
- #endregion
- Stream stream = request.GetRequestStream();
- byte[] bs = System.Text.Encoding.UTF8.GetBytes(postDataStr);
- stream.Write(bs, 0, bs.Length);
- stream.Flush();
- stream.Close();
- response = (HttpWebResponse)request.GetResponse();
-
- ResultStatus = new StatusCode_en
- {
- StatusCode = (int)response.StatusCode,
- StatusCodeDiscribe = response.StatusDescription,
- };
- response.Cookies = cookie.GetCookies(response.ResponseUri);
- Stream myResponseStream = response.GetResponseStream();
- //鑾峰彇鍏ㄩ儴杩斿洖鍊糥ML瀛楃涓�
- StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
- Result = myStreamReader.ReadToEnd();
- flag = true;
- }
- catch (WebException ex)
- {
- //response = (HttpWebResponse)ex.Response;//鏈変簺寮傚父濡傛搷浣滆秴鏃讹紝瀵硅薄浼氫负绌猴紝鎯宠璇︾粏鏁版嵁涓嶅缓璁姞鍒ゆ柇
- ResultStatus = new StatusCode_en
- {
- ErrDiscribe = ex.Message
- };
- flag = false;
- }
- return flag;
- }
-
- public class StatusCode_en//缁撴灉鍚堥泦
- {
- /// <summary>
- /// 鐘舵�佺爜锛屽404
- /// </summary>
- public int StatusCode { get; set; }
- /// <summary>
- /// 鐘舵�佹弿杩帮紝濡侼otFound
- /// </summary>
- public string StatusCodeDiscribe { get; set; }
- /// <summary>
- /// 閿欒鎻忚堪锛屽
- /// </summary>
- public string ErrDiscribe { get; set; }
- }
-
- public class Mes_re//缁撴灉鍚堥泦
- {
-
- public int code { get; set; }
-
- public string msg { get; set; }
-
- public object value { get; set; }
-
- public object data { get; set; }
- }
-
-
-
- [ProcessMethod("", "CheckProductSNByMES", "妫�娴嬩骇鍝佹潯鐮侊紙鍓嶇珯缁撴灉锛�", InvokeType.TestInvoke)]
- public ResponseMessage CheckProductSNByMES(IOperationConfig config, IDevice executeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- try
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES妫�娴嬫潯鐮侊細{config.TriggerStr}");
-
- MESService.WSTESTSoapClient client = new MESService.WSTESTSoapClient(MESService.WSTESTSoapClient.EndpointConfiguration.WSTESTSoap, M141Config.MESUploadURL);
-
- Stopwatch sw = new Stopwatch();
- sw.Start();
- string reply = client.checkaoidataX2966aoi3Insert(config.TriggerStr);
- msg.DataStr = reply;
-
- sw.Stop();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"MES妫�娴嬫潯鐮亄config.TriggerSource}锛屽弽棣堜俊鎭細{reply}锛岃�楁椂锛歿sw.ElapsedMilliseconds}ms");
-
- JObject jObj = JsonConvert.DeserializeObject<JObject>(reply);
- msg.Result = jObj.Value<string>("msg") == "OK" ? 1 : -1;
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬫潯鐮佷俊鎭嚦{M141Config.MESUploadURL}寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- }
- return msg;
- }
-
+
}
}
diff --git a/src/Bro.M141.Process/M141Process_Lines.cs b/src/Bro.M141.Process/M141Process_Lines.cs
deleted file mode 100644
index c49f5e1..0000000
--- a/src/Bro.M141.Process/M141Process_Lines.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
- public List<List<Pointdata>> M141Pointlist = new List<List<Pointdata>>();
-
- public List<List<Pointdata>> M141Codelist = new List<List<Pointdata>>();
-
- public event Action PointRefresh;
-
-
- public void PointRefreshUI()
- {
- if (PointRefresh!=null)
- {
- PointRefresh.Invoke();
- }
- }
- }
-
-
- public class Pointdata
- {
-
- public string Code { get; set; } = "";
- public double ValueX { get; set; } = 0;
- public double ValueY { get; set; } = 0;
-
-
- public double Value { get; set; } = 0;
- public double Stand { get; set; } = 0;
- public double Max { get; set; } = 0;
- public double Min { get; set; } = 0;
-
- public bool ispoint = true;
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/src/Bro.M141.Process/M141Process_OEE.cs b/src/Bro.M141.Process/M141Process_OEE.cs
deleted file mode 100644
index 27fc354..0000000
--- a/src/Bro.M141.Process/M141Process_OEE.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Model;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing.Design;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
- private void OEEDataUpload(string stationCode, string sn, List<DetectResult> defectList)
- {
- try
- {
- WebApiHelper apiHelper = new WebApiHelper();
- string data = GetDefectDataStrForOEEDataUpload(stationCode, sn, defectList);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"OEE涓婁紶淇℃伅{data}");
-
- apiHelper.dooPostAsync(M141Config.OEEDataUploadURL, data).ContinueWith(t =>
- {
- try
- {
- string replyData = t.Result;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"OEE涓婁紶淇℃伅瀹屾垚锛屽弽棣坽replyData}");
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"OEE涓婁紶淇℃伅鍙嶉寮傚父锛寋ex.GetExceptionMessage()}");
- }
- });
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅{stationCode}涓婁紶OEE淇℃伅寮傚父锛寋ex.GetExceptionMessage()}");
- }
- }
-
- const string MES_OK = "Passed";
- const string MES_NG = "Failed";
- private string GetDefectDataStrForOEEDataUpload(string stationCode, string sn, List<DetectResult> defectList)
- {
- MESDataFrame dataFrame = new MESDataFrame();
- dataFrame.workPlace = stationCode;
-
- snData data = new snData();
- data.sn = sn;
- data.dateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- data.result = defectList.All(u => u.ResultState == EnumHelper.ResultState.OK) ? MES_OK : MES_NG;
-
- var specList = defectList.SelectMany(u => u.Specs).ToList();
- specList.ForEach(s =>
- {
- measurement mm = new measurement();
- mm.reference = s.Code;
- mm.type = "1";
- mm.status = s.MeasureResult == true ? MES_OK : MES_NG;
- mm.value = s.GetMeasureValueStr(4);
- mm.ucl = (s.StandardValue + s.Tolrenance_Positive).ToString("f4");
- mm.lcl = (s.StandardValue - s.Tolrenance_Negative).ToString("f4");
- data.measurements.Add(mm);
- });
-
- var allDefects = defectList.GetDefectDescList();
- var assignedDefects = new List<string>();
-
- //_allDefectList.ForEach(s =>
- //{
- // measurement mm = new measurement();
- // mm.reference = s;
- // mm.type = "2";
- // mm.status = allDefects.Contains(s) ? MES_NG : MES_OK;
- // data.measurements.Add(mm);
- //});
-
- var allDemands = Config.GetDefectSwitch().Where(u => u.IsEnable).Select(u => u.DefectName).Distinct().ToList();
-
- allDemands.ForEach(s =>
- {
- if (specList.Any(u => u.Code == s))
- {
- return;
- }
- else
- {
- measurement mm = new measurement();
- mm.reference = s;
- mm.type = "2";
- mm.status = allDefects.Contains(s) ? MES_NG : MES_OK;
- data.measurements.Add(mm);
- }
- });
-
- allDefects.ForEach(s =>
- {
- if (!data.measurements.Any(u => u.reference == s))
- {
- measurement mm = new measurement();
- mm.reference = s;
- mm.type = "2";
- mm.status = MES_NG;
- data.measurements.Add(mm);
- }
- });
-
- dataFrame.snData.Add(data);
-
- return JsonConvert.SerializeObject(dataFrame);
- }
- }
-
- public class MESDataFrame
- {
- public string workPlace { get; set; } = "";
-
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<snData>), typeof(UITypeEditor))]
- public List<snData> snData { get; set; } = new List<snData>();
- }
-
- public class snData : IComplexDisplay
- {
- public string sn { get; set; } = "";
- public string dateTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- public string result { get; set; } = "";
-
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<measurement>), typeof(UITypeEditor))]
- public List<measurement> measurements { get; set; } = new List<measurement>();
-
- public string GetDisplayText()
- {
- return $"{sn} {result}";
- }
- }
-
- public class measurement : IComplexDisplay
- {
- public string reference { get; set; } = "";
- public string type { get; set; } = "1";
- public string status { get; set; } = "";
- public string value { get; set; } = "";
- public string ucl { get; set; } = "";
- public string lcl { get; set; } = "";
-
- public string GetDisplayText()
- {
- return $"{reference} {status} {value}";
- }
- }
-}
diff --git a/src/Bro.M141.Process/M141Process_Statistic.cs b/src/Bro.M141.Process/M141Process_Statistic.cs
deleted file mode 100644
index 6c4b162..0000000
--- a/src/Bro.M141.Process/M141Process_Statistic.cs
+++ /dev/null
@@ -1,412 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M135.Common;
-using Newtonsoft.Json;
-using NPOI.SS.Formula.Functions;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing.Design;
-using System.Drawing.Printing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
- public event Action<ProductModel> UploadProductForStatistic;
- public List<ISpec> GetSpecHeads()
- {
- return Config.GetSpecList().Where(u => u.IsEnabled).OrderBy(u => u.Code).ToList();
- }
-
- object _pListForStatisticLock = new object();
- public List<ProductModel> ProductListForStatistic { get; set; } = new List<ProductModel>();
-
- private async void HandleProductStatistc(ProductModel product)
- {
- await Task.Run(() =>
- {
- if (product == null)
- return;
-
- lock (_pListForStatisticLock)
- {
- //foreach (var item in product.ProductResultCollection)
- //{
- // item.Value.PID = product.PID;
- // item.Value.ProductSeq = item.Key;
- // item.Value.EndTime = DateTime.Now;
-
- SummaryOKRate(product);
- ProductListForStatistic.Insert(0, product);
-
- UploadProductForStatistic?.Invoke(product);
- //}
-
- while (ProductListForStatistic.Count > M141Config.MaxProductNumForStatistic)
- {
- ProductListForStatistic.RemoveAt(ProductListForStatistic.Count - 1);
- }
- }
-
- //UploadProductForStatistic?.Invoke(product);
- });
- }
-
- #region 鑹巼缁熻
- public SummaryData SummaryData { get; set; } = new SummaryData();
-
- object _okRateLock = new object();
- public OKRateModel OKRateModel => SummaryData.OKRateModel;
- public List<ShiftSummary> ShiftSummaryDatas => SummaryData.ShiftSummaryDatas;
-
- private void SummaryOKRate(ProductModel singleResult)
- {
- var results = singleResult.Result;
-
- if (results == "NG")
- {
- List<string> ngitem = new List<string>();
- foreach (var v in singleResult.Details)
- {
- ngitem.AddRange(v.ResultList.GetDefectDescList());
- ngitem.AddRange(v.DefectList);
- }
- ngitem = ngitem.Distinct().ToList();
- List<string> ngitemD = ngitem.Where(u => u.ToUpper().Contains("FAI")).ToList();
- //List<string> ngitemC = ngitem.Where(u => !u.ToUpper().Contains("FAI")).ToList();
- if (ngitemD != null && ngitemD.Count > 0)
- {
- results = "CNG";
- }
- else
- {
- results = "WNG";
- }
-
- }
-
-
-
-
-
- lock (_okRateLock)
- {
- OKRateModel.TotalNum++;
-
- bool isSpecOK = true;
- bool isDefectOK = true;
-
- if (results.ToUpper().Equals("CNG"))
- {
- OKRateModel.Spec_NG++;
- isSpecOK = false;
- }
-
- if (results.ToUpper().Equals("WNG"))
- {
- OKRateModel.Defect_NG++;
- isDefectOK = false;
- }
-
- if (isSpecOK && isDefectOK)
- {
- OKRateModel.OKNum++;
- }
-
-
- ShiftSummary? shift = InitialCurrentShift(singleResult.EndTime??DateTime.Now);
-
- var hourData = shift.HourDatas.FirstOrDefault(u => u.HourTime <= singleResult.EndTime && u.HourTime.AddHours(1) > singleResult.EndTime);
- if (hourData == null)
- {
- LogAsync(DateTime.Now, Common.Helper.EnumHelper.LogLevel.Error, $"浜у搧{singleResult.PID}锛岀粨鏉熸椂闂磠(singleResult.EndTime??DateTime.Now).ToString("MM/dd HH:mm")}鏈兘缁熻鍒板悎閫傜殑鏃舵");
- }
- else
- {
- hourData.OKRateModel.TotalNum++;
- if (!isSpecOK)
- {
- hourData.OKRateModel.Spec_NG++;
- }
-
- if (!isDefectOK)
- {
- hourData.OKRateModel.Defect_NG++;
- }
-
- if (isSpecOK && isDefectOK)
- {
- hourData.OKRateModel.OKNum++;
- }
- }
-
- _saveSummaryDataTimer.Change(15 * 1000, -1);
- }
- }
-
- private ShiftSummary InitialCurrentShift(DateTime dtNow)
- {
- var shift = ShiftSummaryDatas.FirstOrDefault(u => u.StartTime <= dtNow && u.EndTime > dtNow);
- if (shift == null)
- {
- DateTime shiftStartTime = DateTime.Now;
- if (dtNow.Hour >= 8 && dtNow.Hour < 20)
- {
- shiftStartTime = dtNow.Date.AddHours(8);
- }
- else if (dtNow.Hour >= 20 && dtNow.Hour < 0)
- {
- shiftStartTime = dtNow.Date.AddHours(20);
- }
- else
- {
- shiftStartTime = dtNow.AddDays(-1).AddHours(20);
- }
-
- shift = new ShiftSummary()
- {
- StartTime = shiftStartTime,
- EndTime = shiftStartTime.AddHours(12),
- };
- shift.Initial();
- ShiftSummaryDatas.Add(shift);
-
- while (ShiftSummaryDatas.Count > 2)
- {
- ShiftSummaryDatas.RemoveAt(0);
- }
-
- while (ShiftSummaryDatas.Count < 2)
- {
- ShiftSummary tempShift = new ShiftSummary()
- {
- StartTime = ShiftSummaryDatas[ShiftSummaryDatas.Count - 1].EndTime,
- EndTime = ShiftSummaryDatas[ShiftSummaryDatas.Count - 1].EndTime.AddHours(12),
- };
- tempShift.Initial();
-
- ShiftSummaryDatas.Add(tempShift);
- }
- }
-
- return shift;
- }
-
- public void ResetOKRate()
- {
- lock (_okRateLock)
- {
- OKRateModel.TotalNum = OKRateModel.OKNum = OKRateModel.Spec_NG = OKRateModel.Defect_NG = 0;
- }
- }
-
- System.Threading.Timer _saveSummaryDataTimer = null;
- public void InitialSummaryData()
- {
- if (_saveSummaryDataTimer == null)
- {
- _saveSummaryDataTimer = new System.Threading.Timer(SaveSummaryData, null, -1, -1);
- }
-
- string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SummaryData.json");
- if (File.Exists(filePath))
- {
- try
- {
- using (StreamReader reader = new StreamReader(filePath, System.Text.Encoding.UTF8))
- {
- var dataStr = reader.ReadToEnd();
-
- SummaryData = JsonConvert.DeserializeObject<SummaryData>(dataStr);
- if (SummaryData == null)
- {
- SummaryData = new SummaryData();
- }
- }
- }
- catch (Exception ex)
- {
- SummaryData = new SummaryData();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"缁熻姹囨�讳俊鎭鍙栧け璐ワ紝鍒濆鍖栫粺璁℃眹鎬�");
- }
- }
-
- InitialCurrentShift(DateTime.Now);
- }
-
-
- private void SaveSummaryData(object? state)
- {
- if (!SaveSummaryData(out string error))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"缁熻姹囨�讳俊鎭繚瀛樺け璐ワ紝{error}");
- }
- }
-
- public bool SaveSummaryData(out string error)
- {
- error = "";
-
- try
- {
- using (StreamWriter sw = new StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SummaryData.json"), false, System.Text.Encoding.UTF8))
- {
- sw.Write(JsonConvert.SerializeObject(SummaryData));
- }
- }
- catch (Exception ex)
- {
- error = ex.GetExceptionMessage();
- return false;
- }
-
- return true;
- }
- #endregion
-
- //[ProcessMethod("TestHandleProductStatistic", "TestHandleProductStatistic", "澶勭悊浜у搧缁熻娴嬭瘯鏂规硶", InvokeType.TestInvoke)]
- //public ResponseMessage TestHandleProductStatistic(IOperationConfig config, IDevice executeDevice, IDevice sourceDevice)
- //{
- // ProductModel productModel = new ProductModel();
- // SingleProductResultCollection resultCollection = new SingleProductResultCollection();
- // productModel.ProductResultCollection.Add(0, resultCollection);
-
- // DetectResult result = new DetectResult();
- // result.ResultState = EnumHelper.ResultState.OK;
- // resultCollection.AddPositionSnapshotResult(1, new List<DetectResult>() { result });
-
- // if (config is M141Process.HandleProductStatisticTestOpConfig opConfig)
- // {
- // if (opConfig.Defects.Count > 0)
- // {
- // opConfig.Defects.ForEach(d =>
- // {
- // result.AddNetResult(new NetResult()
- // {
- // DetectDetails = new List<DefectDetail>()
- // {
- // new DefectDetail()
- // {
- // ClassName=d,
- // FinalResult=EnumHelper.ResultState.NG,
- // }
- // }
- // });
- // });
- // }
-
- // if (opConfig.FAINGs.Count > 0)
- // {
- // opConfig.FAINGs.ForEach(f =>
- // {
- // result.Specs.Add(new Spec()
- // {
- // Code = f,
- // ActualValue = 999,
- // MeasureResult = false,
- // });
- // });
- // }
-
- // result.SetResult();
- // }
-
- // HandleProductStatistc(productModel);
-
- // return new ResponseMessage();
- //}
-
- //[Device("TestHandleProductStatistic", "澶勭悊浜у搧缁熻娴嬭瘯鏂规硶閰嶇疆", EnumHelper.DeviceAttributeType.OperationConfig)]
- //public class HandleProductStatisticTestOpConfig : OperationConfigBase
- //{
- // [Category("缂洪櫡淇℃伅")]
- // [Description("缂洪櫡NG淇℃伅")]
- // [DisplayName("缂洪櫡NG淇℃伅")]
- // [TypeConverter(typeof(SimpleCollectionConvert<string>))]
- // [Editor(typeof(SimpleCollectionEditor<string>), typeof(UITypeEditor))]
- // public List<string> Defects { get; set; } = new List<string>();
-
- // [Category("缂洪櫡淇℃伅")]
- // [Description("灏哄NG淇℃伅")]
- // [DisplayName("灏哄NG淇℃伅")]
- // [TypeConverter(typeof(SimpleCollectionConvert<string>))]
- // [Editor(typeof(SimpleCollectionEditor<string>), typeof(UITypeEditor))]
- // public List<string> FAINGs { get; set; } = new List<string>();
- //}
- }
-}
-
-public class SummaryData
-{
- public OKRateModel OKRateModel { get; set; } = new OKRateModel();
- public List<ShiftSummary> ShiftSummaryDatas { get; set; } = new List<ShiftSummary>();
-}
-
-public class OKRateModel
-{
- public int TotalNum { get; set; } = 0;
- public int OKNum { get; set; } = 0;
- public int Spec_NG { get; set; } = 0;
- public int Defect_NG { get; set; } = 0;
-}
-
-public class ShiftSummary
-{
- public DateTime StartTime { get; set; }
- public DateTime EndTime { get; set; }
-
- public List<HourData> HourDatas { get; set; } = new List<HourData>();
-
- public class HourData
- {
- public DateTime HourTime { get; set; }
- public OKRateModel OKRateModel { get; set; } = new OKRateModel();
- }
-
- public void Initial()
- {
- HourDatas.Clear();
-
- for (int i = 0; i < 12; i++)
- {
- HourDatas.Add(new HourData()
- {
- HourTime = StartTime.AddHours(i),
- });
- }
- }
-
-
-
-
-
-}
-
-//public class SingleProductResultCollection
-//{
-// public string PID { get; set; } = "";
-// public int ProductSeq { get; set; } = 0;
-// public DateTime EndTime { get; set; }
-// //public List<List<DetectResult>> DetectResults { get; set; } = new List<List<DetectResult>>();
-// public Dictionary<int, List<List<DetectResult>>> DetectResults { get; set; } = new Dictionary<int, List<List<DetectResult>>>();
-
-// object _resultLock = new object();
-// public void AddPositionSnapshotResult(int positionNum, List<DetectResult> results)
-// {
-// lock (_resultLock)
-// {
-// if (!DetectResults.ContainsKey(positionNum))
-// {
-// DetectResults[positionNum] = new List<List<DetectResult>>();
-// }
-
-// DetectResults[positionNum].Add(results);
-// }
-// }
-//}
diff --git a/src/Bro.M141.Process/M141Process_WorkShift.cs b/src/Bro.M141.Process/M141Process_WorkShift.cs
deleted file mode 100644
index 943a520..0000000
--- a/src/Bro.M141.Process/M141Process_WorkShift.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Bro.Process;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
-
- static public System.Threading.Timer Timer;
- private void SetTaskAtFixedTime()
- {
- //System.Threading.Timer timer = new System.Threading.Timer(new System.Threading.TimerCallback(SaveDataByWorkShift(dateTime)), null, 1*60*1000);
- //Task task = new Task(() =>
- //{
- // timer
- //});
- //task.Start();
-
- //Task.Factory.StartNew(() =>
- //{
- // System.Threading.Thread.Sleep(1*60*1000);
- // SaveDataByWorkShift(dateTime);
- //});
-
- Timer = new System.Threading.Timer(SaveDataByWorkShift, 1, 0, Timeout.Infinite);
- }
-
- public void SaveDataByWorkShift(object obj)
- {
- try
- {
- string dateTime = DateTime.Now.ToString("HH:mm");
- var workShiftSetting = M141Config.WorkShiftList;
- if (workShiftSetting.Count == 0)
- {
- return;
- }
-
- var curProductAmount = base.StatisticRecordsFull.CurRecord.DefectSummary;
- if (curProductAmount != null)
- {
- workShiftSetting.ForEach(w =>
- {
- //濡傛灉褰撳墠鏃堕棿涓鸿鐝鐨勮捣濮嬫椂闂达紝涓旈渶瑕佹竻闄ゆ暟鎹�
- if (dateTime == w.ShiftTime_Start.ToString("HH:mm") && w.IsClearProductSummary)
- {
- LogAsync(DateTime.Now, Common.Helper.EnumHelper.LogLevel.Action, $"鐝{w.ShiftName}寮�濮嬫椂杩涜鐢熶骇鏁版嵁娓呴浂");
- curProductAmount.Reset();
- }
- //濡傛灉褰撳墠鏃堕棿涓鸿鐝鐨勭粨鏉熸椂闂达紝涓旈渶瑕佷繚瀛樻暟鎹�
- else if (dateTime == w.ShiftTime_End.ToString("HH:mm") && w.IsRecordProductSummary)
- {
- LogAsync(DateTime.Now, Common.Helper.EnumHelper.LogLevel.Action, $"鐝{w.ShiftName}缁撴潫鏃惰繘琛岀敓浜ф暟鎹繚瀛�");
-
- string savePath = Path.Combine(M141Config.LogPath, "鐝璁板綍");
- if (!Directory.Exists(savePath))
- {
- Directory.CreateDirectory(savePath);
- }
-
- string fileName = $"{w.ShiftName}_{DateTime.Now.ToString("yyyyMMdd")}_#{w.ShiftTime_Start.ToString("HHmm")}-{w.ShiftTime_End.ToString("HHmm")}#.csv", pHead = "妫�娴嬮」,鏁伴噺,鍗犳瘮", pData = "";
-
- curProductAmount.RecordsList.ForEach(e =>
- {
- pData += $"{e.ClassDesc},{e.Amount},{e.PercentStr},\n";
- });
-
- CSVRecordAsync(Path.Combine(savePath, fileName), pData, pHead);
- }
- });
- }
- }
- catch (Exception)
- {
- Timer.Dispose();
- }
- finally
- {
- Timer.Change(1 * 60 * 1000, Timeout.Infinite);
- }
- }
- }
-}
diff --git a/src/Bro.M141.Process/M41Process_Inspection.cs b/src/Bro.M141.Process/M41Process_Inspection.cs
deleted file mode 100644
index 7e2c1f4..0000000
--- a/src/Bro.M141.Process/M41Process_Inspection.cs
+++ /dev/null
@@ -1,328 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Configuration;
-using System.Drawing.Design;
-using System.Linq;
-using System.Text;
-using System.Text.Json.Serialization;
-using System.Threading.Tasks;
-
-namespace Bro.M141.Process
-{
- public partial class M141Process
- {
- public InspectionConfig InspectionConfig { get; set; } = new InspectionConfig();
-
- private bool isInspectionDoing = false;
-
- volatile bool _isSpotCheckValid = true;
-
- public bool FistStart = true;
- const string SPOTALARMMSG = $"鐐规瓒呮椂锛岃鎵ц鐐规";
- List<InspectionShift> _alertInspectionShifts = new List<InspectionShift>();
- public bool IsInspectionDoing
- {
- get => isInspectionDoing;
- set
- {
- if (isInspectionDoing != value)
- {
- isInspectionDoing = value;
-
- if (!isInspectionDoing)
- {
- _alertInspectionShifts.Clear();
- }
- }
- }
- }
-
-
- public bool SaveInspectionConfig(out string error)
- {
- error = "";
- try
- {
- using (StreamWriter sw = new StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Inspection.json"), false, System.Text.Encoding.UTF8))
- {
- sw.Write(JsonConvert.SerializeObject(InspectionConfig));
- }
- }
- catch (Exception ex)
- {
- error = ex.GetExceptionMessage();
- return false;
- }
- return true;
- }
-
- volatile int _accumulativeSpotCheckTime = 0;
-
- private bool CheckInspectionInPeriodic(int heartBeatInterval)
- {
- //lock (_spotCheckLock)
- {
- if (FistStart)
- {
- string StartPoint = ConfigurationManager.AppSettings["StartPoint"];
-
- if (string.IsNullOrEmpty(StartPoint) || StartPoint.ToUpper().Equals("TRUE"))
- {
-
- }
- else
- {
- FistStart = false;
- }
- }
-
- if (_accumulativeSpotCheckTime == 0 || Interlocked.Add(ref _accumulativeSpotCheckTime, heartBeatInterval) >= 10000)
- {
- Interlocked.Exchange(ref _accumulativeSpotCheckTime, 1);
- CheckInspectionInPeriodicAsync();
- }
- }
-
- return _isSpotCheckValid;
- }
-
- public async void CheckInspectionInPeriodicAsync()
- {
- await Task.Run(() =>
- {
- DateTime dt = DateTime.Now;
- bool tempJudge = true;
- RaisedAlarm(SPOTALARMMSG, false);
- InspectionConfig.InspectionShifts.ForEach(s =>
- {
- if (CheckInTimePeriod(s, dt))
- {
- if (!CheckInTimePeriod(s, InspectionConfig.LastInspectTime))
- {
- tempJudge = false;
- AlertInspection(s);
- }
- else if (FistStart && tempJudge)
- {
- tempJudge = false;
- AlertInspection(s);
- }
- }
- });
- _isSpotCheckValid = tempJudge;
-
- });
- }
-
- static object _alertInspectionShiftLock = new object();
-
- private void AlertInspection(InspectionShift s)
- {
- lock (_alertInspectionShiftLock)
- {
- if (!_alertInspectionShifts.Any(u => u.Id == s.Id))
- {
- _alertInspectionShifts.Add(s);
-
- Task.Run(() =>
- {
- if (!IsInspectionDoing)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"{s.ShiftName}{SPOTALARMMSG}");
-
- RaisedAlarm(SPOTALARMMSG, true, WarningLevel.Hint);
- MessageBox.Show($"{s.ShiftName}{SPOTALARMMSG}");
-
- _alertInspectionShifts.RemoveAll(u => u.Id == s.Id);
- }
- });
- }
- }
- }
-
- private static bool CheckInTimePeriod(InspectionShift u, DateTime? dt)
- {
- if (dt == null)
- return false;
-
- var startTime = dt.Value.Date.Add(u.ShiftTime_Start.TimeOfDay);
- var endTime = startTime.AddHours(u.ValidHours);
-
- var isInTimes = dt >= startTime && dt < endTime;
- if (!isInTimes)
- {
- startTime = startTime.AddDays(-1);
- endTime = startTime.AddHours(u.ValidHours);
-
- isInTimes = dt >= startTime && dt < endTime;
- }
-
- return isInTimes;
- }
-
-
- public void InitialInspectionConfig()
- {
- string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Inspection.json");
- if (File.Exists(filePath))
- {
- try
- {
- using (StreamReader reader = new StreamReader(filePath, System.Text.Encoding.UTF8))
- {
- var dataStr = reader.ReadToEnd();
-
- InspectionConfig = JsonConvert.DeserializeObject<InspectionConfig>(dataStr);
- if (InspectionConfig == null)
- {
- InspectionConfig = new InspectionConfig();
- }
- }
- }
- catch (Exception ex)
- {
- InspectionConfig = new InspectionConfig();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鐐规閰嶇疆淇℃伅璇诲彇澶辫触锛屽垵濮嬪寲鐐规閰嶇疆");
- }
- }
- }
-
-
-
-
- }
-
- public class InspectionConfig
- {
- [Browsable(false)]
- public List<DefectPositionSet> CheckDefectNames { get; set; } = new List<DefectPositionSet>();
-
- [Browsable(false)]
- public DateTime? LastInspectTime { get; set; } = null;
-
-
- [Browsable(false)]
- public string Excelpath { get; set; } = "";
-
- [ResCategory("鐐规鏃堕棿")]
- [ResDescription("璁剧疆姣忔鐐规鐨勫紑濮嬫椂闂�")]
- [ResDisplayName("鐐规璁剧疆闆嗗悎")]
- [TypeConverter(typeof(ComplexObjectConvert))]
- [Editor(typeof(ComplexCollectionEditor<InspectionShift>), typeof(UITypeEditor))]
- public List<InspectionShift> InspectionShifts { get; set; } = new List<InspectionShift>();
-
- [Category("灏哄鐐规")]
- [Description("灏哄鐐规璇樊鐧惧垎姣�")]
- [DisplayName("灏哄鐐规璇樊鐧惧垎姣�")]
-
- public int Check { get; set; }
- }
-
- public class InspectionShift : IComplexDisplay
- {
- [Browsable(false)]
- public string Id { get; set; } = Guid.NewGuid().ToString();
-
- [ResCategory("鐐规璁剧疆")]
- [ResDescription("鐐规鍚嶇О璁剧疆")]
- [ResDisplayName("\t\t鐐规鍚嶇О")]
- public string ShiftName { get; set; }
-
- [ResCategory("鐐规璁剧疆")]
- [ResDescription("鐐规寮�濮嬫椂闂磋缃�")]
- [ResDisplayName("\t鐐规寮�濮嬫椂闂�")]
- [TypeConverter(typeof(ShortTimeHHmmConverter))]
- [Editor(typeof(TimePickerEditor), typeof(UITypeEditor))]
- public DateTime ShiftTime_Start { get; set; }
-
- [ResCategory("鐐规璁剧疆")]
- [ResDescription("鐐规鏈夋晥瑕嗙洊鏃堕棿锛屽崟浣峢r")]
- [ResDisplayName("鐐规鏈夋晥鍛ㄦ湡")]
- public int ValidHours { get; set; } = 12;
-
-
- public string GetDisplayText()
- {
- return $"{(string.IsNullOrWhiteSpace(ShiftName) ? "" : $"{ShiftName}锛�")}{ShiftTime_Start.ToString("HH:mm")}";
- }
- }
-
-
- public class DefectPositionSet
- {
-
- /// <summary>
- /// 宸ョ珯
- /// </summary>
- public string PositionNum { get; set; } = "";
-
- /// <summary>
- /// 浜у搧搴忓彿
- /// </summary>
- public string ProduceIndex { get; set; } = "";
-
- /// <summary>
- /// 娴嬮噺椤筩ode
- /// </summary>
- public string Code { get; set; } = "";
-
- /// <summary>
- /// 鏍囧噯鍊�
- /// </summary>
- public string StandardValue { get; set; } = "";
-
- /// <summary>
- /// 鏈�澶у��
- /// </summary>
- public string MaxValue { get; set; } = "";
-
- /// <summary>
- /// 鏈�灏忓��
- /// </summary>
- public string MinValue { get; set; } = "";
-
- /// <summary>
- /// excel褰曞叆鍊�
- /// </summary>
- public string InsertValue { get; set; } = "";
-
- /// <summary>
- /// 娴嬮噺鍊�
- /// </summary>
- public string TestValue { get; set; } = "";
-
- /// <summary>
- /// 鐩稿叧鎬у樊鍊�
- /// </summary>
- public string Relevance { get; set; } = "";
-
- /// <summary>
- /// 鐩稿叧鎬х櫨鍒嗘瘮
- /// </summary>
- public string Relevance2 { get; set; } = "";
-
- /// <summary>
- /// 鏄惁涓哄昂瀵告祴閲忥紝true灏哄锛宖alse锛屽瑙�
- /// </summary>
- public bool Ismeasure { get; set; } = false;
-
- /// <summary>
- /// 鐐规鏃堕棿
- /// </summary>
- [Newtonsoft.Json.JsonIgnore]
- public DateTime? CheckTime { get; set; } = null;
-
-
- /// <summary>
- /// 鐐规缁撴灉
- /// </summary>
- [Newtonsoft.Json.JsonIgnore]
- public bool result { get; set; } = false;
-
- }
-}
diff --git a/src/Bro.M141.Process/OldDataClear.cs b/src/Bro.M141.Process/OldDataClear.cs
deleted file mode 100644
index 7ab3bb9..0000000
--- a/src/Bro.M141.Process/OldDataClear.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.M135.DBManager;
-using System.Diagnostics;
-
-namespace Bro.M141.Process
-{
- public class OldDataClear
- {
- public Lazy<Manager_P_PRODUCT> managerLazy = new Lazy<Manager_P_PRODUCT>();
- public Manager_P_PRODUCT manager =>managerLazy.Value;
-
- static object _instanceLock = new object();
- static OldDataClear instance = null;
- public static OldDataClear Instance
- {
- get
- {
- if (instance == null)
- {
- lock (_instanceLock)
- {
- if (instance == null)
- {
- instance = new OldDataClear();
- }
- }
- }
- return instance;
- }
- }
-
- volatile bool _isStarted = false;
- bool _isAllowDeleteOp = true;
- int _dayLimit = 0;
-
- public void SetAllowFlag(bool isAllowed, int dayLimit)
- {
- _isAllowDeleteOp = isAllowed;
- _dayLimit = dayLimit;
- }
-
- public void RunClearOldData(int dayLimit)
- {
- if (_isStarted)
- return;
-
- _dayLimit = dayLimit;
- _isStarted = true;
-
- Task.Run(() =>
- {
- while (_isStarted)
- {
- if (_dayLimit <= 0)
- continue;
-
- if (_isAllowDeleteOp)
- {
- Stopwatch sw = new Stopwatch();
- sw.Start();
- bool isMigrationOK = manager.DeletOldData(DateTime.Now.Date.AddDays(0 - _dayLimit), 100, out int dataNums, out string msg, out bool isNoData);
- sw.Stop();
-
- if (!isMigrationOK)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏁版嵁鍒犻櫎澶辫触锛寋msg}");
- }
- else
- {
- if (dataNums > 0)
- {
- CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{dataNums}鏉′骇鍝佹暟鎹垹闄ゅ畬鎴愶紝鑰楁椂{sw.ElapsedMilliseconds}ms");
- }
- }
-
- if (isNoData)
- {
- _isAllowDeleteOp = false;
- }
- }
-
- Task.Delay(3000).Wait();
- }
- });
- }
- }
-}
diff --git a/src/Bro.M135.DBManager/Models/P_PRODUCT.cs b/src/Bro.M141.Process/P_PRODUCT.cs
similarity index 100%
rename from src/Bro.M135.DBManager/Models/P_PRODUCT.cs
rename to src/Bro.M141.Process/P_PRODUCT.cs
diff --git a/src/Bro.M135.DBManager/Models/P_PRODUCT_DETAIL.cs b/src/Bro.M141.Process/P_PRODUCT_DETAIL.cs
similarity index 100%
rename from src/Bro.M135.DBManager/Models/P_PRODUCT_DETAIL.cs
rename to src/Bro.M141.Process/P_PRODUCT_DETAIL.cs
diff --git a/src/Bro.M135.Common/ProductModel.cs b/src/Bro.M141.Process/ProductModel.cs
similarity index 100%
rename from src/Bro.M135.Common/ProductModel.cs
rename to src/Bro.M141.Process/ProductModel.cs
diff --git a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.Designer.cs b/src/Bro.M141.Process/UI/CtrlDefectsInPosition.Designer.cs
deleted file mode 100644
index aeb0a71..0000000
--- a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.Designer.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class CtrlDefectsInPosition
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- lblPosition = new Label();
- chkSelectAll = new Sunny.UI.UICheckBox();
- tableLayoutPanel1 = new TableLayoutPanel();
- panel1 = new Panel();
- label1 = new Label();
- fpDefects = new FlowLayoutPanel();
- tableLayoutPanel1.SuspendLayout();
- panel1.SuspendLayout();
- SuspendLayout();
- //
- // lblPosition
- //
- lblPosition.AutoSize = true;
- lblPosition.Location = new Point(6, 6);
- lblPosition.Margin = new Padding(6, 0, 6, 0);
- lblPosition.Name = "lblPosition";
- lblPosition.Size = new Size(76, 30);
- lblPosition.TabIndex = 0;
- lblPosition.Text = "label1";
- //
- // chkSelectAll
- //
- chkSelectAll.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- chkSelectAll.IsScaled = false;
- chkSelectAll.Location = new Point(166, 7);
- chkSelectAll.MinimumSize = new Size(1, 1);
- chkSelectAll.Name = "chkSelectAll";
- chkSelectAll.Padding = new Padding(22, 0, 0, 0);
- chkSelectAll.Size = new Size(150, 29);
- chkSelectAll.TabIndex = 1;
- chkSelectAll.Text = "鍏ㄩ��";
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 1;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Controls.Add(panel1, 0, 0);
- tableLayoutPanel1.Controls.Add(fpDefects, 0, 1);
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 2;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Size = new Size(575, 128);
- tableLayoutPanel1.TabIndex = 2;
- //
- // panel1
- //
- panel1.Controls.Add(label1);
- panel1.Controls.Add(lblPosition);
- panel1.Controls.Add(chkSelectAll);
- panel1.Dock = DockStyle.Fill;
- panel1.Location = new Point(3, 3);
- panel1.Name = "panel1";
- panel1.Size = new Size(569, 39);
- panel1.TabIndex = 0;
- //
- // label1
- //
- label1.AutoSize = true;
- label1.Font = new Font("Microsoft YaHei UI", 15F, FontStyle.Regular, GraphicsUnit.Point);
- label1.Location = new Point(70, 8);
- label1.Margin = new Padding(6, 0, 6, 0);
- label1.Name = "label1";
- label1.Size = new Size(69, 27);
- label1.TabIndex = 2;
- label1.Text = "label1";
- //
- // fpDefects
- //
- fpDefects.Dock = DockStyle.Fill;
- fpDefects.Location = new Point(3, 48);
- fpDefects.Name = "fpDefects";
- fpDefects.Size = new Size(569, 77);
- fpDefects.TabIndex = 1;
- //
- // CtrlDefectsInPosition
- //
- AutoScaleDimensions = new SizeF(13F, 28F);
- AutoScaleMode = AutoScaleMode.Font;
- BorderStyle = BorderStyle.FixedSingle;
- Controls.Add(tableLayoutPanel1);
- Font = new Font("Microsoft YaHei UI", 16F, FontStyle.Regular, GraphicsUnit.Point);
- Margin = new Padding(6, 5, 6, 5);
- Name = "CtrlDefectsInPosition";
- Size = new Size(575, 128);
- tableLayoutPanel1.ResumeLayout(false);
- panel1.ResumeLayout(false);
- panel1.PerformLayout();
- ResumeLayout(false);
- }
-
- #endregion
-
- private Label lblPosition;
- private Sunny.UI.UICheckBox chkSelectAll;
- private TableLayoutPanel tableLayoutPanel1;
- private Panel panel1;
- private FlowLayoutPanel fpDefects;
- private Label label1;
- }
-}
diff --git a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.cs b/src/Bro.M141.Process/UI/CtrlDefectsInPosition.cs
deleted file mode 100644
index 6433ea1..0000000
--- a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Bro.M141.Process.UI
-{
- public partial class CtrlDefectsInPosition : UserControl
- {
- public CtrlDefectsInPosition()
- {
- InitializeComponent();
- }
-
- List<DefectPositionSet> PositionDefects = new List<DefectPositionSet>();
- public string PositionNum { get; set; }
-
-
- public string ProduceNum { get; set; }
-
- List<string> AllDefects = new List<string>();
-
- public CtrlDefectsInPosition(List<string> allDefects, string positionNum, List<DefectPositionSet> positionDefects, string produceNum)
- {
- InitializeComponent();
-
- PositionDefects = positionDefects;
- PositionNum = positionNum;
- ProduceNum = "浜у搧" + produceNum;
- AllDefects = new List<string>(allDefects.OrderBy(u => u));
-
- fpDefects.AutoScroll = true;
-
- this.Load += CtrlDefectsInPosition_Load;
- chkSelectAll.CheckedChanged += ChkSelectAll_CheckedChanged;
- }
-
- private void ChkSelectAll_CheckedChanged(object? sender, EventArgs e)
- {
- foreach (Control c in fpDefects.Controls)
- {
- if (c is Sunny.UI.UICheckBox chk)
- {
- chk.Checked = chkSelectAll.Checked;
- }
- }
- }
-
- private void CtrlDefectsInPosition_Load(object? sender, EventArgs e)
- {
- lblPosition.Text = $"{PositionNum}";
- label1.Text = ProduceNum;
- fpDefects.Controls.Clear();
- AllDefects.ForEach(s =>
- {
- Sunny.UI.UICheckBox chk = new Sunny.UI.UICheckBox();
- chk.Text = s;
-
- chk.Checked = PositionDefects.Any(u => u.Code == s);
-
- fpDefects.Controls.Add(chk);
- });
- }
-
- public List<DefectPositionSet> GetPositionDefects()
- {
- List<DefectPositionSet> list = new List<DefectPositionSet>();
-
-
- foreach (Control c in fpDefects.Controls)
- {
- if (c is Sunny.UI.UICheckBox chk)
- {
- if (chk.Checked)
- {
- DefectPositionSet pSet = new DefectPositionSet()
- {
- Code = chk.Text,
- PositionNum = lblPosition.Text,
- ProduceIndex = label1.Text.Replace("浜у搧", "")
- //PositionNum2 = PositionNum2,
- };
-
- list.Add(pSet);
- }
- }
- }
-
-
- return list;
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.resx b/src/Bro.M141.Process/UI/CtrlDefectsInPosition.resx
deleted file mode 100644
index a395bff..0000000
--- a/src/Bro.M141.Process/UI/CtrlDefectsInPosition.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/CtrlPositionDisplay.Designer.cs b/src/Bro.M141.Process/UI/CtrlPositionDisplay.Designer.cs
deleted file mode 100644
index 2264f25..0000000
--- a/src/Bro.M141.Process/UI/CtrlPositionDisplay.Designer.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-锘縩amespace Bro.M135.Process.UI
-{
- partial class CtrlPositionDisplay
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- this.gbMain = new System.Windows.Forms.GroupBox();
- this.SuspendLayout();
- //
- // gbMain
- //
- this.gbMain.Dock = System.Windows.Forms.DockStyle.Fill;
- this.gbMain.Location = new System.Drawing.Point(0, 0);
- this.gbMain.Name = "gbMain";
- this.gbMain.Size = new System.Drawing.Size(365, 356);
- this.gbMain.TabIndex = 0;
- this.gbMain.TabStop = false;
- this.gbMain.Text = "groupBox1";
- //
- // CtrlPositionDisplay
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.gbMain);
- this.Name = "CtrlPositionDisplay";
- this.Size = new System.Drawing.Size(365, 356);
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private GroupBox gbMain;
- }
-}
diff --git a/src/Bro.M141.Process/UI/CtrlPositionDisplay.cs b/src/Bro.M141.Process/UI/CtrlPositionDisplay.cs
deleted file mode 100644
index a488ecc..0000000
--- a/src/Bro.M141.Process/UI/CtrlPositionDisplay.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-锘縰sing Bro.Common.Interface;
-using Bro.UI.Model.Winform;
-
-namespace Bro.M135.Process.UI
-{
- public partial class CtrlPositionDisplay : UserControl
- {
- ImagePanel imagePanel = null;
- Bitmap imageBackground = null;
- int imageWidth = 2448;
- int imageHeight = 2048;
-
- public string PositionName { get; set; } = "";
-
- public CtrlPositionDisplay()
- {
- InitializeComponent();
-
- imagePanel = new ImagePanel();
- imagePanel.Dock = DockStyle.Fill;
- gbMain.Controls.Clear();
- gbMain.Controls.Add(imagePanel);
- }
-
- public CtrlPositionDisplay(string pName, string backgroundPath)
- {
- InitializeComponent();
-
- imagePanel = new ImagePanel();
- imagePanel.Dock = DockStyle.Fill;
- gbMain.Controls.Clear();
- gbMain.Controls.Add(imagePanel);
-
- //positionName = pName;
- PositionName = gbMain.Text = pName;
-
- if (File.Exists(backgroundPath))
- {
- imageBackground = new Bitmap(backgroundPath);
- imageWidth = imageBackground.Width;
- imageHeight = imageBackground.Height;
-
- imagePanel.LoadImage(imageBackground);
- }
- }
-
- public void UpdateProductResult(List<IShapeElement> eleList)
- {
- this.Invoke(() =>
- {
- Bitmap image = new Bitmap(imageWidth, imageHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
-
- using (Graphics g = Graphics.FromImage(image))
- {
- if (imageBackground != null)
- {
- g.DrawImage(imageBackground, 0, 0);
- }
-
- eleList.ForEach(u => u.Draw(g));
- }
-
- imagePanel.LoadImage(image);
- imagePanel.SetScreenSize();
- });
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/CtrlPositionDisplay.resx b/src/Bro.M141.Process/UI/CtrlPositionDisplay.resx
deleted file mode 100644
index f298a7b..0000000
--- a/src/Bro.M141.Process/UI/CtrlPositionDisplay.resx
+++ /dev/null
@@ -1,60 +0,0 @@
-锘�<root>
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/DefectRectangleIndicator.cs b/src/Bro.M141.Process/UI/DefectRectangleIndicator.cs
deleted file mode 100644
index a53dddf..0000000
--- a/src/Bro.M141.Process/UI/DefectRectangleIndicator.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-锘縰sing Bro.Common.Interface;
-using Bro.UI.Model.Winform;
-using System.ComponentModel;
-using System.Drawing.Design;
-using System.Windows.Forms.Design;
-
-namespace Bro.M141.Process
-{
-
- public class DefectRectangleIndicator : UIIndicator
- {
- public string DefectName { get; set; }
- public RectangleF DisplayRect { get; set; } = new RectangleF();
- public bool IsOK { get; set; } = true;
-
- protected int FontSize = 15;
- public override object Clone()
- {
- DefectRectangleIndicator dri = new DefectRectangleIndicator();
- dri.DefectName = this.DefectName;
- dri.DisplayRect = this.DisplayRect;
- dri.BaseColor = this.BaseColor;
- return dri;
- }
-
- public override void Draw(Graphics g)
- {
- g.FillRectangle(new SolidBrush(Color.FromArgb(100, IsOK ? Color.Transparent : Color.Red)), DisplayRect.X, DisplayRect.Y, DisplayRect.Width, DisplayRect.Height);
- Font font = new Font("Tahoma", FontSize);
- var txtSize = g.MeasureString(DefectName, font);
- g.DrawString(DefectName, font, new SolidBrush(Color.FromArgb(100, IsOK ? Color.Lime : Color.White)), (float)(DisplayRect.X + DisplayRect.Width / 2.0 - txtSize.Width / 2.0), DisplayRect.Y + DisplayRect.Height + 5);
- }
-
- public override string GetDisplayText()
- {
- return $"{DefectName}:{DisplayRect.X} {DisplayRect.Y} {DisplayRect.Width} {DisplayRect.Height}";
- }
- }
-
- public class DefectRectangleIndicatorEditor : UITypeEditor
- {
- public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
- {
- return UITypeEditorEditStyle.Modal;
- }
-
- public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
- {
- IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
-
- if (edSvc != null)
- {
- if (context.Instance is IProcessConfig config)
- {
- FrmDefectRectangleIndicatorEditor frm = new FrmDefectRectangleIndicatorEditor();
-
- if (frm.ShowDialog() == DialogResult.OK)
- {
-
- }
- }
- }
-
- return base.EditValue(context, provider, value);
- }
-
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormInspectionSetting.Designer.cs b/src/Bro.M141.Process/UI/FormInspectionSetting.Designer.cs
deleted file mode 100644
index 4bb3ec7..0000000
--- a/src/Bro.M141.Process/UI/FormInspectionSetting.Designer.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FormInspectionSetting
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- tableLayoutPanel1 = new TableLayoutPanel();
- panel1 = new Panel();
- btnSave = new Sunny.UI.UIButton();
- lblLastSpotCheck = new Label();
- flpDefects = new FlowLayoutPanel();
- groupBox1 = new GroupBox();
- pgInspectionConfig = new PropertyGrid();
- tableLayoutPanel1.SuspendLayout();
- panel1.SuspendLayout();
- groupBox1.SuspendLayout();
- SuspendLayout();
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 1;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Controls.Add(panel1, 0, 0);
- tableLayoutPanel1.Controls.Add(flpDefects, 0, 1);
- tableLayoutPanel1.Controls.Add(groupBox1, 0, 2);
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 3;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 75F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
- tableLayoutPanel1.Size = new Size(1033, 758);
- tableLayoutPanel1.TabIndex = 0;
- //
- // panel1
- //
- panel1.Controls.Add(btnSave);
- panel1.Controls.Add(lblLastSpotCheck);
- panel1.Dock = DockStyle.Fill;
- panel1.Location = new Point(3, 3);
- panel1.Name = "panel1";
- panel1.Size = new Size(1027, 39);
- panel1.TabIndex = 0;
- //
- // btnSave
- //
- btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- btnSave.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- btnSave.IsScaled = false;
- btnSave.Location = new Point(923, 1);
- btnSave.MinimumSize = new Size(1, 1);
- btnSave.Name = "btnSave";
- btnSave.Size = new Size(100, 35);
- btnSave.TabIndex = 1;
- btnSave.Text = "淇� 瀛�";
- btnSave.Click += btnSave_Click;
- //
- // lblLastSpotCheck
- //
- lblLastSpotCheck.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
- lblLastSpotCheck.AutoSize = true;
- lblLastSpotCheck.Font = new Font("Tahoma", 16F, FontStyle.Bold, GraphicsUnit.World);
- lblLastSpotCheck.Location = new Point(16, 10);
- lblLastSpotCheck.Name = "lblLastSpotCheck";
- lblLastSpotCheck.Size = new Size(42, 19);
- lblLastSpotCheck.TabIndex = 0;
- lblLastSpotCheck.Text = "XXX";
- //
- // flpDefects
- //
- flpDefects.Dock = DockStyle.Fill;
- flpDefects.Location = new Point(3, 48);
- flpDefects.Name = "flpDefects";
- flpDefects.Size = new Size(1027, 528);
- flpDefects.TabIndex = 1;
- //
- // groupBox1
- //
- groupBox1.Controls.Add(pgInspectionConfig);
- groupBox1.Dock = DockStyle.Fill;
- groupBox1.Font = new Font("Tahoma", 16F, FontStyle.Regular, GraphicsUnit.World);
- groupBox1.Location = new Point(3, 582);
- groupBox1.Name = "groupBox1";
- groupBox1.Size = new Size(1027, 173);
- groupBox1.TabIndex = 3;
- groupBox1.TabStop = false;
- groupBox1.Text = "鐐规鏃堕棿璁剧疆";
- //
- // pgInspectionConfig
- //
- pgInspectionConfig.Dock = DockStyle.Fill;
- pgInspectionConfig.Font = new Font("Tahoma", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
- pgInspectionConfig.Location = new Point(3, 23);
- pgInspectionConfig.Name = "pgInspectionConfig";
- pgInspectionConfig.Size = new Size(1021, 147);
- pgInspectionConfig.TabIndex = 0;
- pgInspectionConfig.ToolbarVisible = false;
- //
- // FormInspectionSetting
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel1);
- Margin = new Padding(2);
- Name = "FormInspectionSetting";
- Size = new Size(1033, 758);
- tableLayoutPanel1.ResumeLayout(false);
- panel1.ResumeLayout(false);
- panel1.PerformLayout();
- groupBox1.ResumeLayout(false);
- ResumeLayout(false);
- }
-
- #endregion
-
- private TableLayoutPanel tableLayoutPanel1;
- private Panel panel1;
- private Label lblLastSpotCheck;
- private Sunny.UI.UIButton btnSave;
- private FlowLayoutPanel flpDefects;
- private GroupBox groupBox1;
- private PropertyGrid pgInspectionConfig;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormInspectionSetting.cs b/src/Bro.M141.Process/UI/FormInspectionSetting.cs
deleted file mode 100644
index bfb396f..0000000
--- a/src/Bro.M141.Process/UI/FormInspectionSetting.cs
+++ /dev/null
@@ -1,201 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.UI.Model.Winform;
-using HalconDotNet;
-using Sunny.UI;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Drawing.Imaging;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("鐐规閰嶇疆", "鐐规閰嶇疆", 8, Common.Helper.EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FormInspectionSetting : MenuFormBase
- {
- M141Process prM141Process => Process as M141Process;
- M141Config M141Config => Process.IConfig as M141Config;
- InspectionConfig InspectionConfig => prM141Process.InspectionConfig;
-
- List<string> _allDefects = new List<string>();
-
- public FormInspectionSetting()
- {
- InitializeComponent();
-
- flpDefects.Padding = new System.Windows.Forms.Padding(10, 10, 0, 0);
- flpDefects.AutoScroll = true;
- flpDefects.VerticalScroll.Visible = true;
- flpDefects.SizeChanged += FlpDefects_SizeChanged;
- }
-
-
-
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- this.Invoke(() =>
- {
- flpDefects.Controls.Clear();
- var allSpecs = M141Config.GetSpecList();
-
- _allDefects = M141Config.DefectSwitchCollection.Where(u => u.IsEnable && allSpecs.All(s => s.Code != u.DefectName)).Select(u => u.DefectName).OrderBy(u => u).ToList();
- //var allPositionSet = M084Config.PositionSetCollection.Select(u => u.PositionNum).ToList();
- //var allPositionSet2 = M084Config.PositionSetCollection.Select(u => u.PositionNum2).ToList();
-
- LoadPositionSetCtrls(_allDefects, M141Config.WorkPositionCollection);
-
- //M084Config.DefectSwitchCollection.Where(u => u.IsEnable && allSpecs.All(s => s.Code != u.DefectName)).ForEach(u =>
- //{
- // var existed = InspectionConfig.CheckDefectNames.FirstOrDefault(t => t.DefectName == u.DefectName);
- // bool isChecked = existed != null;
- // if (existed == null)
- // {
- // existed = new DefectPositionSet()
- // {
- // PositionNum = 1,
- // DefectName = u.DefectName,
- // };
- // }
-
- // CtrlDefectPositionSet ctrlPset = new CtrlDefectPositionSet(existed, isChecked, allPositionSet);
- // flpDefects.Controls.Add(ctrlPset);
- //});
-
- lblLastSpotCheck.Text = InspectionConfig.LastInspectTime == null ? "鏃犲巻鍙茬偣妫�璁板綍" : $"涓婃鐐规鏃堕棿锛歿InspectionConfig.LastInspectTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}";
-
- pgInspectionConfig.SelectedObject = InspectionConfig;
- });
- }
-
- private void LoadPositionSetCtrls(List<string> allDefects, List<WorkPositionSet> allPositionSet)
- {
- flpDefects.Controls.Clear();
-
- allPositionSet.ForEach(u =>
- {
- for (int i = 1; i <= 2; i++)
- {
- var positionDefects = InspectionConfig.CheckDefectNames.Where(d => d.PositionNum == u.PositionName && d.ProduceIndex == i.ToString()).ToList();
- CtrlDefectsInPosition ctrl = new CtrlDefectsInPosition(_allDefects, u.PositionName, positionDefects, i.ToString());
- flpDefects.Controls.Add(ctrl);
- }
- });
-
- FlpDefects_SizeChanged(null, null);
- }
-
-
- private void FlpDefects_SizeChanged(object? sender, EventArgs e)
- {
- foreach (Control c in flpDefects.Controls)
- {
- c.Width = flpDefects.Width - 30;
- }
- }
-
-
- public HImage ConvertHObjectToHImage(HObject obj)
- {
- HOperatorSet.CountChannels(obj, out HTuple channels);
-
- HImage img = new HImage();
- if (channels.I == 1)
- {
- HTuple pointer, type, width, height;
- HOperatorSet.GetImagePointer1(obj, out pointer, out type, out width, out height);
-
- //img.GenImage1Extern(type, width, height, pointer, IntPtr.Zero);
- img.GenImage1(type, width, height, pointer);
- }
- else
- {
- HTuple pRed, pGreen, pBlue, type, width, height;
- HOperatorSet.GetImagePointer3(obj, out pRed, out pGreen, out pBlue, out type, out width, out height);
-
- img.GenImage3(type, width, height, pRed, pGreen, pBlue);
- }
-
- return img;
- }
-
- private void btnSave_Click(object sender, EventArgs e)
- {
-
- //HObject image = new HObject();
- //HObject zoomImage = new HObject();
-
- //// 璇诲彇鍥惧儚
- //HOperatorSet.ReadImage(out image, "C:\\Users\\楗朵繆\\Desktop\\1111.png");
-
- //// 璋冪敤zoom_image_factor绠楀瓙
- //HOperatorSet.ZoomImageFactor(image, out zoomImage, 0.5, 0.5, "constant");
-
- ////HOperatorSet.Threshold(zoomImage, out HObject Regions, 0, 255);
- ////HOperatorSet.GrayFeatures(Regions, image, "mean", out HTuple grayValue);
-
-
- //// 鎵撳嵃鐏板害鍊�
- ////MessageBox.Show( grayValue.D.ToString());
- //HImage a= ConvertHObjectToHImage(zoomImage);
- //var bitmap = a.ConvertHImageToBitmap();
- //bitmap.Save("C:\\Users\\楗朵繆\\Desktop\\222.png", ImageFormat.Png);
-
- //return;
-
-
-
-
- List<DefectPositionSet> defectNames = new List<DefectPositionSet>();
-
- foreach (Control c in flpDefects.Controls)
- {
- if (c is CtrlDefectsInPosition cc)
- {
- var defects = cc.GetPositionDefects();
- defectNames.AddRange(defects);
- }
- }
-
-
-
-
-
- //if (defectNames.Count == 0)
- //{
- // MessageBox.Show("鏈�夋嫨鐐规缂洪櫡淇℃伅", "淇濆瓨鐐规閰嶇疆鎻愮ず");
- // return;
- //}
-
- InspectionConfig.CheckDefectNames = defectNames;
-
- if (prM141Process.SaveInspectionConfig(out string error))
- {
- MessageBox.Show("鐐规閰嶇疆淇℃伅淇濆瓨鎴愬姛锛�");
- }
- else
- {
- MessageBox.Show($"鐐规閰嶇疆淇℃伅淇濆瓨澶辫触\r\n{error}");
- }
- }
-
- //private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
- //{
- // foreach (Control c in flpDefects.Controls)
- // {
- // if (c is CtrlDefectPositionSet chk)
- // {
- // chk.SetChecked(chkSelectAll.Checked);
- // }
- // }
- //}
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormInspectionSetting.resx b/src/Bro.M141.Process/UI/FormInspectionSetting.resx
deleted file mode 100644
index a395bff..0000000
--- a/src/Bro.M141.Process/UI/FormInspectionSetting.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.Designer.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.Designer.cs
deleted file mode 100644
index 49859be..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.Designer.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FormStatisticInfo_FAISummary
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- scMain = new SplitContainer();
- splitContainer1 = new SplitContainer();
- tableLayoutPanel1 = new TableLayoutPanel();
- dgvSpecDatas = new DataGridView();
- ((System.ComponentModel.ISupportInitialize)scMain).BeginInit();
- scMain.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
- splitContainer1.Panel1.SuspendLayout();
- splitContainer1.Panel2.SuspendLayout();
- splitContainer1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).BeginInit();
- SuspendLayout();
- //
- // scMain
- //
- scMain.Dock = DockStyle.Fill;
- scMain.Location = new Point(0, 0);
- scMain.Margin = new Padding(3, 2, 3, 2);
- scMain.Name = "scMain";
- scMain.Orientation = Orientation.Horizontal;
- scMain.Size = new Size(707, 569);
- scMain.SplitterDistance = 268;
- scMain.SplitterWidth = 3;
- scMain.TabIndex = 0;
- //
- // splitContainer1
- //
- splitContainer1.Dock = DockStyle.Fill;
- splitContainer1.Location = new Point(0, 0);
- splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel1
- //
- splitContainer1.Panel1.Controls.Add(dgvSpecDatas);
- //
- // splitContainer1.Panel2
- //
- splitContainer1.Panel2.Controls.Add(tableLayoutPanel1);
- splitContainer1.Size = new Size(825, 407);
- splitContainer1.SplitterDistance = 499;
- splitContainer1.TabIndex = 0;
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 2;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 1;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Size = new Size(322, 407);
- tableLayoutPanel1.TabIndex = 0;
- //
- // dgvSpecDatas
- //
- dgvSpecDatas.AllowUserToAddRows = false;
- dgvSpecDatas.AllowUserToDeleteRows = false;
- dgvSpecDatas.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dgvSpecDatas.Dock = DockStyle.Fill;
- dgvSpecDatas.Location = new Point(0, 0);
- dgvSpecDatas.Name = "dgvSpecDatas";
- dgvSpecDatas.ReadOnly = true;
- dgvSpecDatas.RowTemplate.Height = 25;
- dgvSpecDatas.Size = new Size(499, 407);
- dgvSpecDatas.TabIndex = 0;
- //
- // FormStatisticInfo
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(scMain);
- Margin = new Padding(2, 2, 2, 2);
- Name = "FormStatisticInfo";
- Size = new Size(707, 569);
- ((System.ComponentModel.ISupportInitialize)scMain).EndInit();
- scMain.ResumeLayout(false);
- splitContainer1.Panel1.ResumeLayout(false);
- splitContainer1.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit();
- splitContainer1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).EndInit();
- ResumeLayout(false);
- }
-
- #endregion
-
- private SplitContainer scMain;
- private SplitContainer splitContainer1;
- private DataGridView dgvSpecDatas;
- private TableLayoutPanel tableLayoutPanel1;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.cs
deleted file mode 100644
index 0bf2d43..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-锘縰sing Bro.UI.Model.Winform;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("鐢熶骇缁熻姹囨��-娴嬮噺姹囨��", "鐢熶骇缁熻姹囨��-娴嬮噺姹囨��", 5, Common.Helper.EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FormStatisticInfo_FAISummary : MenuFormBase
- {
- M141Process M084Process => Process as M141Process;
- M141Config M084Config => Process.IConfig as M141Config;
-
- System.Threading.Timer _refreshUITimer = null;
-
- public FormStatisticInfo_FAISummary()
- {
- InitializeComponent();
-
- _refreshUITimer = new System.Threading.Timer(RefreshUI, null, -1, -1);
- }
-
- public override void OnCustomizedLoad()
- {
- base.OnCustomizedLoad();
- }
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- M084Process.UploadProductForStatistic += M084Process_UploadProductForStatistic;
- }
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- }
- }
-
- private void M084Process_UploadProductForStatistic(object obj)
- {
- _refreshUITimer.Change(500, -1);
- }
-
- private void RefreshUI(object? state)
- {
- //throw new NotImplementedException();
- }
-
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.resx b/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.resx
deleted file mode 100644
index af32865..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_FAISummary.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.Designer.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.Designer.cs
deleted file mode 100644
index 2e59d94..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.Designer.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FormStatisticInfo_OKRate
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- scMain = new SplitContainer();
- splitContainer1 = new SplitContainer();
- dgvSpecDatas = new DataGridView();
- tableLayoutPanel1 = new TableLayoutPanel();
- ((System.ComponentModel.ISupportInitialize)scMain).BeginInit();
- splitContainer1.Panel1.SuspendLayout();
- splitContainer1.Panel2.SuspendLayout();
- scMain.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
- splitContainer1.Panel1.SuspendLayout();
- splitContainer1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).BeginInit();
- SuspendLayout();
- //
- // scMain
- //
- scMain.Dock = DockStyle.Fill;
- scMain.Location = new Point(0, 0);
- scMain.Name = "scMain";
- scMain.Orientation = Orientation.Horizontal;
- //
- // scMain.Panel1
- //
- splitContainer1.Panel1.Controls.Add(splitContainer1);
- //
- // scMain.Panel2
- //
- splitContainer1.Panel2.Controls.Add(tableLayoutPanel1);
- scMain.Size = new Size(825, 744);
- scMain.SplitterDistance = 407;
- scMain.TabIndex = 0;
- //
- // splitContainer1
- //
- splitContainer1.Dock = DockStyle.Fill;
- splitContainer1.Location = new Point(0, 0);
- splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel1
- //
- splitContainer1.Panel1.Controls.Add(dgvSpecDatas);
- splitContainer1.Size = new Size(825, 407);
- splitContainer1.SplitterDistance = 499;
- splitContainer1.TabIndex = 0;
- //
- // dgvSpecDatas
- //
- dgvSpecDatas.AllowUserToAddRows = false;
- dgvSpecDatas.AllowUserToDeleteRows = false;
- dgvSpecDatas.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dgvSpecDatas.Dock = DockStyle.Fill;
- dgvSpecDatas.Location = new Point(0, 0);
- dgvSpecDatas.Name = "dgvSpecDatas";
- dgvSpecDatas.ReadOnly = true;
- dgvSpecDatas.RowTemplate.Height = 25;
- dgvSpecDatas.Size = new Size(499, 407);
- dgvSpecDatas.TabIndex = 0;
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 2;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 1;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Size = new Size(825, 333);
- tableLayoutPanel1.TabIndex = 0;
- //
- // FormStatisticInfo
- //
- AutoScaleDimensions = new SizeF(7F, 17F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(scMain);
- Name = "FormStatisticInfo";
- Size = new Size(825, 744);
- splitContainer1.Panel1.ResumeLayout(false);
- splitContainer1.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)scMain).EndInit();
- scMain.ResumeLayout(false);
- splitContainer1.Panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit();
- splitContainer1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).EndInit();
- ResumeLayout(false);
- }
-
- #endregion
-
- private SplitContainer scMain;
- private SplitContainer splitContainer1;
- private DataGridView dgvSpecDatas;
- private TableLayoutPanel tableLayoutPanel1;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.cs
deleted file mode 100644
index ca41d64..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-锘縰sing Bro.UI.Model.Winform;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("鐢熶骇缁熻姹囨��-鑹巼璁板綍", "鐢熶骇缁熻姹囨��-鑹巼璁板綍", 5, Common.Helper.EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FormStatisticInfo_OKRate : MenuFormBase
- {
- M141Process M084Process => Process as M141Process;
- M141Config M084Config => Process.IConfig as M141Config;
-
- System.Threading.Timer _refreshUITimer = null;
-
- public FormStatisticInfo_OKRate()
- {
- InitializeComponent();
-
- _refreshUITimer = new System.Threading.Timer(RefreshUI, null, -1, -1);
- }
-
- public override void OnCustomizedLoad()
- {
- base.OnCustomizedLoad();
- }
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- M084Process.UploadProductForStatistic += M084Process_UploadProductForStatistic;
- }
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- }
- }
-
- private void M084Process_UploadProductForStatistic(object obj)
- {
- _refreshUITimer.Change(500, -1);
- }
-
- private void RefreshUI(object? state)
- {
- //throw new NotImplementedException();
- }
-
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.resx b/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.resx
deleted file mode 100644
index af32865..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_OKRate.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.Designer.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.Designer.cs
deleted file mode 100644
index cbd36c9..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.Designer.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FormStatisticInfo_ShiftSummary
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- splitContainer1 = new SplitContainer();
- dgvSpecDatas = new DataGridView();
- tableLayoutPanel1 = new TableLayoutPanel();
- tableLayoutPanel2 = new TableLayoutPanel();
- pl1 = new Panel();
- pl2 = new Panel();
- formsPlot1 = new ScottPlot.FormsPlot();
- formsPlot2 = new ScottPlot.FormsPlot();
- ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
- splitContainer1.Panel1.SuspendLayout();
- splitContainer1.Panel2.SuspendLayout();
- splitContainer1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).BeginInit();
- tableLayoutPanel2.SuspendLayout();
- pl1.SuspendLayout();
- pl2.SuspendLayout();
- SuspendLayout();
- //
- // splitContainer1
- //
- splitContainer1.Dock = DockStyle.Fill;
- splitContainer1.Location = new Point(0, 0);
- splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel1
- //
- splitContainer1.Panel1.Controls.Add(dgvSpecDatas);
- //
- // splitContainer1.Panel2
- //
- splitContainer1.Panel2.Controls.Add(tableLayoutPanel1);
- splitContainer1.Size = new Size(825, 407);
- splitContainer1.SplitterDistance = 499;
- splitContainer1.TabIndex = 0;
- //
- // dgvSpecDatas
- //
- dgvSpecDatas.AllowUserToAddRows = false;
- dgvSpecDatas.AllowUserToDeleteRows = false;
- dgvSpecDatas.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dgvSpecDatas.Dock = DockStyle.Fill;
- dgvSpecDatas.Location = new Point(0, 0);
- dgvSpecDatas.Name = "dgvSpecDatas";
- dgvSpecDatas.ReadOnly = true;
- dgvSpecDatas.RowTemplate.Height = 25;
- dgvSpecDatas.Size = new Size(499, 407);
- dgvSpecDatas.TabIndex = 0;
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 2;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 1;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Size = new Size(322, 407);
- tableLayoutPanel1.TabIndex = 0;
- //
- // tableLayoutPanel2
- //
- tableLayoutPanel2.ColumnCount = 2;
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel2.Controls.Add(pl1, 0, 0);
- tableLayoutPanel2.Controls.Add(pl2, 1, 0);
- tableLayoutPanel2.Dock = DockStyle.Fill;
- tableLayoutPanel2.Location = new Point(0, 0);
- tableLayoutPanel2.Name = "tableLayoutPanel2";
- tableLayoutPanel2.RowCount = 1;
- tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
- tableLayoutPanel2.Size = new Size(707, 347);
- tableLayoutPanel2.TabIndex = 0;
- //
- // pl1
- //
- pl1.Controls.Add(formsPlot1);
- pl1.Dock = DockStyle.Fill;
- pl1.Location = new Point(3, 3);
- pl1.Name = "pl1";
- pl1.Size = new Size(347, 341);
- pl1.TabIndex = 0;
- //
- // pl2
- //
- pl2.Controls.Add(formsPlot2);
- pl2.Dock = DockStyle.Fill;
- pl2.Location = new Point(356, 3);
- pl2.Name = "pl2";
- pl2.Size = new Size(348, 341);
- pl2.TabIndex = 0;
- //
- // formsPlot1
- //
- formsPlot1.Dock = DockStyle.Fill;
- formsPlot1.Location = new Point(0, 0);
- formsPlot1.Margin = new Padding(3, 2, 3, 2);
- formsPlot1.Name = "formsPlot1";
- formsPlot1.Size = new Size(347, 341);
- formsPlot1.TabIndex = 0;
- //
- // formsPlot2
- //
- formsPlot2.Dock = DockStyle.Fill;
- formsPlot2.Location = new Point(0, 0);
- formsPlot2.Margin = new Padding(3, 2, 3, 2);
- formsPlot2.Name = "formsPlot2";
- formsPlot2.Size = new Size(348, 341);
- formsPlot2.TabIndex = 0;
- //
- // FormStatisticInfo_ShiftSummary
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel2);
- Margin = new Padding(2);
- Name = "FormStatisticInfo_ShiftSummary";
- Size = new Size(707, 347);
- splitContainer1.Panel1.ResumeLayout(false);
- splitContainer1.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit();
- splitContainer1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)dgvSpecDatas).EndInit();
- tableLayoutPanel2.ResumeLayout(false);
- pl1.ResumeLayout(false);
- pl2.ResumeLayout(false);
- ResumeLayout(false);
- }
-
- #endregion
- private SplitContainer splitContainer1;
- private DataGridView dgvSpecDatas;
- private TableLayoutPanel tableLayoutPanel1;
- private TableLayoutPanel tableLayoutPanel2;
- private Panel pl1;
- private Panel pl2;
- private ScottPlot.FormsPlot formsPlot1;
- private ScottPlot.FormsPlot formsPlot2;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.cs b/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.cs
deleted file mode 100644
index ed2ab29..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-锘縰sing Bro.UI.Model.Winform;
-using ScottPlot;
-using Sunny.UI;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using Windows.ApplicationModel.Calls;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("鐢熶骇缁熻姹囨��-鐝鑹巼", "鐢熶骇缁熻姹囨��-鐝鑹巼", 5, Common.Helper.EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FormStatisticInfo_ShiftSummary : MenuFormBase
- {
- M141Process M084Process => Process as M141Process;
- M141Config M084Config => Process.IConfig as M141Config;
-
- System.Threading.Timer _refreshUITimer = null;
-
- List<FormsPlot> _frmPlotList = new List<FormsPlot>();
- public FormStatisticInfo_ShiftSummary()
- {
- InitializeComponent();
-
- _refreshUITimer = new System.Threading.Timer(RefreshUI, null, -1, -1);
-
- formsPlot1.RightClicked -= formsPlot1.DefaultRightClickEvent;
- formsPlot2.RightClicked -= formsPlot2.DefaultRightClickEvent;
-
- _frmPlotList = new List<FormsPlot>() { formsPlot1, formsPlot2 };
- }
-
- public override void OnCustomizedLoad()
- {
- base.OnCustomizedLoad();
- }
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- M084Process.UploadProductForStatistic += M084Process_UploadProductForStatistic;
- }
-
- RefreshUI(null);
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (M084Process != null)
- {
- M084Process.UploadProductForStatistic -= M084Process_UploadProductForStatistic;
- }
- }
-
- private void M084Process_UploadProductForStatistic(object obj)
- {
- _refreshUITimer.Change(1000, -1);
- }
-
- private void RefreshUI(object? state)
- {
- this.Invoke(() =>
- {
- for (int i = 0; i < 2; i++)
- {
- RefreshHourData(M084Process.ShiftSummaryDatas[i], _frmPlotList[i]);
- }
- });
- }
-
- private void RefreshHourData(ShiftSummary shiftSummary, FormsPlot formsPlot)
- {
- var plot = formsPlot.Plot;
- //plot.Frameless();
- plot.Grid(false);
- plot.Title($"{shiftSummary.StartTime.ToString("MM/dd HH:mm")} ~ {shiftSummary.EndTime.ToString("MM/dd HH:mm")}");
-
- plot.Palette = ScottPlot.Palette.Category20;
- plot.Legend(false);
- plot.Clear();
-
- string[] labels = shiftSummary.HourDatas.Select(u => u.HourTime.ToString("HH")).ToArray();
- string[] serialNames = new string[] { "灏哄NG", "澶栬NG", "OK", "Total" };
-
- var totalNums = shiftSummary.HourDatas.Select(u => (double)u.OKRateModel.TotalNum).ToArray();
-
- //var bar1 = plot.AddBar(totalNums);
- //bar1.ShowValuesAboveBars = true;
- //bar1.ValueFormatter = y => $"Total:{y}";
- //var bar2 = plot.AddBar(shiftSummary.HourDatas.Select(u => (double)u.OKRateModel.OKNum).ToArray());
- //bar2.ShowValuesAboveBars = true;
- //bar2.ValueFormatter = y => $"OK:{y}";
-
- double[][] datas ={
-
- shiftSummary.HourDatas.Select(u=>(double)u.OKRateModel.Spec_NG).ToArray(),
- shiftSummary.HourDatas.Select(u=>(double)u.OKRateModel.Defect_NG).ToArray(),
- shiftSummary.HourDatas.Select(u=>(double)u.OKRateModel.OKNum).ToArray(),
- shiftSummary.HourDatas.Select(u=>(double)u.OKRateModel.TotalNum).ToArray(),
- };
-
- var bars = plot.AddBarGroups(labels, serialNames, datas, null);
-
- for (int i = 0; i < 4; i++)
- {
- bars[i].ShowValuesAboveBars = true;
- //switch (i)
- //{
- // case 0:
- // bars[i].ValueFormatter = a => $"灏哄涓嶈壇: {a}";
- // break;
- // case 1:
- // bars[i].ValueFormatter = a => $"缂洪櫡涓嶈壇: {a}";
- // break;
- // case 2:
- // bars[i].ValueFormatter = a => $"OK: {a}";
- // break;
- // case 3:
- // bars[i].ValueFormatter = a => $"鎬绘暟: {a}";
- // break;
- //}
- }
-
- plot.Legend(true, Alignment.UpperRight);
- //plot.XTicks(labels);
- //plot.XLabel("鏃堕棿");
-
- var max = totalNums.Max();
- if (max == 0)
- {
- max = 50;
- }
- else
- {
- max *= 1.5;
- }
-
- plot.SetAxisLimitsY(0, max);
- plot.YLabel("浜у搧鏁伴噺");
-
- formsPlot.Refresh();
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.resx b/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.resx
deleted file mode 100644
index af32865..0000000
--- a/src/Bro.M141.Process/UI/FormStatisticInfo_ShiftSummary.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.Designer.cs b/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.Designer.cs
deleted file mode 100644
index 96ed3c9..0000000
--- a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.Designer.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-锘縩amespace Bro.M141.Process
-{
- partial class FrmDefectRectangleIndicatorEditor
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.splitContainer1 = new System.Windows.Forms.SplitContainer();
- this.btnClose = new Sunny.UI.UIButton();
- this.uiGroupBox2 = new Sunny.UI.UIGroupBox();
- this.colorPickDefectColor = new Sunny.UI.UIColorPicker();
- this.cboDefectName = new Sunny.UI.UIComboBox();
- this.uiLabel2 = new Sunny.UI.UILabel();
- this.uiLabel1 = new Sunny.UI.UILabel();
- this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
- this.btnNew = new Sunny.UI.UIButton();
- this.btnDelete = new Sunny.UI.UIButton();
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
- this.splitContainer1.Panel2.SuspendLayout();
- this.splitContainer1.SuspendLayout();
- this.uiGroupBox2.SuspendLayout();
- this.uiGroupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // splitContainer1
- //
- this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
- this.splitContainer1.Location = new System.Drawing.Point(0, 0);
- this.splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel2
- //
- this.splitContainer1.Panel2.Controls.Add(this.btnClose);
- this.splitContainer1.Panel2.Controls.Add(this.uiGroupBox2);
- this.splitContainer1.Panel2.Controls.Add(this.uiGroupBox1);
- this.splitContainer1.Size = new System.Drawing.Size(637, 409);
- this.splitContainer1.SplitterDistance = 405;
- this.splitContainer1.SplitterWidth = 5;
- this.splitContainer1.TabIndex = 0;
- //
- // btnClose
- //
- this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
- this.btnClose.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
- this.btnClose.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnClose.IsScaled = false;
- this.btnClose.Location = new System.Drawing.Point(126, 362);
- this.btnClose.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnClose.Name = "btnClose";
- this.btnClose.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
- this.btnClose.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
- this.btnClose.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
- this.btnClose.Size = new System.Drawing.Size(86, 34);
- this.btnClose.Style = Sunny.UI.UIStyle.Orange;
- this.btnClose.TabIndex = 1;
- this.btnClose.Text = "纭� 璁�";
- this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
- //
- // uiGroupBox2
- //
- this.uiGroupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.uiGroupBox2.Controls.Add(this.colorPickDefectColor);
- this.uiGroupBox2.Controls.Add(this.cboDefectName);
- this.uiGroupBox2.Controls.Add(this.uiLabel2);
- this.uiGroupBox2.Controls.Add(this.uiLabel1);
- this.uiGroupBox2.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiGroupBox2.IsScaled = false;
- this.uiGroupBox2.Location = new System.Drawing.Point(4, 92);
- this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1);
- this.uiGroupBox2.Name = "uiGroupBox2";
- this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
- this.uiGroupBox2.Size = new System.Drawing.Size(218, 262);
- this.uiGroupBox2.TabIndex = 0;
- this.uiGroupBox2.Text = "灞炴��";
- this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // colorPickDefectColor
- //
- this.colorPickDefectColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.colorPickDefectColor.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
- this.colorPickDefectColor.FillColor = System.Drawing.Color.White;
- this.colorPickDefectColor.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.colorPickDefectColor.IsScaled = false;
- this.colorPickDefectColor.Location = new System.Drawing.Point(16, 135);
- this.colorPickDefectColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.colorPickDefectColor.MinimumSize = new System.Drawing.Size(63, 0);
- this.colorPickDefectColor.Name = "colorPickDefectColor";
- this.colorPickDefectColor.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
- this.colorPickDefectColor.Size = new System.Drawing.Size(192, 29);
- this.colorPickDefectColor.TabIndex = 2;
- this.colorPickDefectColor.Text = "uiColorPicker1";
- this.colorPickDefectColor.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
- this.colorPickDefectColor.Value = System.Drawing.Color.Red;
- this.colorPickDefectColor.ValueChanged += new Sunny.UI.UIColorPicker.OnColorChanged(this.colorPickDefectColor_ValueChanged);
- //
- // cboDefectName
- //
- this.cboDefectName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.cboDefectName.DataSource = null;
- this.cboDefectName.FillColor = System.Drawing.Color.White;
- this.cboDefectName.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.cboDefectName.IsScaled = false;
- this.cboDefectName.Location = new System.Drawing.Point(16, 62);
- this.cboDefectName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.cboDefectName.MinimumSize = new System.Drawing.Size(63, 0);
- this.cboDefectName.Name = "cboDefectName";
- this.cboDefectName.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
- this.cboDefectName.Size = new System.Drawing.Size(192, 29);
- this.cboDefectName.TabIndex = 1;
- this.cboDefectName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiLabel2
- //
- this.uiLabel2.BackColor = System.Drawing.Color.Transparent;
- this.uiLabel2.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiLabel2.Location = new System.Drawing.Point(16, 107);
- this.uiLabel2.Name = "uiLabel2";
- this.uiLabel2.Size = new System.Drawing.Size(100, 23);
- this.uiLabel2.TabIndex = 0;
- this.uiLabel2.Text = "棰� 鑹�";
- this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiLabel1
- //
- this.uiLabel1.BackColor = System.Drawing.Color.Transparent;
- this.uiLabel1.Font = new System.Drawing.Font("寰蒋闆呴粦", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiLabel1.Location = new System.Drawing.Point(16, 34);
- this.uiLabel1.Name = "uiLabel1";
- this.uiLabel1.Size = new System.Drawing.Size(100, 23);
- this.uiLabel1.TabIndex = 0;
- this.uiLabel1.Text = "鍚� 绉�";
- this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // uiGroupBox1
- //
- this.uiGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.uiGroupBox1.Controls.Add(this.btnNew);
- this.uiGroupBox1.Controls.Add(this.btnDelete);
- this.uiGroupBox1.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.uiGroupBox1.IsScaled = false;
- this.uiGroupBox1.Location = new System.Drawing.Point(4, 5);
- this.uiGroupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.uiGroupBox1.MinimumSize = new System.Drawing.Size(1, 1);
- this.uiGroupBox1.Name = "uiGroupBox1";
- this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
- this.uiGroupBox1.Size = new System.Drawing.Size(218, 77);
- this.uiGroupBox1.TabIndex = 0;
- this.uiGroupBox1.Text = "鎿嶄綔";
- this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // btnNew
- //
- this.btnNew.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnNew.IsScaled = false;
- this.btnNew.Location = new System.Drawing.Point(14, 29);
- this.btnNew.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnNew.Name = "btnNew";
- this.btnNew.Size = new System.Drawing.Size(86, 34);
- this.btnNew.TabIndex = 1;
- this.btnNew.Text = "鏂� 寤�";
- this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
- //
- // btnDelete
- //
- this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnDelete.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
- this.btnDelete.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
- this.btnDelete.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.Font = new System.Drawing.Font("寰蒋闆呴粦", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.btnDelete.IsScaled = false;
- this.btnDelete.Location = new System.Drawing.Point(122, 29);
- this.btnDelete.MinimumSize = new System.Drawing.Size(1, 1);
- this.btnDelete.Name = "btnDelete";
- this.btnDelete.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
- this.btnDelete.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
- this.btnDelete.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
- this.btnDelete.Size = new System.Drawing.Size(86, 34);
- this.btnDelete.Style = Sunny.UI.UIStyle.Red;
- this.btnDelete.TabIndex = 1;
- this.btnDelete.Text = "鍒� 闄�";
- this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
- //
- // FrmDefectRectangleIndicatorEditor
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(637, 409);
- this.Controls.Add(this.splitContainer1);
- this.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.Name = "FrmDefectRectangleIndicatorEditor";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "妫�娴嬬己闄锋寚绀虹紪杈戠晫闈�";
- this.splitContainer1.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
- this.splitContainer1.ResumeLayout(false);
- this.uiGroupBox2.ResumeLayout(false);
- this.uiGroupBox1.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private SplitContainer splitContainer1;
- private Sunny.UI.UIButton btnClose;
- private Sunny.UI.UIGroupBox uiGroupBox2;
- private Sunny.UI.UIGroupBox uiGroupBox1;
- private Sunny.UI.UIButton btnNew;
- private Sunny.UI.UIButton btnDelete;
- private Sunny.UI.UIColorPicker colorPickDefectColor;
- private Sunny.UI.UIComboBox cboDefectName;
- private Sunny.UI.UILabel uiLabel2;
- private Sunny.UI.UILabel uiLabel1;
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.cs b/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.cs
deleted file mode 100644
index 4b46be0..0000000
--- a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-锘縰sing Autofac;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.UI.Model.Winform;
-using System.Data;
-
-namespace Bro.M141.Process
-{
- public partial class FrmDefectRectangleIndicatorEditor : Form
- {
- Canvas canvas = new Canvas();
- public FrmDefectRectangleIndicatorEditor()
- {
- InitializeComponent();
-
- canvas.Dock = DockStyle.Fill;
- splitContainer1.Panel1.Controls.Clear();
- splitContainer1.Panel1.Controls.Add(canvas);
-
- this.Load += FrmDefectRectangleIndicatorEditor_Load;
- }
-
- private void FrmDefectRectangleIndicatorEditor_Load(object? sender, EventArgs e)
- {
- try
- {
- using (var scope = GlobalVar.Container.BeginLifetimeScope())
- {
- var iConfig = scope.Resolve<IProcessConfig>();
- if (iConfig is M141Config config)
- {
- var defectList = config.GetDefectSwitch().Select(u => u.DefectName).ToList();
- defectList.AddRange(config.GetSpecList().Select(u => u.Code));
-
- cboDefectName.DataSource = defectList;
- if (cboDefectName.Items.Count > 0)
- {
- cboDefectName.SelectedIndex = 0;
- }
-
- cboDefectName.TextChanged += CboDefectName_TextChanged;
-
- if (!string.IsNullOrWhiteSpace(config.BackgroundImageFilePath))
- {
- Bitmap image = new Bitmap(config.BackgroundImageFilePath);
- if (image != null)
- {
- canvas.LoadImage(image);
- }
- }
-
- config.DefectIndicatorCollection.ForEach(d =>
- {
- ROI_Rectangle roi = new ROI_Rectangle();
- roi.Name = d.DefectName;
- roi.BaseColor = d.BaseColor;
- roi.DisplayRect = new RectangleF(d.DisplayRect.X, d.DisplayRect.Y, d.DisplayRect.Width, d.DisplayRect.Height);
-
- canvas.Elements.Add(roi);
- });
- }
- }
-
- canvas.OnElementChangedHandle += Canvas_OnElementChangedHandle;
- canvas.OnNewElementCreateDone = OnNewElementCreateDone;
- }
- catch (Exception ex)
- {
- }
- }
-
- private void Canvas_OnElementChangedHandle(IShapeElement obj)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- cboDefectName.Text = ele.Name;
- colorPickDefectColor.Value = (ele as ElementBase).BaseColor;
- }
- }
-
- private void CboDefectName_TextChanged(object? sender, EventArgs e)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- ele.Name = cboDefectName.Text;
- }
- }
-
- private void colorPickDefectColor_ValueChanged(object sender, Color value)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- (ele as ElementBase).BaseColor = colorPickDefectColor.Value;
- }
- }
-
- private void btnNew_Click(object sender, EventArgs e)
- {
- ROI_Rectangle roi = new ROI_Rectangle();
- roi.IsShowRemark = false;
- canvas.SetNewROIType(roi);
- }
-
- private bool OnNewElementCreateDone(Bitmap arg1, IShapeElement ele)
- {
- if (ele is ElementBase b)
- {
- b.Name = cboDefectName.Text;
- b.BaseColor = colorPickDefectColor.Value;
- b.IsShowRemark = true;
- }
-
- return true;
- }
-
- private void btnDelete_Click(object sender, EventArgs e)
- {
- var ele = canvas.Elements.FirstOrDefault(u => u.State == Bro.Common.Helper.EnumHelper.ElementState.Selected);
-
- if (ele != null)
- {
- canvas.Elements.Remove(ele);
- }
- }
-
- private void btnClose_Click(object sender, EventArgs e)
- {
- List<DefectRectangleIndicator> indicators = new List<DefectRectangleIndicator>();
- canvas.Elements.ToList().ForEach(u =>
- {
- if (u is ROI_Rectangle roi)
- {
- DefectRectangleIndicator indicator = new DefectRectangleIndicator()
- {
- DefectName = u.Name,
- BaseColor = roi.BaseColor,
- DisplayRect = new RectangleF(roi.DisplayRect.X, roi.DisplayRect.Y, roi.DisplayRect.Width, roi.DisplayRect.Height)
- };
-
- indicators.Add(indicator);
- }
- });
-
- using (var scope = GlobalVar.Container.BeginLifetimeScope())
- {
- var iConfig = scope.Resolve<IProcessConfig>();
- if (iConfig is M141Config config)
- {
- config.DefectIndicatorCollection = new List<DefectRectangleIndicator>(indicators);
- }
- }
-
- this.DialogResult = DialogResult.OK;
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.resx b/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.resx
deleted file mode 100644
index f298a7b..0000000
--- a/src/Bro.M141.Process/UI/FrmDefectRectangleIndicatorEditor.resx
+++ /dev/null
@@ -1,60 +0,0 @@
-锘�<root>
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmInspectionPoint.Designer.cs b/src/Bro.M141.Process/UI/FrmInspectionPoint.Designer.cs
deleted file mode 100644
index bdab1cb..0000000
--- a/src/Bro.M141.Process/UI/FrmInspectionPoint.Designer.cs
+++ /dev/null
@@ -1,416 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FrmInspectionPoint
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
- tableLayoutPanel1 = new TableLayoutPanel();
- dgvSpotDefects = new Sunny.UI.UIDataGridView();
- clPositionNum = new DataGridViewTextBoxColumn();
- Column8 = new DataGridViewTextBoxColumn();
- clDefect = new DataGridViewTextBoxColumn();
- Column1 = new DataGridViewTextBoxColumn();
- Column2 = new DataGridViewTextBoxColumn();
- Column3 = new DataGridViewTextBoxColumn();
- Column4 = new DataGridViewTextBoxColumn();
- Column5 = new DataGridViewTextBoxColumn();
- Column6 = new DataGridViewTextBoxColumn();
- Column7 = new DataGridViewTextBoxColumn();
- clDetectTime = new DataGridViewTextBoxColumn();
- plSpotResult = new DataGridViewTextBoxColumn();
- panel1 = new Panel();
- uiButton4 = new Sunny.UI.UIButton();
- uiButton3 = new Sunny.UI.UIButton();
- textBox1 = new TextBox();
- uiButton2 = new Sunny.UI.UIButton();
- lblLastInspection = new Label();
- uiButton1 = new Sunny.UI.UIButton();
- btnStart = new Sunny.UI.UIButton();
- plStatus = new Panel();
- pbStatus = new Sunny.UI.UIProcessBar();
- lblStatus = new Label();
- tableLayoutPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)dgvSpotDefects).BeginInit();
- panel1.SuspendLayout();
- plStatus.SuspendLayout();
- SuspendLayout();
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 1;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Controls.Add(dgvSpotDefects, 0, 2);
- tableLayoutPanel1.Controls.Add(panel1, 0, 0);
- tableLayoutPanel1.Controls.Add(plStatus, 0, 1);
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 3;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle());
- tableLayoutPanel1.RowStyles.Add(new RowStyle());
- tableLayoutPanel1.Size = new Size(1000, 503);
- tableLayoutPanel1.TabIndex = 0;
- //
- // dgvSpotDefects
- //
- dgvSpotDefects.AllowUserToAddRows = false;
- dgvSpotDefects.AllowUserToDeleteRows = false;
- dataGridViewCellStyle1.BackColor = Color.FromArgb(235, 243, 255);
- dgvSpotDefects.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
- dgvSpotDefects.BackgroundColor = Color.White;
- dgvSpotDefects.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
- dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle2.BackColor = Color.FromArgb(80, 160, 255);
- dataGridViewCellStyle2.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dataGridViewCellStyle2.ForeColor = Color.White;
- dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
- dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
- dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True;
- dgvSpotDefects.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
- dgvSpotDefects.ColumnHeadersHeight = 32;
- dgvSpotDefects.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
- dgvSpotDefects.Columns.AddRange(new DataGridViewColumn[] { clPositionNum, Column8, clDefect, Column1, Column2, Column3, Column4, Column5, Column6, Column7, clDetectTime, plSpotResult });
- dgvSpotDefects.Dock = DockStyle.Fill;
- dgvSpotDefects.EnableHeadersVisualStyles = false;
- dgvSpotDefects.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dgvSpotDefects.GridColor = Color.FromArgb(80, 160, 255);
- dgvSpotDefects.Location = new Point(3, 93);
- dgvSpotDefects.Name = "dgvSpotDefects";
- dgvSpotDefects.ReadOnly = true;
- dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle5.BackColor = Color.FromArgb(235, 243, 255);
- dataGridViewCellStyle5.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dataGridViewCellStyle5.ForeColor = Color.FromArgb(48, 48, 48);
- dataGridViewCellStyle5.SelectionBackColor = Color.FromArgb(80, 160, 255);
- dataGridViewCellStyle5.SelectionForeColor = Color.White;
- dataGridViewCellStyle5.WrapMode = DataGridViewTriState.True;
- dgvSpotDefects.RowHeadersDefaultCellStyle = dataGridViewCellStyle5;
- dgvSpotDefects.RowHeadersWidth = 51;
- dgvSpotDefects.RowHeight = 25;
- dataGridViewCellStyle6.BackColor = Color.White;
- dgvSpotDefects.RowsDefaultCellStyle = dataGridViewCellStyle6;
- dgvSpotDefects.RowTemplate.Height = 25;
- dgvSpotDefects.SelectedIndex = -1;
- dgvSpotDefects.ShowGridLine = true;
- dgvSpotDefects.Size = new Size(994, 407);
- dgvSpotDefects.TabIndex = 3;
- //
- // clPositionNum
- //
- clPositionNum.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- clPositionNum.DataPropertyName = "PositionNum";
- clPositionNum.HeaderText = "宸ヤ綅";
- clPositionNum.MinimumWidth = 6;
- clPositionNum.Name = "clPositionNum";
- clPositionNum.ReadOnly = true;
- //
- // Column8
- //
- Column8.DataPropertyName = "ProduceIndex";
- Column8.HeaderText = "浜у搧搴忓彿";
- Column8.Name = "Column8";
- Column8.ReadOnly = true;
- //
- // clDefect
- //
- clDefect.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- clDefect.DataPropertyName = "Code";
- dataGridViewCellStyle3.Format = "G";
- dataGridViewCellStyle3.NullValue = null;
- clDefect.DefaultCellStyle = dataGridViewCellStyle3;
- clDefect.HeaderText = "鐐规椤�";
- clDefect.MinimumWidth = 6;
- clDefect.Name = "clDefect";
- clDefect.ReadOnly = true;
- //
- // Column1
- //
- Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column1.DataPropertyName = "StandardValue";
- Column1.HeaderText = "鏍囧噯鍊�";
- Column1.MinimumWidth = 6;
- Column1.Name = "Column1";
- Column1.ReadOnly = true;
- //
- // Column2
- //
- Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column2.DataPropertyName = "MaxValue";
- Column2.HeaderText = "鏈�澶у��";
- Column2.MinimumWidth = 6;
- Column2.Name = "Column2";
- Column2.ReadOnly = true;
- //
- // Column3
- //
- Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column3.DataPropertyName = "MinValue";
- Column3.HeaderText = "鏈�灏忓��";
- Column3.MinimumWidth = 6;
- Column3.Name = "Column3";
- Column3.ReadOnly = true;
- //
- // Column4
- //
- Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column4.DataPropertyName = "InsertValue";
- Column4.HeaderText = "褰曞叆鍊�";
- Column4.MinimumWidth = 6;
- Column4.Name = "Column4";
- Column4.ReadOnly = true;
- //
- // Column5
- //
- Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column5.DataPropertyName = "TestValue";
- Column5.HeaderText = "娴嬮噺鍊�";
- Column5.MinimumWidth = 6;
- Column5.Name = "Column5";
- Column5.ReadOnly = true;
- //
- // Column6
- //
- Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column6.DataPropertyName = "Relevance";
- Column6.HeaderText = "鐩稿叧鎬�";
- Column6.MinimumWidth = 6;
- Column6.Name = "Column6";
- Column6.ReadOnly = true;
- //
- // Column7
- //
- Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- Column7.DataPropertyName = "Relevance2";
- Column7.HeaderText = "鐩稿叧鎬�%";
- Column7.MinimumWidth = 6;
- Column7.Name = "Column7";
- Column7.ReadOnly = true;
- //
- // clDetectTime
- //
- clDetectTime.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- clDetectTime.DataPropertyName = "CheckTime";
- dataGridViewCellStyle4.NullValue = null;
- clDetectTime.DefaultCellStyle = dataGridViewCellStyle4;
- clDetectTime.HeaderText = "妫�鍑烘椂闂�";
- clDetectTime.MinimumWidth = 6;
- clDetectTime.Name = "clDetectTime";
- clDetectTime.ReadOnly = true;
- //
- // plSpotResult
- //
- plSpotResult.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- plSpotResult.HeaderText = "缁撴灉";
- plSpotResult.MinimumWidth = 6;
- plSpotResult.Name = "plSpotResult";
- plSpotResult.ReadOnly = true;
- //
- // panel1
- //
- panel1.Controls.Add(uiButton4);
- panel1.Controls.Add(uiButton3);
- panel1.Controls.Add(textBox1);
- panel1.Controls.Add(uiButton2);
- panel1.Controls.Add(lblLastInspection);
- panel1.Controls.Add(uiButton1);
- panel1.Controls.Add(btnStart);
- panel1.Dock = DockStyle.Fill;
- panel1.Location = new Point(3, 3);
- panel1.Name = "panel1";
- panel1.Size = new Size(994, 39);
- panel1.TabIndex = 0;
- //
- // uiButton4
- //
- uiButton4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- uiButton4.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- uiButton4.IsScaled = false;
- uiButton4.Location = new Point(909, 1);
- uiButton4.MinimumSize = new Size(1, 1);
- uiButton4.Name = "uiButton4";
- uiButton4.Size = new Size(82, 35);
- uiButton4.TabIndex = 8;
- uiButton4.Text = "瀵煎嚭缁撴灉";
- uiButton4.Click += uiButton4_Click;
- //
- // uiButton3
- //
- uiButton3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- uiButton3.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- uiButton3.IsScaled = false;
- uiButton3.Location = new Point(744, 1);
- uiButton3.MinimumSize = new Size(1, 1);
- uiButton3.Name = "uiButton3";
- uiButton3.Size = new Size(71, 35);
- uiButton3.TabIndex = 7;
- uiButton3.Text = "鍒锋柊";
- uiButton3.Click += uiButton3_Click;
- //
- // textBox1
- //
- textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- textBox1.Location = new Point(417, 11);
- textBox1.Name = "textBox1";
- textBox1.ReadOnly = true;
- textBox1.Size = new Size(233, 21);
- textBox1.TabIndex = 6;
- //
- // uiButton2
- //
- uiButton2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- uiButton2.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- uiButton2.IsScaled = false;
- uiButton2.Location = new Point(821, 1);
- uiButton2.MinimumSize = new Size(1, 1);
- uiButton2.Name = "uiButton2";
- uiButton2.Size = new Size(82, 35);
- uiButton2.TabIndex = 5;
- uiButton2.Text = "瀵煎嚭妯℃澘";
- uiButton2.Click += uiButton2_Click;
- //
- // lblLastInspection
- //
- lblLastInspection.AutoSize = true;
- lblLastInspection.Font = new Font("Tahoma", 16F, FontStyle.Bold, GraphicsUnit.World);
- lblLastInspection.Location = new Point(119, 9);
- lblLastInspection.Name = "lblLastInspection";
- lblLastInspection.Size = new Size(59, 19);
- lblLastInspection.TabIndex = 4;
- lblLastInspection.Text = "label1";
- //
- // uiButton1
- //
- uiButton1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
- uiButton1.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- uiButton1.IsScaled = false;
- uiButton1.Location = new Point(656, 0);
- uiButton1.MinimumSize = new Size(1, 1);
- uiButton1.Name = "uiButton1";
- uiButton1.Size = new Size(82, 35);
- uiButton1.TabIndex = 3;
- uiButton1.Text = "瀵煎叆Excel";
- uiButton1.Click += uiButton1_Click;
- //
- // btnStart
- //
- btnStart.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- btnStart.IsScaled = false;
- btnStart.Location = new Point(13, 1);
- btnStart.MinimumSize = new Size(1, 1);
- btnStart.Name = "btnStart";
- btnStart.Size = new Size(100, 35);
- btnStart.TabIndex = 2;
- btnStart.Text = "鐐规寮�濮�";
- btnStart.Click += btnStart_Click;
- //
- // plStatus
- //
- plStatus.Controls.Add(pbStatus);
- plStatus.Controls.Add(lblStatus);
- plStatus.Dock = DockStyle.Fill;
- plStatus.Location = new Point(3, 48);
- plStatus.Name = "plStatus";
- plStatus.Size = new Size(994, 39);
- plStatus.TabIndex = 1;
- plStatus.Visible = false;
- //
- // pbStatus
- //
- pbStatus.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
- pbStatus.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- pbStatus.IsScaled = false;
- pbStatus.Location = new Point(119, 3);
- pbStatus.Maximum = 1000;
- pbStatus.MinimumSize = new Size(70, 3);
- pbStatus.Name = "pbStatus";
- pbStatus.Size = new Size(872, 29);
- pbStatus.TabIndex = 2;
- pbStatus.Text = "uiProcessBar1";
- //
- // lblStatus
- //
- lblStatus.AutoSize = true;
- lblStatus.Font = new Font("Tahoma", 16F, FontStyle.Italic, GraphicsUnit.World);
- lblStatus.Location = new Point(13, 8);
- lblStatus.Name = "lblStatus";
- lblStatus.Size = new Size(57, 19);
- lblStatus.TabIndex = 1;
- lblStatus.Text = "鐐规涓�";
- //
- // FrmInspectionPoint
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel1);
- Margin = new Padding(1, 2, 1, 2);
- Name = "FrmInspectionPoint";
- Size = new Size(1000, 503);
- tableLayoutPanel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)dgvSpotDefects).EndInit();
- panel1.ResumeLayout(false);
- panel1.PerformLayout();
- plStatus.ResumeLayout(false);
- plStatus.PerformLayout();
- ResumeLayout(false);
- }
-
- #endregion
-
- private TableLayoutPanel tableLayoutPanel1;
- private Panel panel1;
- private Sunny.UI.UIButton uiButton1;
- private Sunny.UI.UIButton btnStart;
- private Panel plStatus;
- private Sunny.UI.UIProcessBar pbStatus;
- private Label lblStatus;
- private Sunny.UI.UIDataGridView dgvSpotDefects;
- private Label lblLastInspection;
- private Sunny.UI.UIButton uiButton2;
- private TextBox textBox1;
- private DataGridViewTextBoxColumn clPositionNum;
- private DataGridViewTextBoxColumn Column8;
- private DataGridViewTextBoxColumn clDefect;
- private DataGridViewTextBoxColumn Column1;
- private DataGridViewTextBoxColumn Column2;
- private DataGridViewTextBoxColumn Column3;
- private DataGridViewTextBoxColumn Column4;
- private DataGridViewTextBoxColumn Column5;
- private DataGridViewTextBoxColumn Column6;
- private DataGridViewTextBoxColumn Column7;
- private DataGridViewTextBoxColumn clDetectTime;
- private DataGridViewTextBoxColumn plSpotResult;
- private Sunny.UI.UIButton uiButton3;
- private Sunny.UI.UIButton uiButton4;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmInspectionPoint.cs b/src/Bro.M141.Process/UI/FrmInspectionPoint.cs
deleted file mode 100644
index 7ca2b88..0000000
--- a/src/Bro.M141.Process/UI/FrmInspectionPoint.cs
+++ /dev/null
@@ -1,740 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M135.Common;
-using Bro.M135.DBManager;
-using Bro.M135.Process.UI;
-using Bro.UI.Model.Winform;
-using NPOI.HPSF;
-using NPOI.SS.Formula.Functions;
-using NPOI.SS.UserModel;
-using NPOI.XSSF.UserModel;
-using Org.BouncyCastle.Asn1.X509;
-using SourceGrid;
-using Sunny.UI;
-using Sunny.UI.Win32;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Configuration;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using static Bro.Common.Helper.EnumHelper;
-using static Org.BouncyCastle.Math.EC.ECCurve;
-
-namespace Bro.M141.Process.UI
-{
-
- //[MenuNode("鐐规鐣岄潰", "鐐规鐣岄潰", 4, TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmInspectionPoint : MenuFormBase
- {
- M141Process prM141Process => Process as M141Process;
- M141Config M141Config => Process.IConfig as M141Config;
-
- InspectionConfig InspectionConfig => prM141Process.InspectionConfig;
-
- List<DefectPositionSet> _spotCheckDatas = new List<DefectPositionSet>();
-
- const string STARTINSPECTION = "鐐规寮�濮�";
- const string ABORTINSPECTION = "鐐规鍙栨秷";
-
- public FrmInspectionPoint()
- {
- InitializeComponent();
- dgvSpotDefects.AutoGenerateColumns = false;
- dgvSpotDefects.CellFormatting += DgvSpotDefects_CellFormatting;
- dgvSpotDefects.DataError += DgvSpotDefects_DataError;
- }
-
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- this.Invoke(() =>
- {
- InitialSpotCheckDefects();
-
- if (prM141Process != null)
- {
- prM141Process.OnSinglePostionDetectResultUpdate -= UpdataProductDefectNamesList;
- prM141Process.OnSinglePostionDetectResultUpdate += UpdataProductDefectNamesList;
- }
- });
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (prM141Process != null)
- {
- prM141Process.OnSinglePostionDetectResultUpdate -= UpdataProductDefectNamesList;
- }
- }
-
- System.Threading.Timer _refreshSpotCheckTimer = null;
- object _defectUploadLock = new object();
- private async void UpdataProductDefectNamesList(string positioNum, P_PRODUCT_DETAIL detail, string produceid)
- {
- await Task.Run(() =>
- {
- lock (_defectUploadLock)
- {
- if (!IsInspecting)
- {
- return;
- }
-
- var ngSpecCode = new List<string>();
- Dictionary<string, string> codevalue = new Dictionary<string, string>();
-
- detail.SpecList.ToList().ForEach(s =>
- {
- codevalue[s.Code] = s.GetMeasureValueStr();
- if (s.MeasureResult != true)
- {
- ngSpecCode.Add(s.Code);
- }
- });
-
- detail.ResultList.ToList().SelectMany(u => u.Specs).ToList().ForEach(s =>
- {
- codevalue[s.Code] = s.GetMeasureValueStr(4);
- if (s.MeasureResult != true)
- {
- ngSpecCode.Add(s.Code);
- }
- });
- var defects = new List<string>(detail.DefectList);
- defects.AddRange(detail.ResultList.GetDefectDescList());
-
-
-
- var spotChecks = _spotCheckDatas.Where(u => u.ProduceIndex == produceid && u.PositionNum == positioNum && defects.Contains(u.Code) && !u.Ismeasure).ToList();
- if (spotChecks.Count > 0)
- {
- spotChecks.ForEach(s =>
- {
- s.CheckTime = DateTime.Now;
- s.result = true;
- });
- }
-
-
- foreach (var temv in codevalue)
- {
- try
- {
- var spotCheck = _spotCheckDatas.FirstOrDefault(u => u.ProduceIndex == produceid && u.PositionNum == positioNum && temv.Key == u.Code && u.Ismeasure);
- if (spotCheck != null)
- {
- spotCheck.TestValue = temv.Value;
-
- double Relevance = Convert.ToDouble(spotCheck.InsertValue) - Convert.ToDouble(spotCheck.TestValue);
- double help = Convert.ToDouble(spotCheck.MaxValue) - Convert.ToDouble(spotCheck.MinValue);
- double Relevance2 = (Math.Abs(Relevance) / help) * 100;
-
-
- if (help == 0|| Relevance==0)
- {
- spotCheck.result = true;
- Relevance2 = 0;
- }
- else if (InspectionConfig.Check >= Relevance2)
- {
- spotCheck.result = true;
- }
- else
- {
-
- spotCheck.result = false;
- try
- {
- string JiaDianJian = ConfigurationManager.AppSettings["JiaDianJian"];
- string JiaDianJianMax = ConfigurationManager.AppSettings["JiaDianJianMax"];
-
- if (string.IsNullOrEmpty(JiaDianJian) || string.IsNullOrEmpty(JiaDianJianMax) || JiaDianJian.ToUpper().Equals("FALSE"))
- {
- spotCheck.result = false;
- }
- else
- {
- int Check2 = Convert.ToInt32(JiaDianJianMax);
-
- if (Check2 >= Relevance2)
- {
- spotCheck.result = true;
- Random random = new Random();
- double randomDouble = random.NextDouble() / 10;
-
- spotCheck.TestValue = (Convert.ToDouble(spotCheck.InsertValue) * (1 + randomDouble)).ToString("F4");
-
- Relevance = Convert.ToDouble(spotCheck.InsertValue) * (randomDouble);
- Relevance2 = randomDouble;
- }
- }
- }
- catch
- {
- spotCheck.result = false;
- }
-
- }
-
-
- spotCheck.Relevance = Relevance.ToString("F4");
- spotCheck.Relevance2 = Relevance2.ToString("F2") + "%";
-
- spotCheck.CheckTime = DateTime.Now;
- //spotCheck.result = true;
-
-
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鐐规鏁版嵁寮傚父 {ex.ToString()}");
- }
- }
-
-
-
- if (_refreshSpotCheckTimer == null)
- {
- _refreshSpotCheckTimer = new System.Threading.Timer(RefreshSpotChecResult, null, -1, -1);
- }
- _refreshSpotCheckTimer.Change(500, -1);
-
- }
- });
- }
-
-
-
- private void RefreshSpotChecResult(object? state)
- {
- this.Invoke(() =>
- {
- pbStatus.Value = (int)(_spotCheckDatas.Count(u => u.CheckTime != null) * 1000.0 / _spotCheckDatas.Count);
-
- dgvSpotDefects.DataSource = null;
- dgvSpotDefects.DataSource = _spotCheckDatas;
- dgvSpotDefects.Refresh();
-
- if (_spotCheckDatas.All(u => u.CheckTime != null))
- {
-
- if (!_spotCheckDatas.All(u => u.result))
- {
- lblStatus.Text = "鐐规NG";
- return;
- }
-
- plStatus.Visible = true;
- lblStatus.Text = "鐐规瀹屾垚";
-
- DateTime dt = DateTime.Now;
- InspectionConfig.LastInspectTime = dt;
-
- prM141Process.IsInspectionDoing = IsInspecting = false;
-
-
-
- lblLastInspection.Text = $"鏈鐐规宸蹭簬{dt.ToString("yyyy-MM-dd HH:mm:ss")}瀹屾垚";
- lblLastInspection.BackColor = Color.Lime;
- prM141Process.FistStart = false;
- if (!prM141Process.SaveInspectionConfig(out string error))
- {
- MessageBox.Show($"鐐规璁板綍淇℃伅淇濆瓨澶辫触\r\n{error}");
- }
-
- prM141Process.CheckInspectionInPeriodicAsync();
- }
- });
- }
-
-
-
- private void DgvSpotDefects_DataError(object? sender, DataGridViewDataErrorEventArgs e)
- {
- }
-
- private void DgvSpotDefects_CellFormatting(object? sender, DataGridViewCellFormattingEventArgs e)
- {
- if (e.RowIndex >= 0 && e.ColumnIndex == 11)
- {
- if (dgvSpotDefects.Rows[e.RowIndex].DataBoundItem is DefectPositionSet chk)
- {
- if (chk.CheckTime != null)
- {
- if (chk.result)
- {
- e.Value = "OK";
- e.CellStyle.BackColor = Color.Lime;
- }
- else
- {
- e.Value = "NG";
- e.CellStyle.BackColor = Color.Red;
- }
- }
- else
- {
- e.Value = "NA";
- e.CellStyle.BackColor = Color.LightGray;
- }
- }
- }
- }
-
- private void InitialSpotCheckDefects()
- {
- lblLastInspection.Text = InspectionConfig.LastInspectTime == null ? "鏃犲巻鍙茬偣妫�璁板綍" : $"涓婃鐐规鏃堕棿锛歿InspectionConfig.LastInspectTime.Value.ToString("yyyy-MM-dd HH:mm:ss")}";
- lblLastInspection.BackColor = SystemColors.Control;
-
- //_spotCheckDatas = InspectionConfig.CheckDefectNames.Select(u => new DefectSpotCheck()
- //{
- // DefectName = u,
- // CheckTime = null,
- //}).ToList();
-
- _spotCheckDatas = new List<DefectPositionSet>(InspectionConfig.CheckDefectNames.OrderBy(u => u.PositionNum));
- _spotCheckDatas.ForEach(u => u.CheckTime = null);
-
- dgvSpotDefects.DataSource = null;
- dgvSpotDefects.DataSource = _spotCheckDatas;
- dgvSpotDefects.Refresh();
-
- if (!string.IsNullOrEmpty(InspectionConfig.Excelpath))
- {
- textBox1.Text = InspectionConfig.Excelpath;
- try
- {
- LoadExcel(textBox1.Text);
- }
- catch (Exception ee)
- {
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"{ee.ToString()}");
- }
- }
- }
-
-
-
- object _inspectionLock = new object();
- volatile bool isInspecting = false;
- public bool IsInspecting
- {
- get => isInspecting;
- set
- {
- if (isInspecting != value)
- {
- isInspecting = value;
-
- plStatus.Visible = IsInspecting;
-
- btnStart.Text = isInspecting ? ABORTINSPECTION : STARTINSPECTION;
- btnStart.Style = isInspecting ? Sunny.UI.UIStyle.Orange : Sunny.UI.UIStyle.Blue;
-
- if (isInspecting)
- {
- InitialSpotCheckDefects();
- }
- }
- }
- }
-
- private void btnStart_Click(object sender, EventArgs e)
- {
- lock (_inspectionLock)
- {
- IsInspecting = !IsInspecting;
-
- prM141Process.IsInspectionDoing = IsInspecting;
-
- if (IsInspecting)
- {
- lblStatus.Text = "鐐规杩涜涓�";
- pbStatus.Value = 0;
- }
- }
- }
-
- private void uiButton1_Click(object sender, EventArgs e)
- {
- try
- {
-
- using (OpenFileDialog openFileDialog = new OpenFileDialog())
- {
- openFileDialog.Title = "閫夋嫨鏂囦欢";
- openFileDialog.InitialDirectory = @"C:\";
- openFileDialog.Filter = "Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
-
- if (openFileDialog.ShowDialog() == DialogResult.OK)
- {
- // 灏嗛�夊畾鏂囦欢鐨勮矾寰勮缃埌鏂囨湰妗嗕腑
- textBox1.Text = openFileDialog.FileName;
- }
- else
- {
- return;
- }
- }
-
- if (!string.IsNullOrEmpty(textBox1.Text))
- {
- LoadExcel(textBox1.Text);
-
- InspectionConfig.Excelpath = textBox1.Text;
- prM141Process.SaveInspectionConfig(out string err);
- }
-
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鐐规Excel瀵煎叆澶辫触,鎻愪緵浠ヤ笅瑙e喅鏂规锛�1锛屽叧闂璄xcel鍚庨噸璇� 2锛屾鏌xcel璺緞 3锛屾鏌ユ暟鎹牸寮� 4锛屽鍑篍xcel妯℃澘閲嶆柊褰曞叆鏁版嵁 {ex.ToString()}");
- }
-
- }
-
-
- public void LoadExcel(string path)
- {
-
- //Dictionary<string, string> DicInsertValue = new Dictionary<string, string>();
-
- List<ExcelMould> ExcelMouldList = new List<ExcelMould>();
- using (var stream = File.OpenRead(path))
- {
- IWorkbook FileIWorkbook = WorkbookFactory.Create(stream);
- ISheet eISheet = FileIWorkbook.GetSheetAt(0);
-
- int rowCount = eISheet.LastRowNum;
- int fristrowindex = 1;
- IRow fristrow = eISheet.GetRow(fristrowindex);
-
- for (int i = 1; i <= rowCount; i++)
- {
- IRow Row = eISheet.GetRow(i);
-
- if (Row != null)
- {
- //DicInsertValue[Row.Cells[0].ToString() + "," + Row.Cells[1].ToString()] = Row.Cells[2].ToString();
- ExcelMouldList.Add(new ExcelMould()
- {
- Produceindex = Row.Cells[0].ToString(),
- code = Row.Cells[1].ToString(),
- value = Row.Cells[2].ToString(),
-
- });
-
- }
- }
- }
-
-
-
- _spotCheckDatas.RemoveAll(u => u.Ismeasure);
-
- foreach (var v in ExcelMouldList)
- {
- var tem = M141Config.SpecCollection.FirstOrDefault(u => u.Code == v.code);
-
- if (tem != null)
- {
-
- Dictionary<string, string> CodeAndPostion = GetCodeAndPostion();
-
- _spotCheckDatas.Add(new DefectPositionSet()
- {
- Ismeasure = true,
- Code = v.code,
- StandardValue = tem.StandardValue.ToString("F4"),
- MaxValue = (tem.StandardValue + tem.Tolrenance_Positive).ToString("F4"),
- MinValue = (tem.StandardValue - tem.Tolrenance_Negative).ToString("F4"),
- InsertValue = v.value,
- PositionNum = CodeAndPostion.ContainsKey(v.code) ? CodeAndPostion[v.code] : "",
- ProduceIndex = v.Produceindex
- });
-
- }
- else
- {
- _spotCheckDatas.Add(new DefectPositionSet()
- {
- Ismeasure = true,
- Code = v.code,
- InsertValue = v.value,
- ProduceIndex = v.Produceindex
- });
- }
- }
-
- _spotCheckDatas = _spotCheckDatas.OrderBy(x => x.PositionNum).ToList();
- dgvSpotDefects.DataSource = null;
- dgvSpotDefects.DataSource = _spotCheckDatas;
- dgvSpotDefects.Refresh();
-
-
- }
-
-
-
- public Dictionary<string, string> GetCodeAndPostion()
- {
- Dictionary<string, string> CodeAndPostion = new Dictionary<string, string>();
-
- for (int i = 0; i < M141Config.MeasureBindCollection.Count; i++)
- {
- string mon1 = M141Config.MeasureBindCollection[i].CustomizedMonitorId;
- string mon2 = M141Config.MeasureBindCollection[i].CustomizedCombineMethodId;
- string postion = M141Config.MeasureBindCollection[i].WorkPosition;
-
- if (!string.IsNullOrEmpty(mon1))
- {
- var monitorSet = M141Config.GetAllMonitorSet().FirstOrDefault(u => u.Id == mon1);
- if (monitorSet.OpConfig is IImageCheckOperationConfig iConfig)
- {
- if (iConfig.SpecCollection != null)
- {
- foreach (var v in iConfig.SpecCollection)
- {
- CodeAndPostion[v.SpecCode] = postion;
- }
- }
- }
- }
-
-
- if (!string.IsNullOrEmpty(mon2))
- {
- var monitorSet = M141Config.GetAllMonitorSet().FirstOrDefault(u => u.Id == mon2);
-
- if (monitorSet.OpConfig is IImageCheckOperationConfig iConfig)
- {
- if (iConfig.SpecCollection != null)
- {
- foreach (var v in iConfig.SpecCollection)
- {
- CodeAndPostion[v.SpecCode] = postion;
- }
- }
- }
- }
- }
-
-
-
- return CodeAndPostion;
- }
-
- private void uiButton2_Click(object sender, EventArgs e)
- {
- try
- {
- string path = "";
- using (SaveFileDialog saveFileDialog = new SaveFileDialog())
- {
- saveFileDialog.Filter = "Excel Files (*.xlsx)|*.xlsx|All Files (*.*)|*.*";
- saveFileDialog.FilterIndex = 1;
- saveFileDialog.FileName = "鐐规妯℃澘.xlsx";
- if (saveFileDialog.ShowDialog() == DialogResult.OK)
- {
- // 鑾峰彇閫夊畾鏂囦欢鐨勫畬鏁磋矾寰�
- path = saveFileDialog.FileName;
- }
- else
- {
- return;
- }
- }
-
-
- var dic = GetCodeAndPostion();
- List<string> allcode = dic.Select(u => u.Key).ToList();
- allcode.RemoveAll(u => !u.ToUpper().Contains("FAI"));
- allcode = allcode.OrderBy(u => u).ToList();
-
-
- ExportToExcelMould(new string[] { "浜у搧鍙�", "娴嬮噺椤�", "褰曞叆鍊�" }, allcode, path);
- }
- catch (Exception ex)
- {
-
- }
- }
-
- public void ExportToExcelMould(string[] headers, List<string> dic, string fileName)
- {
- IWorkbook workbook = new XSSFWorkbook(); // 鍒涘缓鏂扮殑Excel宸ヤ綔绨�
- ISheet sheet = workbook.CreateSheet("Sheet1"); // 鍒涘缓涓�涓伐浣滆〃
-
- // 鍒涘缓鏍囬琛�
- IRow headerRow = sheet.CreateRow(0);
- for (int i = 0; i < headers.Length; i++)
- {
- headerRow.CreateCell(i).SetCellValue(headers[i]);
- }
-
- // 濉厖鏁版嵁
- int rowIndex = 1;
- foreach (var rowData in dic)
- {
- IRow dataRow = sheet.CreateRow(rowIndex);
- dataRow.CreateCell(0).SetCellValue(1);
- dataRow.CreateCell(1).SetCellValue(rowData);
- //dataRow.CreateCell(2).SetCellValue("");
- //}
- rowIndex++;
- }
-
-
- foreach (var rowData in dic)
- {
- IRow dataRow = sheet.CreateRow(rowIndex);
- dataRow.CreateCell(0).SetCellValue(2);
- dataRow.CreateCell(1).SetCellValue(rowData);
- //dataRow.CreateCell(2).SetCellValue("");
- //}
- rowIndex++;
- }
-
-
- // 鍐欏叆鏂囦欢
- using (FileStream fileStream = new FileStream(fileName, FileMode.Create, FileAccess.Write))
- {
- workbook.Write(fileStream);
- }
-
- // 娓呯悊璧勬簮
- workbook.Close();
-
- }
-
- private void uiButton3_Click(object sender, EventArgs e)
- {
- if (IsInspecting)
- {
- MessageBox.Show("鐐规涓紝涓嶅彲鍒锋柊");
- }
- InitialSpotCheckDefects();
- }
-
- private void uiButton4_Click(object sender, EventArgs e)
- {
- try
- {
- string path = "";
- using (SaveFileDialog saveFileDialog = new SaveFileDialog())
- {
- saveFileDialog.Filter = "Excel Files (*.xlsx)|*.xlsx|All Files (*.*)|*.*";
- saveFileDialog.FilterIndex = 1;
- saveFileDialog.FileName = DateTime.Now.ToString("yyyyMMddHHmmss") + "鐐规缁撴灉路.xlsx";
- if (saveFileDialog.ShowDialog() == DialogResult.OK)
- {
- // 鑾峰彇閫夊畾鏂囦欢鐨勫畬鏁磋矾寰�
- path = saveFileDialog.FileName;
- }
- else
- {
- return;
- }
- }
-
-
- var dic = GetCodeAndPostion();
- List<string> allcode = dic.Select(u => u.Key).ToList();
- allcode.RemoveAll(u => !u.ToUpper().Contains("FAI"));
- allcode = allcode.OrderBy(u => u).ToList();
-
-
- ExportToExcelResult(new string[] { "宸ヤ綅", "浜у搧搴忓彿", "鐐规椤�", "鏍囧噯鍊�", "鏈�澶у��", "鏈�灏忓��", "褰曞叆鍊�", "娴嬮噺鍊�", "鐩稿叧鎬�", "鐩稿叧鎬�%", "妫�鍑烘椂闂�", "缁撴灉" }, path);
- }
- catch (Exception ex)
- {
-
- }
- }
-
- public void ExportToExcelResult(string[] headers, string fileName)
- {
- IWorkbook workbook = new XSSFWorkbook(); // 鍒涘缓鏂扮殑Excel宸ヤ綔绨�
- ISheet sheet = workbook.CreateSheet("Sheet1"); // 鍒涘缓涓�涓伐浣滆〃
-
- // 鍒涘缓鏍囬琛�
- IRow headerRow = sheet.CreateRow(0);
- for (int i = 0; i < headers.Length; i++)
- {
- headerRow.CreateCell(i).SetCellValue(headers[i]);
- }
-
- // 濉厖鏁版嵁
- int rowIndex = 1;
- foreach (var rowData in _spotCheckDatas)
- {
- IRow dataRow = sheet.CreateRow(rowIndex);
-
- dataRow.CreateCell(0).SetCellValue(rowData.PositionNum);
- dataRow.CreateCell(1).SetCellValue(rowData.ProduceIndex);
- dataRow.CreateCell(2).SetCellValue(rowData.Code);
- dataRow.CreateCell(3).SetCellValue(rowData.StandardValue);
- dataRow.CreateCell(4).SetCellValue(rowData.MaxValue);
- dataRow.CreateCell(5).SetCellValue(rowData.MinValue);
- dataRow.CreateCell(6).SetCellValue(rowData.InsertValue);
- dataRow.CreateCell(7).SetCellValue(rowData.TestValue);
- dataRow.CreateCell(8).SetCellValue(rowData.Relevance);
- dataRow.CreateCell(9).SetCellValue(rowData.Relevance2);
- dataRow.CreateCell(10).SetCellValue(rowData.CheckTime == null ? "" : rowData.CheckTime?.ToString("yyyy:MM:dd HH:mm:ss"));
- dataRow.CreateCell(11).SetCellValue(rowData.CheckTime == null ? "NA" : (rowData.result ? "OK" : "NG"));
-
- rowIndex++;
- }
-
-
- // 鍐欏叆鏂囦欢
- using (FileStream fileStream = new FileStream(fileName, FileMode.Create, FileAccess.Write))
- {
- workbook.Write(fileStream);
- }
-
- // 娓呯悊璧勬簮
- workbook.Close();
-
- }
-
-
-
-
-
-
-
-
-
-
-
- }
-
-
-
-
- public class ExcelMould
- {
- public string Produceindex { get; set; } = "";
- public string code { get; set; } = "";
- public string value { get; set; } = "";
- }
-
-
-
-
-
-
-}
diff --git a/src/Bro.M141.Process/UI/FrmInspectionPoint.resx b/src/Bro.M141.Process/UI/FrmInspectionPoint.resx
deleted file mode 100644
index ae46de8..0000000
--- a/src/Bro.M141.Process/UI/FrmInspectionPoint.resx
+++ /dev/null
@@ -1,156 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="clPositionNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="clDefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="clDetectTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="plSpotResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmPointLinec.Designer.cs b/src/Bro.M141.Process/UI/FrmPointLinec.Designer.cs
deleted file mode 100644
index d75a04d..0000000
--- a/src/Bro.M141.Process/UI/FrmPointLinec.Designer.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FrmPointLinec
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- formsPlot1 = new ScottPlot.FormsPlot();
- btnStart = new Sunny.UI.UIButton();
- comboBox1 = new ComboBox();
- comboBox2 = new ComboBox();
- label1 = new Label();
- label2 = new Label();
- comboBox3 = new ComboBox();
- SuspendLayout();
- //
- // formsPlot1
- //
- formsPlot1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
- formsPlot1.Location = new Point(0, 40);
- formsPlot1.Margin = new Padding(3, 2, 3, 2);
- formsPlot1.Name = "formsPlot1";
- formsPlot1.Size = new Size(849, 458);
- formsPlot1.TabIndex = 1;
- //
- // btnStart
- //
- btnStart.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- btnStart.IsScaled = false;
- btnStart.Location = new Point(51, 3);
- btnStart.MinimumSize = new Size(1, 1);
- btnStart.Name = "btnStart";
- btnStart.Size = new Size(81, 35);
- btnStart.TabIndex = 3;
- btnStart.Text = "鍒锋柊";
- //
- // comboBox1
- //
- comboBox1.FormattingEnabled = true;
- comboBox1.Location = new Point(188, 14);
- comboBox1.Name = "comboBox1";
- comboBox1.Size = new Size(84, 21);
- comboBox1.TabIndex = 4;
- //
- // comboBox2
- //
- comboBox2.FormattingEnabled = true;
- comboBox2.Items.AddRange(new object[] { "10", "20", "30", "40", "50", "60", "70", "80", "100", "150", "200", "250", "300", "350", "400", "450", "500" });
- comboBox2.Location = new Point(447, 14);
- comboBox2.Name = "comboBox2";
- comboBox2.Size = new Size(49, 21);
- comboBox2.TabIndex = 5;
- comboBox2.Text = "50";
- //
- // label1
- //
- label1.AutoSize = true;
- label1.Location = new Point(151, 17);
- label1.Name = "label1";
- label1.Size = new Size(31, 13);
- label1.TabIndex = 6;
- label1.Text = "鐐逛綅";
- //
- // label2
- //
- label2.AutoSize = true;
- label2.Location = new Point(376, 17);
- label2.Name = "label2";
- label2.Size = new Size(55, 13);
- label2.TabIndex = 7;
- label2.Text = "鏄剧ず涓暟";
- //
- // comboBox3
- //
- comboBox3.FormattingEnabled = true;
- comboBox3.Items.AddRange(new object[] { "X", "Y" });
- comboBox3.Location = new Point(278, 14);
- comboBox3.Name = "comboBox3";
- comboBox3.Size = new Size(46, 21);
- comboBox3.TabIndex = 8;
- comboBox3.Text = "X";
- //
- // FrmPointLinec
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(comboBox3);
- Controls.Add(label2);
- Controls.Add(label1);
- Controls.Add(comboBox2);
- Controls.Add(comboBox1);
- Controls.Add(btnStart);
- Controls.Add(formsPlot1);
- Name = "FrmPointLinec";
- Size = new Size(849, 498);
- ResumeLayout(false);
- PerformLayout();
- }
-
- #endregion
-
- private ScottPlot.FormsPlot formsPlot1;
- private Sunny.UI.UIButton btnStart;
- private ComboBox comboBox1;
- private ComboBox comboBox2;
- private Label label1;
- private Label label2;
- private ComboBox comboBox3;
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmPointLinec.cs b/src/Bro.M141.Process/UI/FrmPointLinec.cs
deleted file mode 100644
index be3086a..0000000
--- a/src/Bro.M141.Process/UI/FrmPointLinec.cs
+++ /dev/null
@@ -1,281 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.UI.Model.Winform;
-using MathNet.Numerics.Interpolation;
-using NPOI.SS.Formula.Functions;
-using ScottPlot;
-using ScottPlot.Drawing.Colormaps;
-using ScottPlot.Plottable;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using Windows.Networking.Proximity;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("鐐规暟鎹姌绾垮浘", "鐐规暟鎹姌绾垮浘", 7, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmPointLinec : MenuFormBase
- {
- M141Process prM141Process => Process as M141Process;
- M141Config M141Config => Process.IConfig as M141Config;
-
-
- public FrmPointLinec()
- {
- InitializeComponent();
-
- formsPlot1.MouseMove += formsPlot1_MouseMove;
- formsPlot1.MouseLeave += formsPlot1_MouseLeave;
- formsPlot1.MouseEnter += formsPlot1_MouseEnter;
- }
-
-
- List<string> codes = new List<string>();
- List<string> Points = new List<string>();
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
- //comboBox1.Text = M141Config.MeasurePointCollection.Count == 0 ? "" : M141Config.MeasurePointCollection[0].Name;
-
- Points = M141Config.MeasurePointCollection.Select(u => u.Name).ToList();
- codes = M141Config.GetSpecList().Select(u => u.Code).ToList();
- codes.RemoveAll(u => !u.ToUpper().Contains("FAI"));
- List<string> tem = new List<string>();
- tem.AddRange(Points);
- tem.AddRange(codes);
- tem = tem.OrderBy(u => u).ToList();
-
- comboBox1.Items.AddRange(tem.ToArray());
-
- comboBox1.Text = tem.Count == 0 ? "" : tem[0];
-
- comboBox1.TextChanged += comboBox1_TextChanged;
- comboBox2.TextChanged += comboBox1_TextChanged;
- comboBox3.TextChanged += comboBox1_TextChanged;
- btnStart.Click += comboBox1_TextChanged;
- prM141Process.PointRefresh += RefreshUI;
- RefreshUI();
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- if (prM141Process != null)
- {
- prM141Process.PointRefresh -= RefreshUI;
- }
- }
-
- Dictionary<int, double> dicPoint = new Dictionary<int, double>();
- public void RefreshUI()
- {
- //for (int s = 0; s < 500; s++)
- //{
- // Random random = new Random();
- // prM141Process.M141Pointlist.Add(new List<Pointdata>
- //{
- // new Pointdata()
- // {
- // Code="FAI3_B1",
- // ValueX=random.NextDouble()*14
- // },
- // new Pointdata()
- // {
- // Code="FAI3",
- // Value=random.NextDouble()*14,
- // Stand=5,
- // Max=15,
- // Min=0
- // }
- //});
-
- // prM141Process.M141Codelist.Add(new List<Pointdata>
- //{
- // new Pointdata()
- // {
- // Code="FAI3_B1",
- // ValueX=random.NextDouble()*14
- // },
- // new Pointdata()
- // {
- // Code="FAI 3",
- // Value=random.NextDouble()*14,
- // Stand=5,
- // Max=15,
- // Min=0
- // }
- //});
- //}
-
-
-
- dicPoint.Clear();
- if (prM141Process.M141Pointlist == null || prM141Process.M141Pointlist.Count == 0)
- {
- return;
- }
- int total = Convert.ToInt32(comboBox2.Text);
- string code = comboBox1.Text;
-
- List<double> dataX = new List<double>();
- List<double> dataY = new List<double>();
-
- double max = 0;
- double min = 0;
- double stand = 0;
- bool ispoint = Points.Contains(code);
-
-
- if (ispoint)
- {
- if (prM141Process.M141Pointlist.Count >= total)
- {
- for (int i = 0; i < total; i++)
- {
- var tem = prM141Process.M141Pointlist[prM141Process.M141Pointlist.Count - total + i].FirstOrDefault(u => u.Code == code);
- if (comboBox3.Text == "X")
- {
- dataY.Add(tem == null ? 0 : tem.ValueX);
- dicPoint[i + 1] = tem == null ? 0 : tem.ValueX;
- }
- else
- {
- dataY.Add(tem == null ? 0 : tem.ValueY);
- dicPoint[i + 1] = tem == null ? 0 : tem.ValueY;
- }
-
- dataX.Add(i + 1);
- }
- }
- else
- {
- for (int i = 0; i < prM141Process.M141Pointlist.Count; i++)
- {
- var tem = prM141Process.M141Pointlist[i].FirstOrDefault(u => u.Code == code);
- if (comboBox3.Text == "X")
- {
- dataY.Add(tem == null ? -999 : tem.ValueX);
- dicPoint[i + 1] = tem == null ? 0 : tem.ValueX;
- }
- else
- {
- dataY.Add(tem == null ? -999 : tem.ValueY);
- dicPoint[i + 1] = tem == null ? 0 : tem.ValueY;
- }
- dataX.Add(i + 1);
- }
- }
- }
- else
- {
- if (prM141Process.M141Codelist.Count >= total)
- {
- for (int i = 0; i < total; i++)
- {
- var tem = prM141Process.M141Codelist[prM141Process.M141Codelist.Count - total + i].FirstOrDefault(u => u.Code == code);
- max = (tem == null ? 0 : tem.Max);
- min = (tem == null ? 0 : tem.Min);
- stand = (tem == null ? 0 : tem.Stand);
- dataY.Add(tem == null ? 0 : tem.Value);
- dicPoint[i + 1] = tem == null ? 0 : tem.Value;
- dataX.Add(i + 1);
- }
- }
- else
- {
- for (int i = 0; i < prM141Process.M141Codelist.Count; i++)
- {
- var tem = prM141Process.M141Codelist[i].FirstOrDefault(u => u.Code == code);
- max = (tem == null ? 0 : tem.Max);
- min = (tem == null ? 0 : tem.Min);
- stand = (tem == null ? 0 : tem.Stand);
- dataY.Add(tem == null ? 0 : tem.Value);
- dicPoint[i + 1] = tem == null ? 0 : tem.Value;
- dataX.Add(i + 1);
- }
- }
- }
-
-
-
- this.Invoke(new Action(() =>
- {
- formsPlot1.Plot.Clear();
-
- // 娣诲姞鎶樼嚎鍥�
- if (!ispoint)
- {
- VSpan vspa =formsPlot1.Plot.AddVerticalSpan(min, max, Color.FromArgb(231, 244, 217));
- //vspa.BorderLineStyle = LineStyle.Solid;
- vspa.IsVisible = true;
-
- var hl = formsPlot1.Plot.AddHorizontalLine(stand);
- hl.LineColor = Color.Blue;
- hl.LineStyle = LineStyle.DashDot;
-
- hl.IsVisible = true;
- hl.Label = stand.ToString();
- }
-
- formsPlot1.Plot.AddScatter(dataX.ToArray(), dataY.ToArray());
- if (dataX.Count>0)
- {
- Crosshair1 = formsPlot1.Plot.AddCrosshair(dataX[0], dataY[0]);
- Crosshair1.VerticalLine.IsVisible = false;
- Crosshair1.HorizontalLine.IsVisible = false;
- }
- // 寮哄埗绔嬪嵆缁樺埗
- formsPlot1.Refresh();
- }));
- }
-
-
-
-
- private void comboBox1_TextChanged(object sender, EventArgs e)
- {
- RefreshUI();
- }
-
-
- Crosshair Crosshair1;
- private void formsPlot1_MouseMove(object sender, MouseEventArgs e)
- {
- if (Crosshair1 != null)
- {
- var mouseCoordinates = formsPlot1.GetMouseCoordinates(0, 0);
- Crosshair1.X = (int)mouseCoordinates.Item1;
- Crosshair1.Y = dicPoint.ContainsKey((int)mouseCoordinates.Item1) ? dicPoint[(int)mouseCoordinates.Item1] : 0;
- formsPlot1.Refresh(false, true);
- }
- }
-
- private void formsPlot1_MouseLeave(object sender, EventArgs e)
- {
- if (Crosshair1 != null)
- {
- Crosshair1.VerticalLine.IsVisible = false;
- Crosshair1.HorizontalLine.IsVisible = false;
- formsPlot1.Refresh(false, false);
- }
- }
-
- private void formsPlot1_MouseEnter(object sender, EventArgs e)
- {
- if (Crosshair1 != null)
- {
- Crosshair1.VerticalLine.IsVisible = true;
- Crosshair1.HorizontalLine.IsVisible = true;
- formsPlot1.Refresh(false, false);
- }
- }
-
-
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmPointLinec.resx b/src/Bro.M141.Process/UI/FrmPointLinec.resx
deleted file mode 100644
index 8b2ff64..0000000
--- a/src/Bro.M141.Process/UI/FrmPointLinec.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductList.Designer.cs b/src/Bro.M141.Process/UI/FrmProductList.Designer.cs
deleted file mode 100644
index 452d6e3..0000000
--- a/src/Bro.M141.Process/UI/FrmProductList.Designer.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FrmProductList
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- tableLayoutPanel1_ProductListDisplay = new TableLayoutPanel();
- button1_ClearProductDisplayList = new Button();
- checkBox1_IsAutoRefresh = new CheckBox();
- dataGridView1_ProductDisplayList = new DataGridView();
- timerRefresh = new System.Windows.Forms.Timer(components);
- tableLayoutPanel1_ProductListDisplay.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)dataGridView1_ProductDisplayList).BeginInit();
- SuspendLayout();
- //
- // tableLayoutPanel1_ProductListDisplay
- //
- tableLayoutPanel1_ProductListDisplay.ColumnCount = 2;
- tableLayoutPanel1_ProductListDisplay.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1_ProductListDisplay.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1_ProductListDisplay.Controls.Add(button1_ClearProductDisplayList, 0, 0);
- tableLayoutPanel1_ProductListDisplay.Controls.Add(checkBox1_IsAutoRefresh, 1, 0);
- tableLayoutPanel1_ProductListDisplay.Controls.Add(dataGridView1_ProductDisplayList, 0, 1);
- tableLayoutPanel1_ProductListDisplay.Dock = DockStyle.Fill;
- tableLayoutPanel1_ProductListDisplay.Location = new Point(0, 0);
- tableLayoutPanel1_ProductListDisplay.Name = "tableLayoutPanel1_ProductListDisplay";
- tableLayoutPanel1_ProductListDisplay.RowCount = 2;
- tableLayoutPanel1_ProductListDisplay.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
- tableLayoutPanel1_ProductListDisplay.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tableLayoutPanel1_ProductListDisplay.Size = new Size(800, 450);
- tableLayoutPanel1_ProductListDisplay.TabIndex = 0;
- //
- // button1_ClearProductDisplayList
- //
- button1_ClearProductDisplayList.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
- button1_ClearProductDisplayList.BackColor = Color.FromArgb(255, 128, 0);
- button1_ClearProductDisplayList.Cursor = Cursors.Hand;
- button1_ClearProductDisplayList.FlatAppearance.BorderSize = 0;
- button1_ClearProductDisplayList.FlatStyle = FlatStyle.Flat;
- button1_ClearProductDisplayList.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point);
- button1_ClearProductDisplayList.ForeColor = SystemColors.Control;
- button1_ClearProductDisplayList.Location = new Point(3, 3);
- button1_ClearProductDisplayList.Name = "button1_ClearProductDisplayList";
- button1_ClearProductDisplayList.Size = new Size(84, 24);
- button1_ClearProductDisplayList.TabIndex = 0;
- button1_ClearProductDisplayList.Text = "娓呯┖";
- button1_ClearProductDisplayList.UseVisualStyleBackColor = false;
- button1_ClearProductDisplayList.Click += button1_ClearProductDisplayList_Click;
- //
- // checkBox1_IsAutoRefresh
- //
- checkBox1_IsAutoRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
- checkBox1_IsAutoRefresh.AutoSize = true;
- checkBox1_IsAutoRefresh.FlatStyle = FlatStyle.Flat;
- checkBox1_IsAutoRefresh.Font = new Font("Tahoma", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
- checkBox1_IsAutoRefresh.Location = new Point(712, 5);
- checkBox1_IsAutoRefresh.Margin = new Padding(5);
- checkBox1_IsAutoRefresh.Name = "checkBox1_IsAutoRefresh";
- checkBox1_IsAutoRefresh.Size = new Size(83, 20);
- checkBox1_IsAutoRefresh.TabIndex = 1;
- checkBox1_IsAutoRefresh.Text = "鑷姩鍒锋柊";
- checkBox1_IsAutoRefresh.UseVisualStyleBackColor = true;
- //
- // dataGridView1_ProductDisplayList
- //
- dataGridView1_ProductDisplayList.AllowUserToAddRows = false;
- dataGridView1_ProductDisplayList.AllowUserToDeleteRows = false;
- dataGridView1_ProductDisplayList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
- dataGridView1_ProductDisplayList.BackgroundColor = Color.FromArgb(192, 192, 255);
- dataGridView1_ProductDisplayList.BorderStyle = BorderStyle.None;
- dataGridView1_ProductDisplayList.CellBorderStyle = DataGridViewCellBorderStyle.Raised;
- dataGridView1_ProductDisplayList.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- tableLayoutPanel1_ProductListDisplay.SetColumnSpan(dataGridView1_ProductDisplayList, 2);
- dataGridView1_ProductDisplayList.Dock = DockStyle.Fill;
- dataGridView1_ProductDisplayList.Location = new Point(3, 33);
- dataGridView1_ProductDisplayList.Name = "dataGridView1_ProductDisplayList";
- dataGridView1_ProductDisplayList.ReadOnly = true;
- dataGridView1_ProductDisplayList.RowTemplate.Height = 25;
- dataGridView1_ProductDisplayList.Size = new Size(794, 414);
- dataGridView1_ProductDisplayList.TabIndex = 2;
- //
- // timerRefresh
- //
- timerRefresh.Interval = 1000;
- //
- // FrmProductList
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel1_ProductListDisplay);
- Name = "FrmProductList";
- Size = new Size(800, 450);
- tableLayoutPanel1_ProductListDisplay.ResumeLayout(false);
- tableLayoutPanel1_ProductListDisplay.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)dataGridView1_ProductDisplayList).EndInit();
- ResumeLayout(false);
- }
-
- #endregion
-
- private TableLayoutPanel tableLayoutPanel1_ProductListDisplay;
- private Button button1_ClearProductDisplayList;
- private CheckBox checkBox1_IsAutoRefresh;
- private DataGridView dataGridView1_ProductDisplayList;
- private System.Windows.Forms.Timer timerRefresh;
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductList.cs b/src/Bro.M141.Process/UI/FrmProductList.cs
deleted file mode 100644
index f1f6f03..0000000
--- a/src/Bro.M141.Process/UI/FrmProductList.cs
+++ /dev/null
@@ -1,249 +0,0 @@
-锘縰sing Autofac;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M135.Common;
-using Bro.Process;
-using Bro.UI.Model.Winform;
-using System.Data;
-using Bro.M141.Process;
-using Windows.Gaming.Input;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("ProductList", "浜у搧鍒楄〃", 2, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmProductList : MenuFormBase
- {
- M141Process M141Process => Process as M141Process;
- M141Config M141Config => Process.IConfig as M141Config;
-
- bool IsSetTableHead = true;
- List<string> InitializeDataText = new List<string>();
- List<string> HeadText = new List<string>();
- List<List<string>> DataText = new List<List<string>>();
-
-
- List<ProductModel> DisplayProductList = new List<ProductModel>();
-
-
- public FrmProductList()
- {
- InitializeComponent();
- dataGridView1_ProductDisplayList.AutoGenerateColumns = false;
-
- this.Load += (s, e) =>
- {
- checkBox1_IsAutoRefresh.Checked = true;
- checkBox1_IsAutoRefresh.CheckedChanged -= AutoRefresh_ProductDisplayList;
- checkBox1_IsAutoRefresh.CheckedChanged += AutoRefresh_ProductDisplayList;
-
- timerRefresh.Enabled = true;
- timerRefresh.Interval = 1000;
- timerRefresh.Tick -= timerRefresh_Tick;
- timerRefresh.Tick += timerRefresh_Tick;
- };
- }
-
- protected override void Dispose(bool disposing)
- {
- if (M141Process != null)
- {
- M141Process.OnNewProductEnqueued -= Process_OnNewProductEnqueued;
- M141Process.OnProductDequeued -= Process_OnProductDequeued;
- }
-
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- //鍒濆鍖栬〃澶�
- InitialTableHead();
-
- M141Process.OnNewProductEnqueued -= Process_OnNewProductEnqueued;
- M141Process.OnProductDequeued -= Process_OnProductDequeued;
- M141Process.OnNewProductEnqueued += Process_OnNewProductEnqueued;
- M141Process.OnProductDequeued += Process_OnProductDequeued;
- }
-
- private void button1_ClearProductDisplayList_Click(object sender, EventArgs e)
- {
- IsSetTableHead = false;
- DisplayProductList.Clear();
- DataText.Clear();
- RefreshProductView();
- }
-
- //鍒濆鍖栬〃鏍�
- #region 鍒濆鍖朌ataGridView琛ㄦ牸
- public void InitialTableHead()
- {
- //鏍规嵁鍐呭鑷姩璋冭妭鎵�鏈夊崟鍏冩牸鐨勮鐨勯珮搴�
- //dataGridView1_ProductDisplayList.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
-
- //鑾峰彇鏍囧噯妫�娴嬮」鍜孧L妫�娴嬮」
- var specCollection = (((GlobalVar.Container.BeginLifetimeScope()).Resolve<IProcessConfig>()) as ProcessConfigBase).SpecCollection;
-
- //璁$畻鎵�鏈夋娴嬮」鐨勬暟閲忥紝纭畾琛ㄦ牸鍒楁暟
- int num_SpecCollection = specCollection.Count();
- //娣诲姞鍒�
- for (int i = 0; i < num_SpecCollection + 4; i++)
- {
- InitializeDataText.Add("-");
- }
- //纭畾琛ㄥご骞舵坊鍔�
- HeadText.Add("PID");
- HeadText.Add("SN");
- HeadText.Add("Result");
- //娣诲姞缃戠粶妫�娴嬮」鍚嶇О
- HeadText.Add("NetResults");
- //娣诲姞鏍囧噯妫�娴嬮」鐨勫悕绉�
- foreach (var item in specCollection)
- {
- HeadText.Add(item.Code);
- }
-
- RefreshProductView();
- }
- #endregion
-
- //璁剧疆鏄惁鑷姩鍒锋柊琛ㄦ牸
- public void AutoRefresh_ProductDisplayList(object? sender, EventArgs e)
- {
- timerRefresh.Enabled = checkBox1_IsAutoRefresh.Checked;
- }
-
- //鍔犲叆鏂扮殑浜у搧鏁版嵁
- private async void Process_OnNewProductEnqueued(ProductModel pRecord)
- {
- await Task.Run(() =>
- {
- lock (_dataViewLock)
- {
- DisplayProductList.Insert(0, pRecord);
-
- //绛涢�夋娴嬮」
- List<string> tempDataString = new List<string>(InitializeDataText);
- var specsList = (pRecord.Details.SelectMany(p => p.ResultList).ToList()).SelectMany(d => d.Specs).ToList();
- var defects = string.Join(",", (pRecord.Details.SelectMany(p => p.ResultList.SelectMany(r => r.NetResults.SelectMany(n => n.DetectDetails.Select(t => t.ClassName))).Distinct().SkipWhile(u => string.Equals(u, "ok", StringComparison.OrdinalIgnoreCase)))));
-
- tempDataString[0] = pRecord.PID;
- tempDataString[1] = pRecord.SN;
- tempDataString[2] = pRecord.Result;
- tempDataString[3] = defects;
- for (int i = 4; i < HeadText.Count(); i++)
- {
- //tempDataString[i] = specsList.FirstOrDefault(s => s.Code == HeadText[i] ? s.ActualValue.ToString() : "-");
-
- tempDataString[i] = specsList.FirstOrDefault(s => s.Code == HeadText[i])?.GetMeasureValueStr() ?? "-";
- }
-
- DataText.Insert(0, tempDataString);
- }
- });
- }
-
- //濡傛灉褰撳墠浜у搧宸插瓨鍦紝鏇存柊鏁版嵁骞跺嚭闃熸搷浣�
- private void Process_OnProductDequeued(ProductModel pRecord)
- {
- lock (_dataViewLock)
- {
- var p = DisplayProductList.FirstOrDefault(u => u.PID == pRecord.PID);
- if (p != null)
- {
- int index = DisplayProductList.IndexOf(p);
- DisplayProductList[index] = pRecord;
-
- //绛涢�夋娴嬮」
- var tempDataString = InitializeDataText;
- var specsList = (pRecord.Details.SelectMany(p => p.ResultList).ToList()).SelectMany(d => d.Specs).ToList();
- var defects = string.Join(",", (pRecord.Details.SelectMany(p => p.ResultList.SelectMany(r => r.NetResults.SelectMany(n => n.DetectDetails.Select(t => t.ClassName))).Distinct().SkipWhile(u => string.Equals(u, "ok", StringComparison.OrdinalIgnoreCase)))));
-
- tempDataString[0] = pRecord.PID;
- tempDataString[1] = pRecord.SN;
- tempDataString[2] = pRecord.Result;
- tempDataString[3] = defects;
- for (int i = 4; i < HeadText.Count(); i++)
- {
- //tempDataString[i] = specsList.FirstOrDefault(s => s.Code == HeadText[i] ? s.ActualValue.ToString() : "-");
-
- tempDataString[i] = specsList.FirstOrDefault(s => s.Code == HeadText[i])?.GetMeasureValueStr() ?? "-";
- }
-
- DataText[index] = tempDataString;
- }
- }
- }
-
- //鏃堕棿鍒锋柊
- private void timerRefresh_Tick(object sender, EventArgs e)
- {
- timerRefresh.Interval = M141Config.DataViewRefreshTime;
- timerRefresh.Enabled = false;
- this.Invoke(() =>
- {
- RefreshProductView();
- });
-
- timerRefresh.Enabled = true;
- }
-
- //鍒锋柊鏁版嵁锛堝皢鏀堕泦鐨勬暟鎹樉绀哄埌鐣岄潰琛ㄦ牸涓級
- static object _dataViewLock = new object();
- private void RefreshProductView()
- {
- lock (_dataViewLock)
- {
- DataText = DataText.Take(M141Config.DataViewCount).ToList();
- }
- this.Invoke(() =>
- {
- //鎸夎鍒锋柊鏄剧ず
- if (M141Config.RefreshModeSelect == RefreshMode.琛�)
- {
- //娣诲姞鍒楋紝骞跺姞鍏ュ垪澶�
- if (IsSetTableHead)
- {
- int countColumn = 0;
- HeadText.ForEach(h =>
- {
- dataGridView1_ProductDisplayList.Columns.Add(new DataGridViewTextBoxColumn());
- dataGridView1_ProductDisplayList.Columns[countColumn].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
- dataGridView1_ProductDisplayList.Columns[countColumn++].HeaderText = h;
- });
-
- IsSetTableHead = false;
- }
-
- //娣诲姞琛�
- dataGridView1_ProductDisplayList.Rows.Clear();
- if (DataText.Count() != 0)
- {
- int countRow = 0;
- DataText.ForEach(d1 =>
- {
- int countColumn = 0;
- dataGridView1_ProductDisplayList.Rows.Add();
- d1.ForEach(d2 =>
- {
- dataGridView1_ProductDisplayList.Rows[countRow].Cells[countColumn++].Value = d2;
- });
- countRow++;
- });
- }
- }
- //鎸夊垪鍒锋柊鏄剧ず
- else
- {
-
- }
- });
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmProductList.resx b/src/Bro.M141.Process/UI/FrmProductList.resx
deleted file mode 100644
index 5e98c62..0000000
--- a/src/Bro.M141.Process/UI/FrmProductList.resx
+++ /dev/null
@@ -1,123 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="timerRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductSpec.Designer.cs b/src/Bro.M141.Process/UI/FrmProductSpec.Designer.cs
deleted file mode 100644
index 7a50210..0000000
--- a/src/Bro.M141.Process/UI/FrmProductSpec.Designer.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-锘縩amespace Bro.M141.Process.UI
-{
- partial class FrmProductSpec
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
- DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
- dgvProductSpecs = new Sunny.UI.UIDataGridView();
- colPID = new DataGridViewTextBoxColumn();
- colBarcode = new DataGridViewTextBoxColumn();
- chkAutoRefresh = new Sunny.UI.UICheckBox();
- ((System.ComponentModel.ISupportInitialize)dgvProductSpecs).BeginInit();
- SuspendLayout();
- //
- // dgvProductSpecs
- //
- dataGridViewCellStyle1.BackColor = Color.White;
- dgvProductSpecs.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
- dgvProductSpecs.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
- dgvProductSpecs.BackgroundColor = SystemColors.Control;
- dgvProductSpecs.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
- dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle2.BackColor = Color.FromArgb(216, 219, 227);
- dataGridViewCellStyle2.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dataGridViewCellStyle2.ForeColor = Color.FromArgb(96, 98, 102);
- dataGridViewCellStyle2.SelectionBackColor = Color.FromArgb(216, 219, 227);
- dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
- dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True;
- dgvProductSpecs.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
- dgvProductSpecs.ColumnHeadersHeight = 32;
- dgvProductSpecs.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
- dgvProductSpecs.Columns.AddRange(new DataGridViewColumn[] { colPID, colBarcode });
- dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle3.BackColor = SystemColors.Window;
- dataGridViewCellStyle3.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dataGridViewCellStyle3.ForeColor = SystemColors.ControlText;
- dataGridViewCellStyle3.SelectionBackColor = Color.FromArgb(155, 200, 255);
- dataGridViewCellStyle3.SelectionForeColor = Color.FromArgb(48, 48, 48);
- dataGridViewCellStyle3.WrapMode = DataGridViewTriState.False;
- dgvProductSpecs.DefaultCellStyle = dataGridViewCellStyle3;
- dgvProductSpecs.EnableHeadersVisualStyles = false;
- dgvProductSpecs.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dgvProductSpecs.GridColor = Color.FromArgb(216, 219, 227);
- dgvProductSpecs.Location = new Point(0, 56);
- dgvProductSpecs.Name = "dgvProductSpecs";
- dgvProductSpecs.RectColor = Color.FromArgb(216, 219, 227);
- dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle4.BackColor = Color.White;
- dataGridViewCellStyle4.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- dataGridViewCellStyle4.ForeColor = Color.FromArgb(48, 48, 48);
- dataGridViewCellStyle4.SelectionBackColor = Color.FromArgb(216, 219, 227);
- dataGridViewCellStyle4.SelectionForeColor = Color.White;
- dataGridViewCellStyle4.WrapMode = DataGridViewTriState.True;
- dgvProductSpecs.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
- dgvProductSpecs.RowHeadersWidth = 51;
- dataGridViewCellStyle5.BackColor = Color.White;
- dgvProductSpecs.RowsDefaultCellStyle = dataGridViewCellStyle5;
- dgvProductSpecs.RowTemplate.Height = 23;
- dgvProductSpecs.SelectedIndex = -1;
- dgvProductSpecs.ShowGridLine = true;
- dgvProductSpecs.Size = new Size(848, 394);
- dgvProductSpecs.StripeOddColor = Color.White;
- dgvProductSpecs.Style = Sunny.UI.UIStyle.White;
- dgvProductSpecs.TabIndex = 0;
- //
- // colPID
- //
- colPID.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
- colPID.DataPropertyName = "PID";
- colPID.HeaderText = "浜у搧ID";
- colPID.MinimumWidth = 6;
- colPID.Name = "colPID";
- colPID.Width = 101;
- //
- // colBarcode
- //
- colBarcode.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
- colBarcode.DataPropertyName = "SN";
- colBarcode.HeaderText = "浜у搧鏉$爜";
- colBarcode.MinimumWidth = 6;
- colBarcode.Name = "colBarcode";
- colBarcode.Width = 120;
- //
- // chkAutoRefresh
- //
- chkAutoRefresh.Checked = true;
- chkAutoRefresh.Font = new Font("寰蒋闆呴粦", 12F, FontStyle.Regular, GraphicsUnit.Point);
- chkAutoRefresh.IsScaled = false;
- chkAutoRefresh.Location = new Point(3, 8);
- chkAutoRefresh.MinimumSize = new Size(1, 1);
- chkAutoRefresh.Name = "chkAutoRefresh";
- chkAutoRefresh.Padding = new Padding(22, 0, 0, 0);
- chkAutoRefresh.Size = new Size(160, 39);
- chkAutoRefresh.TabIndex = 2;
- chkAutoRefresh.Text = "鑷姩鍒锋柊";
- //
- // FrmProductSpec
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(chkAutoRefresh);
- Controls.Add(dgvProductSpecs);
- Name = "FrmProductSpec";
- Size = new Size(854, 450);
- ((System.ComponentModel.ISupportInitialize)dgvProductSpecs).EndInit();
- ResumeLayout(false);
- }
-
- #endregion
-
- private Sunny.UI.UIDataGridView dgvProductSpecs;
- private Sunny.UI.UICheckBox chkAutoRefresh;
- private DataGridViewTextBoxColumn colPID;
- private DataGridViewTextBoxColumn colBarcode;
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductSpec.cs b/src/Bro.M141.Process/UI/FrmProductSpec.cs
deleted file mode 100644
index 414a1a5..0000000
--- a/src/Bro.M141.Process/UI/FrmProductSpec.cs
+++ /dev/null
@@ -1,237 +0,0 @@
-锘縰sing Autofac;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M135.Common;
-using Bro.M135.DBManager;
-using Bro.UI.Model.Winform;
-using Sunny.UI;
-using System.Data;
-
-namespace Bro.M141.Process.UI
-{
- //[MenuNode("浜у搧妫�娴嬭褰�", "浜у搧妫�娴嬭褰�", 3, Bro.Common.Helper.EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmProductSpec : MenuFormBase
- {
- M141Process Process_M141 => Process as M141Process;
- M141Config Config_M141 => Process.IConfig as M141Config;
-
- public FrmProductSpec()
- {
- InitializeComponent();
- dgvProductSpecs.AutoGenerateColumns = false;
- dgvProductSpecs.AllowUserToAddRows = false;
- dgvProductSpecs.AllowUserToDeleteRows = false;
- dgvProductSpecs.RowHeadersVisible = false;
- dgvProductSpecs.ShowEditingIcon = false;
-
- this.Load += (s, e) =>
- {
- chkAutoRefresh.Checked = true;
- };
- }
-
- List<ISpec> _defineSpecs = new List<ISpec>();
- public override void OnProcessUpdated()
- {
- base.OnProcessUpdated();
-
- dgvProductSpecs.Columns.Clear();
-
- var specList = new List<ISpec>
- {
- new Spec { Code = "NO"},
- new Spec { Code = "PID"},
- new Spec { Code = "SN" }
- };
-
- // 浠� 妫�娴嬫爣鍑嗛泦鍚� 涓幏鍙� 缂洪櫡鍒楄〃
- //var temps = Config_M084.SpecCollection.Where(x => x.IsEnabled).Select(x => x as Spec);
- using (var scope = GlobalVar.Container.BeginLifetimeScope())
- {
- var config = scope.Resolve<IProcessConfig>();
- if (config is ISpecCollector sc)
- {
- _defineSpecs = sc.GetSpecList();
- }
- }
-
- if (_defineSpecs.Any())
- {
- specList.AddRange(_defineSpecs.OrderBy(x => x.Code));
- }
-
- specList.ForEach(x =>
- {
- var col = new DataGridViewColumn(new DataGridViewTextBoxCell())
- {
- HeaderText = x.Code,
- Name = x.Code,
- AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,
- MinimumWidth = x.Code == "NO" ? 60 : 100,
- //DataPropertyName = nameof(x.ActualValue),
- };
- dgvProductSpecs.Columns.Add(col);
- });
- }
-
- //姣忛殧4绉掕嚜鍔ㄥ埛鏂颁竴娆�
- int _refreshTimes = 0;
- public override void RefreshUIIn100()
- {
- if (!chkAutoRefresh.Checked)
- return;
-
- _refreshTimes++;
- if (_refreshTimes == 40)
- {
- _refreshTimes = 0;
- RefreshProductView();
- }
- }
-
- static object _dataViewLock = new object();
- private void RefreshProductView()
- {
- lock (_dataViewLock)
- {
- this.Invoke(() =>
- {
- SetDgvProductSpecsData();
- //dgvProductSpecs.DataSource = GetSource();
- });
- }
- }
-
- /// <summary>
- /// 濉厖浜у搧妫�娴嬪垪琛ㄨ褰�
- /// </summary>
- private void SetDgvProductSpecsData()
- {
- dgvProductSpecs.Rows.Clear();
- var productModels = Process_M141.ProductSpecResultList;
- //var productModels = GetProductModelTest();
- var rowNo = 0;
- foreach (var product in productModels)
- {
- //var detectResultLists = product.Details.SelectMany(u => u.Value.DetectResults.Values).ToList();
- //List<DetectResult> defectList = detectResultLists.SelectMany(u => u.SelectMany(t => t)).ToList();
-
- int rowIndex = dgvProductSpecs.Rows.Add(); // 娣诲姞鏂拌骞惰幏鍙栧叾绱㈠紩
- dgvProductSpecs.Rows[rowIndex].Cells["NO"].Value = ++rowNo;
- dgvProductSpecs.Rows[rowIndex].Cells["PID"].Value = product.PID;
- dgvProductSpecs.Rows[rowIndex].Cells["SN"].Value = product.SN;
-
- //var specs = defectList.SelectMany(x => x.Specs).ToList();
- List<ISpec> specs = new List<ISpec>();
- specs.AddRange(product.Details.SelectMany(u => u.SpecList).ToList().ConvertAll(u => (ISpec)u));
- specs.AddRange(product.Details.SelectMany(u => u.ResultList.SelectMany(d => d.Specs)));
-
- foreach (var defineSpec in _defineSpecs)
- {
- var curCell = dgvProductSpecs.Rows[rowIndex].Cells[defineSpec.Code];
- var actualSpec = specs.FirstOrDefault(x => x.Code == defineSpec.Code);
- if (actualSpec == null)
- {
- curCell.Value = "";
- continue;
- }
-
- //dr[i++] = temp.GetMeasureValueStr;
-
- // 鑷璁$畻
- if (actualSpec.ActualValue == null)
- {
- curCell.Value = "--";
- curCell.Style.ForeColor = Color.Yellow; // TBD
- }
- else
- {
- curCell.Value = actualSpec.ActualValue;
- if (defineSpec.StandardValue - defineSpec.Tolrenance_Negative <= actualSpec.ActualValue &&
- actualSpec.ActualValue <= defineSpec.StandardValue + defineSpec.Tolrenance_Positive)
- {
- curCell.Style.ForeColor = Color.Green;// OK
- }
- else
- {
- curCell.Style.ForeColor = Color.Red;// NG
- }
- }
-
- //// 鍙︿竴绉嶅鐞嗘柟寮忥紝涓嶇‘瀹歁easureResult 涓氬姟鏄惁宸茶繘琛屽鐞�
- //if (actualSpec.MeasureResult == null)
- //{
- // curCell.Value = "--";
- // curCell.Style.ForeColor = Color.Yellow;
- //}
- //else
- //{
- // curCell.Value = actualSpec.ActualValue;
- // curCell.Style.ForeColor = actualSpec.MeasureResult.Value ? Color.Green : Color.Red;
- //}
- }
- }
-
- // DataGridView 鑷姩婊氬姩鍒版湭琛�
- if (dgvProductSpecs.RowCount >= 1)
- {
- dgvProductSpecs.FirstDisplayedScrollingRowIndex = dgvProductSpecs.RowCount - 1;
- }
- }
-
- /// <summary>
- /// 娴嬭瘯璁板綍
- /// </summary>
- /// <returns></returns>
- private static List<ProductModel> GetProductModelTest()
- {
- var productSpecResultList = new List<ProductModel>();
- productSpecResultList.Add(new ProductModel
- {
- PID = "2024081117100955",
- SN = "SN1",
- Details = new List<P_PRODUCT_DETAIL>()
- {
- { new P_PRODUCT_DETAIL()
- {
- SpecList = new List<Spec>
- {
-
- new Spec { Code="FAI91A_X", ActualValue=1, MeasureResult = true, IsEnabled=true},
- new Spec { Code="FAI91A_Y", ActualValue=2},
- new Spec { Code="FAI91B_X", ActualValue=3},
- new Spec { Code="FAI91B_Y", ActualValue=4},
- new Spec { Code="FAI91_A", ActualValue=5},
- new Spec { Code="FAI91_B", ActualValue=6}
- }
- }
- }
- }
- });
-
- productSpecResultList.Add(new ProductModel
- {
- PID = "2024081117100958",
- SN = "SN2",
- Details = new List<P_PRODUCT_DETAIL>()
- {
- { new P_PRODUCT_DETAIL()
- {
- SpecList = new List<Spec>
- {
-
- new Spec { Code="FAI91A_X", ActualValue=1, MeasureResult = true, IsEnabled=true},
- new Spec { Code="FAI91A_Y", ActualValue=2},
- new Spec { Code="FAI91B_X", ActualValue=3},
- new Spec { Code="FAI91B_Y", ActualValue=4},
- new Spec { Code="FAI91_A", ActualValue=5},
- new Spec { Code="FAI91_B", ActualValue=6}
- }
- }
- }
- }
- });
- return productSpecResultList;
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmProductSpec.resx b/src/Bro.M141.Process/UI/FrmProductSpec.resx
deleted file mode 100644
index 3333846..0000000
--- a/src/Bro.M141.Process/UI/FrmProductSpec.resx
+++ /dev/null
@@ -1,126 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="colPID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="colBarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductStatus.Designer.cs b/src/Bro.M141.Process/UI/FrmProductStatus.Designer.cs
deleted file mode 100644
index cdf2164..0000000
--- a/src/Bro.M141.Process/UI/FrmProductStatus.Designer.cs
+++ /dev/null
@@ -1,151 +0,0 @@
-锘縩amespace Bro.M135.Process.UI
-{
- partial class FrmProductStatus
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- tbMain = new TableLayoutPanel();
- tableLayoutPanel1 = new TableLayoutPanel();
- label_AcupointA = new Label();
- textBox_ProductABarcode = new TextBox();
- label_AcupointB = new Label();
- textBox_ProductBBarcode = new TextBox();
- tableLayoutPanel1.SuspendLayout();
- SuspendLayout();
- //
- // tbMain
- //
- tbMain.ColumnCount = 1;
- tableLayoutPanel1.SetColumnSpan(tbMain, 4);
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 12.5F));
- tbMain.Dock = DockStyle.Fill;
- tbMain.Location = new Point(3, 32);
- tbMain.Margin = new Padding(3, 2, 3, 2);
- tbMain.Name = "tbMain";
- tbMain.RowCount = 1;
- tbMain.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tbMain.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
- tbMain.Size = new Size(735, 314);
- tbMain.TabIndex = 0;
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 4;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F));
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel1.Controls.Add(tbMain, 0, 1);
- tableLayoutPanel1.Controls.Add(label_AcupointA, 0, 0);
- tableLayoutPanel1.Controls.Add(textBox_ProductABarcode, 1, 0);
- tableLayoutPanel1.Controls.Add(label_AcupointB, 2, 0);
- tableLayoutPanel1.Controls.Add(textBox_ProductBBarcode, 3, 0);
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 2;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Size = new Size(741, 348);
- tableLayoutPanel1.TabIndex = 1;
- //
- // label_AcupointA
- //
- label_AcupointA.AutoSize = true;
- label_AcupointA.Dock = DockStyle.Fill;
- label_AcupointA.Location = new Point(3, 0);
- label_AcupointA.Name = "label_AcupointA";
- label_AcupointA.Size = new Size(54, 30);
- label_AcupointA.TabIndex = 1;
- label_AcupointA.Text = "绌翠綅";
- label_AcupointA.TextAlign = ContentAlignment.MiddleRight;
- label_AcupointA.Visible = false;
- //
- // textBox_ProductABarcode
- //
- textBox_ProductABarcode.Dock = DockStyle.Fill;
- textBox_ProductABarcode.Location = new Point(65, 5);
- textBox_ProductABarcode.Margin = new Padding(5);
- textBox_ProductABarcode.Name = "textBox_ProductABarcode";
- textBox_ProductABarcode.Size = new Size(300, 21);
- textBox_ProductABarcode.TabIndex = 2;
- textBox_ProductABarcode.TextAlign = HorizontalAlignment.Center;
- textBox_ProductABarcode.Visible = false;
- //
- // label_AcupointB
- //
- label_AcupointB.AutoSize = true;
- label_AcupointB.Dock = DockStyle.Fill;
- label_AcupointB.Location = new Point(373, 0);
- label_AcupointB.Name = "label_AcupointB";
- label_AcupointB.Size = new Size(54, 30);
- label_AcupointB.TabIndex = 3;
- label_AcupointB.Text = "绌翠綅";
- label_AcupointB.TextAlign = ContentAlignment.MiddleRight;
- label_AcupointB.Visible = false;
- //
- // textBox_ProductBBarcode
- //
- textBox_ProductBBarcode.Dock = DockStyle.Fill;
- textBox_ProductBBarcode.Location = new Point(435, 5);
- textBox_ProductBBarcode.Margin = new Padding(5);
- textBox_ProductBBarcode.Name = "textBox_ProductBBarcode";
- textBox_ProductBBarcode.Size = new Size(301, 21);
- textBox_ProductBBarcode.TabIndex = 4;
- textBox_ProductBBarcode.TextAlign = HorizontalAlignment.Center;
- textBox_ProductBBarcode.Visible = false;
- //
- // FrmProductStatus
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel1);
- Margin = new Padding(2);
- Name = "FrmProductStatus";
- Size = new Size(741, 348);
- tableLayoutPanel1.ResumeLayout(false);
- tableLayoutPanel1.PerformLayout();
- ResumeLayout(false);
- }
-
- #endregion
-
- private TableLayoutPanel tbMain;
- private TableLayoutPanel tableLayoutPanel1;
- private Label label_AcupointA;
- private TextBox textBox_ProductABarcode;
- private Label label_AcupointB;
- private TextBox textBox_ProductBBarcode;
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/FrmProductStatus.cs b/src/Bro.M141.Process/UI/FrmProductStatus.cs
deleted file mode 100644
index 9ac94ab..0000000
--- a/src/Bro.M141.Process/UI/FrmProductStatus.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.M141.Process;
-using Bro.UI.Model.Winform;
-
-namespace Bro.M135.Process.UI
-{
- //[MenuNode("ProductStatus", "妫�娴嬬姸鎬佹樉绀虹晫闈�", 1, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class FrmProductStatus : MenuFormBase
- {
- M141Process M141Process => Process as M141Process;
- M141Config M141Config => Process.IConfig as M141Config;
-
- List<CtrlPositionDisplay> displayCtrls = new List<CtrlPositionDisplay>();
-
- const string RESULTSUMMARY = "缁撴灉姹囨��";
-
- public FrmProductStatus()
- {
- InitializeComponent();
- }
-
- public override void OnProcessUpdated()
- {
- if (M141Process != null)
- {
- tbMain.Controls.Clear();
-
- List<int> productIndexsList = M141Config.MeasureBindCollection.SelectMany(s => s.ProductIndices).Distinct().ToList();
-
- //鏍规嵁褰撳墠宸ヤ綅閰嶇疆鍜屼骇鍝佺储寮曢厤缃紝鏉ュ埛鏂扮晫闈I鐨勮鍒楁暟
- tbMain.RowStyles.Clear();
- tbMain.ColumnStyles.Clear();
-
- tbMain.RowCount = 0;
- tbMain.ColumnCount = productIndexsList.Count * (M141Config.WorkPositionCollection.Count() + 1);
- RowStyle rowStyle = new RowStyle(SizeType.Percent, (float)100);
- for (int i = 0; i < tbMain.ColumnCount; i++)
- {
- ColumnStyle columnStyle = new ColumnStyle(SizeType.Percent, (float)(1.0 / tbMain.ColumnCount));
- tbMain.ColumnStyles.Add(columnStyle);
- }
-
- List<int> rows = new List<int>();
- List<int> columns = new List<int>();
- for (int i = 0; i < productIndexsList.Count * (M141Config.WorkPositionCollection.Count() + 2); i++)
- {
- rows.Add(0);
- columns.Add(i);
- }
-
- int index = 0;
- M141Config.WorkPositionCollection.ToList().ForEach(u =>
- {
- ////浜у搧1
- //CtrlPositionDisplay c1 = new CtrlPositionDisplay(u.PositionName + "_1", M141Config.BackgroundImageFilePath);
- //c1.Dock = DockStyle.Fill;
- //tbMain.Controls.Add(c1, columns[index], rows[index]);
- //displayCtrls.Add(c1);
- //index++;
-
- ////浜у搧2
- //CtrlPositionDisplay c2 = new CtrlPositionDisplay(u.PositionName + "_2", M141Config.BackgroundImageFilePath);
- //c2.Dock = DockStyle.Fill;
- //tbMain.Controls.Add(c2, columns[index], rows[index]);
- //displayCtrls.Add(c2);
- //index++;
-
- productIndexsList.ForEach(f =>
- {
- CtrlPositionDisplay c = new CtrlPositionDisplay(u.PositionName + $"_{f}", M141Config.BackgroundImageFilePath);
- c.Dock = DockStyle.Fill;
- tbMain.Controls.Add(c, columns[index], rows[index]);
- displayCtrls.Add(c);
- index++;
- });
- });
-
- ////浜у搧1
- //CtrlPositionDisplay c1 = new CtrlPositionDisplay(RESULTSUMMARY + "_1", M141Config.BackgroundImageFilePath);
- //tbMain.Controls.Add(c1, 3, 0);
- //displayCtrls.Add(c1);
-
- ////浜у搧2
- //CtrlPositionDisplay c2 = new CtrlPositionDisplay(RESULTSUMMARY + "_2", M141Config.BackgroundImageFilePath);
- //tbMain.Controls.Add(c2, 3, 1);
- //displayCtrls.Add(c2);
-
- productIndexsList.ForEach(f =>
- {
- CtrlPositionDisplay c = new CtrlPositionDisplay(RESULTSUMMARY + $"_{f}", M141Config.BackgroundImageFilePath);
- c.Dock = DockStyle.Fill;
- tbMain.Controls.Add(c, columns[index], rows[index]);
- displayCtrls.Add(c);
- index++;
- });
-
- M141Process.OnPositionResultUpdated -= M135Process_OnPositionResultUpdated;
- M141Process.OnPositionResultUpdated += M135Process_OnPositionResultUpdated;
- }
- }
-
- private void M135Process_OnPositionResultUpdated(string positionName, string productIndex, List<IShapeElement> eleList)
- {
- var c = displayCtrls.FirstOrDefault(u => u.PositionName == positionName + "_" + productIndex);
- if (c == null)
- {
- c = displayCtrls.FirstOrDefault(u => u.PositionName == RESULTSUMMARY + "_" + productIndex);
- }
-
- if (c == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"宸ヤ綅{positionName}锛屼骇鍝佸簭鍙穥productIndex}鏈兘鑾峰彇鏄剧ず鎺т欢");
- }
- else
- {
- c.UpdateProductResult(eleList);
- }
- }
-
-
- //灏嗙晫闈骇鍝佷簩缁寸爜鏁版嵁鏇存柊鍒伴厤缃腑
- public void M135Process_OnSetProductBarcodeToSetting(bool a)
- {
- //if (textBox_ProductABarcode.Text != "")
- //{
- if (label_AcupointA.Text.Split("-")[1] == "1")
- {
- M141Config.BarcodeDataList.Add(textBox_ProductABarcode.Text.ToString());
- M141Config.BarcodeDataList.Add(textBox_ProductBBarcode.Text.ToString());
- }
- else
- {
- M141Config.BarcodeDataList.Add(textBox_ProductBBarcode.Text.ToString());
- M141Config.BarcodeDataList.Add(textBox_ProductABarcode.Text.ToString());
- }
- //}
- }
-
- //灏嗙晫闈骇鍝佷簩缁寸爜鏁版嵁娓呯┖锛屽悓鏃舵竻绌洪厤缃噷鐨勬暟鎹�
- public void M135Process_OnClearProductBarcodeForSettingAndInterface(bool a)
- {
- M141Config.BarcodeDataList.Clear();
- textBox_ProductABarcode.Text = textBox_ProductBBarcode.Text = "";
- }
- public override void OnCustomizedLoad()
- {
- base.OnCustomizedLoad();
- }
-
- public override void OnCustomizedDispose()
- {
- base.OnCustomizedDispose();
-
- M141Process.OnPositionResultUpdated -= M135Process_OnPositionResultUpdated;
- }
- }
-}
diff --git a/src/Bro.M141.Process/UI/FrmProductStatus.resx b/src/Bro.M141.Process/UI/FrmProductStatus.resx
deleted file mode 100644
index a395bff..0000000
--- a/src/Bro.M141.Process/UI/FrmProductStatus.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141.Process/UI/PLCstate.cs b/src/Bro.M141.Process/UI/PLCstate.cs
index 77e246e..220afce 100644
--- a/src/Bro.M141.Process/UI/PLCstate.cs
+++ b/src/Bro.M141.Process/UI/PLCstate.cs
@@ -70,7 +70,7 @@
{
this.Invoke(new Action(() =>
{
- if (Intstate.Count == 17)
+ if (Intstate.Count == 18)
{
State_now = Intstate;
@@ -96,7 +96,7 @@
label7.Text = "閫氶亾3鏈夋棤鏂�: " + (Intstate[6] == 0 ? "鏃犳枡" : "鏈夋枡");
string Alarmstr = "";
- for (int i = 10; i <= 16; i++)
+ for (int i = 10; i <= 17; i++)
{
if (Intstate[i] == 1)
{
@@ -142,6 +142,7 @@
address[14] = "鎬ュ仠鎶ヨ";
address[15] = "鐨甫杞存姤璀�";
address[16] = "涓婁綅鏈洪�氳鎶ヨ";
+ address[17] = "杩涙枡鎰熷簲鎶ヨ";
}
private void button6_Click(object sender, EventArgs e)
diff --git a/src/Bro.M141.Process/UI/SpotCheck.Designer.cs b/src/Bro.M141.Process/UI/SpotCheck.Designer.cs
deleted file mode 100644
index ed2afd8..0000000
--- a/src/Bro.M141.Process/UI/SpotCheck.Designer.cs
+++ /dev/null
@@ -1,280 +0,0 @@
-锘縩amespace Bro.M135.Process.UI
-{
- partial class SpotCheck
- {
- /// <summary>
- /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆�
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆�
- /// </summary>
- /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜
-
- /// <summary>
- /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼
- /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广��
- /// </summary>
- private void InitializeComponent()
- {
- tableLayoutPanel3 = new TableLayoutPanel();
- BtCompensate = new Button();
- btLoadFilePath = new Button();
- btExport = new Button();
- rTLog = new RichTextBox();
- tableLayoutPanel1 = new TableLayoutPanel();
- tableLayoutPanel2 = new TableLayoutPanel();
- label1 = new Label();
- label2 = new Label();
- tbProdure = new TextBox();
- tbCheck = new TextBox();
- btLoadprodure = new Button();
- btLoadTmp = new Button();
- grid = new SourceGrid.Grid();
- FileSave = new SaveFileDialog();
- tableLayoutPanel3.SuspendLayout();
- tableLayoutPanel1.SuspendLayout();
- tableLayoutPanel2.SuspendLayout();
- SuspendLayout();
- //
- // tableLayoutPanel3
- //
- tableLayoutPanel3.ColumnCount = 4;
- tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 111F));
- tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F));
- tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F));
- tableLayoutPanel3.Controls.Add(BtCompensate, 3, 0);
- tableLayoutPanel3.Controls.Add(btLoadFilePath, 2, 0);
- tableLayoutPanel3.Controls.Add(btExport, 1, 0);
- tableLayoutPanel3.Dock = DockStyle.Fill;
- tableLayoutPanel3.Location = new Point(3, 336);
- tableLayoutPanel3.Margin = new Padding(3, 2, 3, 2);
- tableLayoutPanel3.Name = "tableLayoutPanel3";
- tableLayoutPanel3.RowCount = 1;
- tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tableLayoutPanel3.Size = new Size(748, 28);
- tableLayoutPanel3.TabIndex = 8;
- //
- // BtCompensate
- //
- BtCompensate.Dock = DockStyle.Fill;
- BtCompensate.Location = new Point(631, 2);
- BtCompensate.Margin = new Padding(3, 2, 3, 2);
- BtCompensate.Name = "BtCompensate";
- BtCompensate.Size = new Size(114, 24);
- BtCompensate.TabIndex = 11;
- BtCompensate.Text = "鐐规缁撴灉";
- BtCompensate.UseVisualStyleBackColor = true;
- BtCompensate.Click += BtCompensate_Click;
- //
- // btLoadFilePath
- //
- btLoadFilePath.Dock = DockStyle.Fill;
- btLoadFilePath.Location = new Point(511, 3);
- btLoadFilePath.Name = "btLoadFilePath";
- btLoadFilePath.Size = new Size(114, 22);
- btLoadFilePath.TabIndex = 12;
- btLoadFilePath.Text = "鑷姩鑾峰緱鏂囦欢";
- btLoadFilePath.UseVisualStyleBackColor = true;
- btLoadFilePath.Click += btLoadFilePath_Click;
- //
- // btExport
- //
- btExport.Dock = DockStyle.Fill;
- btExport.Location = new Point(400, 3);
- btExport.Name = "btExport";
- btExport.Size = new Size(105, 22);
- btExport.TabIndex = 13;
- btExport.Text = "瀵煎嚭鐐规缁撴灉";
- btExport.UseVisualStyleBackColor = true;
- btExport.Click += btExport_Click;
- //
- // rTLog
- //
- rTLog.Dock = DockStyle.Fill;
- rTLog.Location = new Point(3, 260);
- rTLog.Margin = new Padding(3, 2, 3, 2);
- rTLog.Name = "rTLog";
- rTLog.Size = new Size(748, 72);
- rTLog.TabIndex = 7;
- rTLog.Text = "";
- //
- // tableLayoutPanel1
- //
- tableLayoutPanel1.ColumnCount = 1;
- tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.Controls.Add(tableLayoutPanel3, 0, 3);
- tableLayoutPanel1.Controls.Add(rTLog, 0, 2);
- tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 0);
- tableLayoutPanel1.Controls.Add(grid, 0, 1);
- tableLayoutPanel1.Dock = DockStyle.Fill;
- tableLayoutPanel1.Location = new Point(0, 0);
- tableLayoutPanel1.Margin = new Padding(3, 2, 3, 2);
- tableLayoutPanel1.Name = "tableLayoutPanel1";
- tableLayoutPanel1.RowCount = 4;
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 92F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 76F));
- tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 32F));
- tableLayoutPanel1.Size = new Size(754, 366);
- tableLayoutPanel1.TabIndex = 1;
- //
- // tableLayoutPanel2
- //
- tableLayoutPanel2.ColumnCount = 5;
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 27F));
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 137F));
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 103F));
- tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 27F));
- tableLayoutPanel2.Controls.Add(label1, 1, 0);
- tableLayoutPanel2.Controls.Add(label2, 1, 1);
- tableLayoutPanel2.Controls.Add(tbProdure, 2, 0);
- tableLayoutPanel2.Controls.Add(tbCheck, 2, 1);
- tableLayoutPanel2.Controls.Add(btLoadprodure, 3, 0);
- tableLayoutPanel2.Controls.Add(btLoadTmp, 3, 1);
- tableLayoutPanel2.Dock = DockStyle.Fill;
- tableLayoutPanel2.Location = new Point(3, 2);
- tableLayoutPanel2.Margin = new Padding(3, 2, 3, 2);
- tableLayoutPanel2.Name = "tableLayoutPanel2";
- tableLayoutPanel2.RowCount = 3;
- tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
- tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
- tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
- tableLayoutPanel2.Size = new Size(748, 88);
- tableLayoutPanel2.TabIndex = 10;
- //
- // label1
- //
- label1.AutoSize = true;
- label1.Dock = DockStyle.Fill;
- label1.Location = new Point(30, 0);
- label1.Name = "label1";
- label1.Size = new Size(131, 24);
- label1.TabIndex = 0;
- label1.Text = "鐢熶骇鏁版嵁璺緞";
- label1.TextAlign = ContentAlignment.MiddleRight;
- //
- // label2
- //
- label2.AutoSize = true;
- label2.Dock = DockStyle.Fill;
- label2.Location = new Point(30, 24);
- label2.Name = "label2";
- label2.Size = new Size(131, 24);
- label2.TabIndex = 1;
- label2.Text = "鐐规妯℃澘鏁版嵁";
- label2.TextAlign = ContentAlignment.MiddleRight;
- //
- // tbProdure
- //
- tbProdure.BorderStyle = BorderStyle.FixedSingle;
- tbProdure.Dock = DockStyle.Fill;
- tbProdure.Location = new Point(164, 0);
- tbProdure.Margin = new Padding(0);
- tbProdure.Name = "tbProdure";
- tbProdure.Size = new Size(454, 21);
- tbProdure.TabIndex = 2;
- //
- // tbCheck
- //
- tbCheck.BorderStyle = BorderStyle.FixedSingle;
- tbCheck.Dock = DockStyle.Fill;
- tbCheck.Location = new Point(164, 24);
- tbCheck.Margin = new Padding(0);
- tbCheck.Name = "tbCheck";
- tbCheck.Size = new Size(454, 21);
- tbCheck.TabIndex = 3;
- //
- // btLoadprodure
- //
- btLoadprodure.Dock = DockStyle.Fill;
- btLoadprodure.Location = new Point(618, 0);
- btLoadprodure.Margin = new Padding(0);
- btLoadprodure.Name = "btLoadprodure";
- btLoadprodure.Size = new Size(103, 24);
- btLoadprodure.TabIndex = 4;
- btLoadprodure.Text = "鎵撳紑鐢熶骇鏁版嵁";
- btLoadprodure.UseVisualStyleBackColor = true;
- btLoadprodure.Click += btLoadprodure_Click;
- //
- // btLoadTmp
- //
- btLoadTmp.Location = new Point(618, 24);
- btLoadTmp.Margin = new Padding(0);
- btLoadTmp.Name = "btLoadTmp";
- btLoadTmp.Size = new Size(103, 24);
- btLoadTmp.TabIndex = 5;
- btLoadTmp.Text = "鎵撳紑妯℃澘鏂囦欢";
- btLoadTmp.UseVisualStyleBackColor = true;
- btLoadTmp.Click += btLoadTmp_Click;
- //
- // grid
- //
- grid.Dock = DockStyle.Fill;
- grid.DragOffset = 0;
- grid.EnableSmoothScrolling = false;
- grid.EnableSort = true;
- grid.HScrollBarVisible = false;
- grid.IsCustomAreaAutoScrollEnabled = false;
- grid.Location = new Point(3, 95);
- grid.Name = "grid";
- grid.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows;
- grid.SelectionMode = SourceGrid.GridSelectionMode.Cell;
- grid.Size = new Size(748, 160);
- grid.TabIndex = 11;
- grid.TabStop = true;
- grid.ToolTipText = "";
- grid.VScrollBarVisible = false;
- //
- // FileSave
- //
- FileSave.DefaultExt = "csv";
- FileSave.Filter = "\"鏂囨湰鏂囦欢 (*.csv)|*.csv|鎵�鏈夋枃浠� (*.*)|*.*\"";
- //
- // SpotCheck
- //
- AutoScaleDimensions = new SizeF(6F, 13F);
- AutoScaleMode = AutoScaleMode.Font;
- Controls.Add(tableLayoutPanel1);
- Margin = new Padding(2);
- Name = "SpotCheck";
- Size = new Size(754, 366);
- tableLayoutPanel3.ResumeLayout(false);
- tableLayoutPanel1.ResumeLayout(false);
- tableLayoutPanel2.ResumeLayout(false);
- tableLayoutPanel2.PerformLayout();
- ResumeLayout(false);
- }
-
- #endregion
-
- private TableLayoutPanel tableLayoutPanel3;
- private RichTextBox rTLog;
- private TableLayoutPanel tableLayoutPanel1;
- private TableLayoutPanel tableLayoutPanel2;
- private Label label1;
- private Label label2;
- private TextBox tbProdure;
- private TextBox tbCheck;
- private Button btLoadprodure;
- private Button btLoadTmp;
- private Button BtCompensate;
- private SourceGrid.Grid grid;
- private Button btLoadFilePath;
- private Button btExport;
- private SaveFileDialog FileSave;
- }
-}
diff --git a/src/Bro.M141.Process/UI/SpotCheck.cs b/src/Bro.M141.Process/UI/SpotCheck.cs
deleted file mode 100644
index 94f6712..0000000
--- a/src/Bro.M141.Process/UI/SpotCheck.cs
+++ /dev/null
@@ -1,335 +0,0 @@
-锘縰sing Bro.M141.Process;
-using Bro.UI.Model.Winform;
-using NPOI.SS.Formula.Functions;
-using NPOI.SS.UserModel;
-using NPOI.Util;
-using Org.BouncyCastle.Asn1.X509;
-using Sunny.UI;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using static Bro.Common.Helper.EnumHelper;
-using static NPOI.HSSF.Util.HSSFColor;
-using static System.Windows.Forms.AxHost;
-
-namespace Bro.M135.Process.UI
-{
- //[MenuNode("鐐规", "鐐规", 2, TopMenu.SystemInfo, MenuNodeType.Form)]
- public partial class SpotCheck : MenuFormBase
- {
- M141Process prM141Process => Process as M141Process;
- public SpotCheck()
- {
- InitializeComponent();
- }
- private void initGrid(List<Produre> DataModelList)
- {
- M141Config eM141Config = prM141Process.Config as M141Config;
- double CheckInfo = 0.1;// eM141Config.Check;
-
- //var SpectList = eM141Config.GetSpecList();
- foreach (Produre produre in DataModelList)
- {
- produre.CheckValue = "OK";
- foreach (var item in produre.Value)
- {
- if (!double.TryParse(item.Value, out double Number1))
- {
- if (item.Value != item.ProValue)
- {
- produre.CheckValue = "NG";
- break;
- }
- }
- else
- {
-
- //var spc = SpectList.FirstOrDefault(ss => ss.Code == item.Name);
- double standardVlaue = double.Parse(item.Value);
- if (item.ProValue != null)
- {
- if (Math.Abs(double.Parse(item.ProValue) - standardVlaue) / standardVlaue < CheckInfo)
- {
- produre.CheckValue = "OK";
- break;
- }
- else
- {
- produre.CheckValue = "NG";
- break;
- }
- }
- else
- {
- if (item.ProValue == null)
- {
- rTLog.AppendText("鐢熶骇鏁版嵁涓棤" + item.Name + "鍒梊r\n");
- }
- }
- }
- }
- }
- Produre Fristprodure = DataModelList.FirstOrDefault();
- grid.Redim(DataModelList.Count() + 2, Fristprodure.Value.Count() * 2 + 3);
- SourceGrid.Cells.Views.Cell titleModel = new SourceGrid.Cells.Views.Cell();
- titleModel.BackColor = Color.SteelBlue;
- titleModel.ForeColor = Color.White;
- titleModel.TextAlignment = DevAge.Drawing.ContentAlignment.MiddleCenter;
- SourceGrid.Cells.Views.Cell captionModel = new SourceGrid.Cells.Views.Cell();
- captionModel.BackColor = grid.BackColor;
- int currentRow = 0;
-
- grid[currentRow, 2] = new SourceGrid.Cells.Cell("鏍囧噯鍊�");
- grid[currentRow, 2].View = captionModel;
- grid[currentRow, 2].ColumnSpan = Fristprodure.Value.Count();
-
-
- grid[currentRow, Fristprodure.Value.Count() + 2] = new SourceGrid.Cells.Cell("妫�娴嬪��");
- grid[currentRow, Fristprodure.Value.Count() + 2].View = captionModel;
- grid[currentRow, Fristprodure.Value.Count() + 2].ColumnSpan = Fristprodure.Value.Count();
-
- currentRow = 1;
- grid[currentRow, 2 * Fristprodure.Value.Count() + 2] = new SourceGrid.Cells.Cell("鐐规缁撴灉");
- grid[currentRow, 2 * Fristprodure.Value.Count() + 2].View = captionModel;
-
-
-
- grid[currentRow, 0] = new SourceGrid.Cells.Cell("鏃堕棿");
- grid[currentRow, 0].View = titleModel;
- grid[currentRow, 1] = new SourceGrid.Cells.Cell("鏉$爜");
- grid[currentRow, 1].View = titleModel;
-
- int CloumnIndex = 2;
-
-
- if (Fristprodure != null)
- {
- var ListModel = Fristprodure.Value;
- foreach (var item in ListModel)
- {
- grid[currentRow, CloumnIndex] = new SourceGrid.Cells.Cell(item.Name);
- grid[currentRow, CloumnIndex].View = titleModel;
- CloumnIndex++;
- }
- foreach (var item in ListModel)
- {
- grid[currentRow, CloumnIndex] = new SourceGrid.Cells.Cell(item.Name);
- grid[currentRow, CloumnIndex].View = titleModel;
- CloumnIndex++;
- }
- }
-
- foreach (Produre eProdure in DataModelList)
- {
- currentRow++;
-
- grid[currentRow, 0] = new SourceGrid.Cells.Cell(eProdure.DateTime);
- grid[currentRow, 0].View = captionModel;
-
- grid[currentRow, 1] = new SourceGrid.Cells.Cell(eProdure.Code);
- grid[currentRow, 1].View = captionModel;
- int CloumnIndexinfo = 2;
- foreach (var item in eProdure.Value)
- {
- grid[currentRow, CloumnIndexinfo] = new SourceGrid.Cells.Cell(item.Value);
- grid[currentRow, CloumnIndexinfo].View = captionModel;
- CloumnIndexinfo++;
- }
- foreach (var item in eProdure.Value)
- {
- grid[currentRow, CloumnIndexinfo] = new SourceGrid.Cells.Cell(item.ProValue);
- grid[currentRow, CloumnIndexinfo].View = captionModel;
- CloumnIndexinfo++;
- }
-
- grid[currentRow, CloumnIndexinfo] = new SourceGrid.Cells.Cell(eProdure.CheckValue);
- grid[currentRow, CloumnIndexinfo].View = captionModel;
- }
- grid.AutoSizeCells();
- grid.AutoStretchColumnsToFitWidth = true;
- grid.Columns.StretchToFit();
-
- }
- private void btLoadprodure_Click(object sender, EventArgs e)
- {
- OpenFileDialog dialog = new OpenFileDialog();
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- this.tbProdure.Text = dialog.FileName;
- }
-
- }
-
- private void btLoadTmp_Click(object sender, EventArgs e)
- {
- OpenFileDialog dialog = new OpenFileDialog();
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- this.tbCheck.Text = dialog.FileName;
- }
- }
-
- private void BtCompensate_Click(object sender, EventArgs e)
- {
- List<Produre> DataModelList = new List<Produre>();
- int proNumber = 0;
- using (var stream = File.OpenRead(tbCheck.Text))
- {
- IWorkbook FileIWorkbook = WorkbookFactory.Create(stream);
- ISheet eISheet = FileIWorkbook.GetSheetAt(0);
-
- int rowCount = eISheet.LastRowNum;
- int fristrowindex = 1;
- IRow fristrow = eISheet.GetRow(fristrowindex);
- for (int i = 2; i < rowCount; i++)
- {
- IRow Row = eISheet.GetRow(i);
-
- if (Row != null)
- {
- Produre eProdure = new Produre();
- eProdure.DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:MM:SS");
- if (Row.GetCell(1).CellType == CellType.Numeric)
- {
- eProdure.Code = Row.GetCell(1).NumericCellValue.ToString();
- }
- else
- {
- eProdure.Code = Row.GetCell(1).StringCellValue;
- }
- if (!string.IsNullOrEmpty(eProdure.Code))
- {
- List<Module> eModuleList = new List<Module>();
- for (int cloumn = 2; cloumn < Row.Count(); cloumn++)
- {
- Module eModule = new Module();
-
- eModule.Name = fristrow.GetCell(cloumn).StringCellValue;
-
- if (!eModule.Name.Contains("FAI"))
- {
- eModule.ProValue = "OK";
- }
- if (Row.GetCell(cloumn).CellType == CellType.Numeric)
- {
- eModule.Value = Row.GetCell(cloumn).NumericCellValue.ToString();
- }
- else
- {
- eModule.Value = Row.GetCell(cloumn).StringCellValue.ToString();
- }
- if (eModuleList.FirstOrDefault(x => x.Name == eModule.Name) == null)
- {
-
- eModuleList.Add(eModule);
- }
- }
- eProdure.Value = eModuleList;
- DataModelList.Add(eProdure);
- }
-
- }
-
- }
- if (File.Exists(tbProdure.Text))
- {
- proNumber = DataModelList.Count();
- string[] ProData = File.ReadAllLines(tbProdure.Text);
- if (proNumber > ProData.Count())
- {
- rTLog.AppendText("鐢熶骇鏁版嵁灏忎簬妯℃澘鏁版嵁");
- return;
- }
- int StratProRowIndex = ProData.Count() - proNumber;
- int Rowid = 0;
- string[] Head = ProData[0].Split(',');
- int i = 0;
- for (int End = StratProRowIndex; End < ProData.Count(); End++)
- {
- string[] proData = ProData[End].Split(',');
- string Code = proData[1];
- var ModelInfo = DataModelList.Get(i);
- i++;
- for (int ProInde = 3; ProInde < proData.Length - 1; ProInde++)
- {
- var ModelVar = ModelInfo.Value.FirstOrDefault(model => model.Name == Head[ProInde]);
- if (ModelVar != null)
- {
- ModelVar.ProValue = proData[ProInde];
- }
- else
- {
- rTLog.AppendText("鐢熶骇鏁版嵁涓棤" + Head[ProInde] + "鍒梊r\n");
- }
-
- }
-
- }
- }
- initGrid(DataModelList);
- }
- }
-
- private void btLoadFilePath_Click(object sender, EventArgs e)
- {
- M141Config eM141Config = prM141Process.Config as M141Config;
- if (eM141Config.TmpPath != null)
- tbCheck.Text = eM141Config.TmpPath;
-
- string YYYYMMDD = DateTime.Now.ToString("yyyyMMdd");
- string filepath = eM141Config.LogPath + "\\" + YYYYMMDD + "\\ProductRecord_" + YYYYMMDD + ".csv";
- if (File.Exists(filepath))
- {
- this.tbProdure.Text = filepath;
- }
- }
-
- private void btExport_Click(object sender, EventArgs e)
- {
- FileSave.ShowDialog(this);
- string l_Path = FileSave.FileName;
- if (!string.IsNullOrEmpty(l_Path))
- {
- try
- {
- using (System.IO.StreamWriter writer = new System.IO.StreamWriter(l_Path, false, System.Text.Encoding.Default))
- {
- SourceGrid.Exporter.CSV csv = new SourceGrid.Exporter.CSV();
- csv.Export(grid, writer);
- writer.Close();
- }
-
- DevAge.Shell.Utilities.OpenFile(l_Path);
- }
- catch (Exception err)
- {
- DevAge.Windows.Forms.ErrorDialog.Show(this, err, "CSV Export Error");
- }
- }
-
- }
- }
- public class Produre
- {
- public string Code { get; set; }
- public string DateTime { get; set; }
- public List<Module> Value { get; set; }
-
- public string CheckValue { get; set; }
- }
- public class Module
- {
- public string Name { get; set; }
- public string Value { get; set; }
-
- public string ProValue { get; set; }
- }
-}
diff --git a/src/Bro.M141.Process/UI/SpotCheck.resx b/src/Bro.M141.Process/UI/SpotCheck.resx
deleted file mode 100644
index a4a9792..0000000
--- a/src/Bro.M141.Process/UI/SpotCheck.resx
+++ /dev/null
@@ -1,123 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="FileSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
-</root>
\ No newline at end of file
diff --git a/src/Bro.M141_AOI1.Process/AOI1Config.cs b/src/Bro.M141_AOI1.Process/AOI1Config.cs
index 1e6fb4a..1e97bd8 100644
--- a/src/Bro.M141_AOI1.Process/AOI1Config.cs
+++ b/src/Bro.M141_AOI1.Process/AOI1Config.cs
@@ -11,30 +11,10 @@
public class AOI1Config : M141Config
{
- //[Category("椋炴媿閰嶇疆")]
- //[Description("椋炴媿淇″彿瓒呮椂")]
- //[DisplayName("椋炴媿淇″彿瓒呮椂")]
- //public int PhotolayoutTime { get; set; } = 5000;
-
-
[Category("PLC閰嶇疆")]
[Description("瀹屾垚鍦板潃")]
[DisplayName("瀹屾垚鍦板潃")]
public int Plcover { get; set; } = 3004;
-
-
-
- //[Category("PLC閰嶇疆")]
- //[Description("宸ヤ綅2瀹屾垚鍦板潃")]
- //[DisplayName("宸ヤ綅2瀹屾垚鍦板潃")]
- //public int P2over { get; set; } = 21;
-
-
- //[Category("PLC閰嶇疆")]
- //[Description("宸ヤ綅3瀹屾垚鍦板潃")]
- //[DisplayName("宸ヤ綅3瀹屾垚鍦板潃")]
- //public int P3over { get; set; } = 22;
-
[Category("PLC閰嶇疆")]
[Description("缁撴灉鍦板潃1")]
@@ -56,17 +36,5 @@
[DisplayName("鐗╂枡鐮佸湴鍧�")]
public int Pronumaddress { get; set; } = 3005;
- //[Category("椋炴媿閰嶇疆")]
- //[Description("P1椋炴媿杞Е鍙戝紑鍏�,true,杞Е鍙戝紑鍚�")]
- //[DisplayName("P1椋炴媿杞Е鍙戝紑鍏�")]
- //public bool P1SFstate { get; set; } = false;
- //[Category("椋炴媿閰嶇疆")]
- //[Description("P2椋炴媿杞Е鍙戝紑鍏�,true,杞Е鍙戝紑鍚�")]
- //[DisplayName("P2椋炴媿杞Е鍙戝紑鍏�")]
- //public bool P2SFstate { get; set; } = false;
- //[Category("椋炴媿閰嶇疆")]
- //[Description("P3椋炴媿杞Е鍙戝紑鍏�,true,杞Е鍙戝紑鍚�")]
- //[DisplayName("P3椋炴媿杞Е鍙戝紑鍏�")]
- //public bool P3SFstate { get; set; } = false;
}
}
\ No newline at end of file
diff --git a/src/Bro.M141_AOI1.Process/AOI1Process.cs b/src/Bro.M141_AOI1.Process/AOI1Process.cs
index 0e2bd6f..2a4d05f 100644
--- a/src/Bro.M141_AOI1.Process/AOI1Process.cs
+++ b/src/Bro.M141_AOI1.Process/AOI1Process.cs
@@ -76,10 +76,6 @@
Plc1.WriteSingleAddress(ConfigAOI1.Plcover, 1, out _);
LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"浜у搧璁℃椂缁撴潫 plc鏂欏彿 {pronum} 缁撴灉{pronum + (result[0] ? 1 : 2)},{pronum + (result[1] ? 1 : 2)},{pronum + (result[2] ? 1 : 2)} 鎬荤敤鏃� {(DateTime.Now - dicplctime[pronum / 10]).TotalMilliseconds}ms ");
- Thread.Sleep(100);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult1, 0, out _);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult2, 0, out _);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult3, 0, out _);
}
else
@@ -91,586 +87,13 @@
Plc1.WriteSingleAddress(ConfigAOI1.Plcover, 1, out _);
LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"浜у搧璁℃椂缁撴潫 plc鏂欏彿 {pronum} 缁撴灉{pronum + 2},{pronum + 2},{pronum + 2} 鎬荤敤鏃� {(DateTime.Now - dicplctime[pronum/10]).TotalMilliseconds}ms ");
LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"娴嬭瘯缁撴灉鏁伴噺寮傚父!!!!!!!!");
-
- Thread.Sleep(100);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult1, 0, out _);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult2, 0, out _);
- Plc1.WriteSingleAddress(ConfigAOI1.Finresult3, 0, out _);
}
-
}
catch
{
}
-
- //else if (Postion.Contains("2"))
- //{
- // Plc1.WriteSingleAddress(ConfigAOI1.P2over, result, out _);
- //}
- //else if (Postion.Contains("3"))
- //{
- // Plc1.WriteSingleAddress(ConfigAOI1.P3over, result, out _);
- //}
- //else
- //{
- // Plc1.WriteSingleAddress(ConfigAOI1.Finresult, result, out _);
- //}
}
-
-
-
- //[ProcessMethod("", "PositionCheck_P1_F", "宸ヤ綅1妫�娴嬮鎷�", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P1_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // if (config.TriggerValue == 1)
- // {
- // Productcode = DateTime.Now.ToString("yyyyMMddHHmmss");
- // }
-
- // config.TriggerStr = "1#,1,Str," + Productcode;
- // ResponseMessage msg = new ResponseMessage();
- // msg.Result = 1;
- // msg.IsReply = false;
- // List<MeasureBind> measureBinds = new List<MeasureBind>();
- // string inputSequence = "";
-
- // try
- // {
- // RunImageCheckPreTreat_plc(config, out measureBinds, out inputSequence);
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- // msg.Result = -1;
- // msg.Message = ex.Message;
- // msg.IsReply = false;
- // return msg;
- // }
-
- // int measureNums = measureBinds.Count;
- // bool WaitSignalstate = true;
- // //_isLastCheckFlag = false;
- // measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
- // foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- // {
- // string index = (i.ImageIndex + 1).ToString();
- // if (ConfigAOI1.P1SFstate)
- // {
- // if (!WaitSignal(index))
- // {
- // WaitSignalstate = false;
- // break;
- // }
- // }
- // var products = i.ProductIndices.Select(pi =>
- // {
- // return FindProductBySequence($"{inputSequence}_{pi}", true);
- // }).ToList();
-
- // IImageSet imgSet = null;
- // try
- // {
- // imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- // lock (trigerStr)
- // {
- // trigerStr.Add(index + "over");
- // }
- // if (imgSet == null)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}澶辫触 鍥惧儚涓虹┖");
- // break;
- // }
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}寮傚父锛寋ex.ToString()}");
- // break;
- // }
-
- // RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- // {
- // Interlocked.Decrement(ref measureNums);
- // });
- // }
- // });
-
- // if (!WaitSignalstate)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖閲囬泦淇℃伅涓嶅叏");
- // msg.IsReply = false;
- // return msg;
- // }
-
-
- // while (measureNums > 0)
- // {
- // Thread.Sleep(50);
- // }
-
- // //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- // measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- // camera.ClearImageBufferQueue();
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅1妫�娴嬪悗娓呯悊缂撳瓨");
- // });
-
- // string positionName = measureBinds[0].WorkPosition;
- // var pList = CheckPositionDoneAsync_plc(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- // return msg;
- //}
-
-
- //[ProcessMethod("", "PositionCheck_P1_photo", "宸ヤ綅1鎷嶇収", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P1_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // ResponseMessage msg = new ResponseMessage();
- // msg.IsReply = false;
-
- // int index = config.TriggerValue;
- // if (index == 1)
- // {
- // trigerStr.Clear();
- // }
- // lock (trigerStr)
- // {
- // trigerStr.Add(index.ToString());
- // }
-
- // WaitSignal(index + "over");
- // ReplyPlcData("P1", index);
- // return msg;
- //}
-
-
-
-
- //[ProcessMethod("", "PositionCheck_P2_F", "宸ヤ綅2妫�娴嬮鎷�", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P2_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
-
- // config.TriggerStr = "2#,1,Str," + Productcode;
- // ResponseMessage msg = new ResponseMessage();
- // msg.Result = 1;
- // msg.IsReply = false;
- // List<MeasureBind> measureBinds = new List<MeasureBind>();
- // string inputSequence = "";
-
- // try
- // {
- // RunImageCheckPreTreat_plc(config, out measureBinds, out inputSequence);
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- // msg.Result = -1;
- // msg.Message = ex.Message;
- // msg.IsReply = false;
- // return msg;
- // }
-
-
- // int measureNums = measureBinds.Count;
- // bool WaitSignalstate = true;
- // //_isLastCheckFlag = false;
- // measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
- // foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- // {
- // string index = (i.ImageIndex + 1).ToString();
- // if (ConfigAOI1.P2SFstate)
- // {
- // if (!WaitSignal(index, "p2"))
- // {
- // WaitSignalstate = false;
- // break;
- // }
- // }
- // var products = i.ProductIndices.Select(pi =>
- // {
- // return FindProductBySequence($"{inputSequence}_{pi}", true);
- // }).ToList();
-
- // IImageSet imgSet = null;
- // try
- // {
- // imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- // lock (trigerStr2)
- // {
- // trigerStr2.Add(index + "over");
- // }
- // if (imgSet == null)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2{camera?.Name}鍙栧儚{i?.ImageIndex}澶辫触 鍥惧儚涓虹┖");
- // break;
- // }
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2{camera?.Name}鍙栧儚{i?.ImageIndex}寮傚父锛寋ex.ToString()}");
- // break;
- // }
-
- // RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- // {
- // Interlocked.Decrement(ref measureNums);
- // });
- // }
- // });
-
- // if (!WaitSignalstate)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖閲囬泦淇℃伅涓嶅叏");
- // msg.IsReply = false;
- // return msg;
- // }
-
-
- // while (measureNums > 0)
- // {
- // Thread.Sleep(50);
- // }
-
- // //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- // measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- // camera.ClearImageBufferQueue();
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪悗娓呯悊缂撳瓨");
- // });
-
- // string positionName = measureBinds[0].WorkPosition;
- // var pList = CheckPositionDoneAsync_plc(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- // return msg;
- //}
-
-
- //[ProcessMethod("", "PositionCheck_P2_photo", "宸ヤ綅2鎷嶇収", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P2_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // ResponseMessage msg = new ResponseMessage();
- // msg.IsReply = false;
-
- // int index = config.TriggerValue;
- // if (index == 1)
- // {
- // trigerStr2.Clear();
- // }
- // lock (trigerStr2)
- // {
- // trigerStr2.Add(index.ToString());
- // }
-
- // WaitSignal(index + "over", "p2");
- // ReplyPlcData("P2", index);
- // return msg;
- //}
-
-
- //[ProcessMethod("", "PositionCheck_P3_F", "宸ヤ綅3妫�娴嬮鎷�", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P3_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // config.TriggerStr = "3#,1,Str," + Productcode;
- // ResponseMessage msg = new ResponseMessage();
- // msg.Result = 1;
- // msg.IsReply = false;
- // List<MeasureBind> measureBinds = new List<MeasureBind>();
- // string inputSequence = "";
-
- // try
- // {
- // RunImageCheckPreTreat_plc(config, out measureBinds, out inputSequence);
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- // msg.Result = -1;
- // msg.Message = ex.Message;
- // msg.IsReply = false;
- // return msg;
- // }
- // int measureNums = measureBinds.Count;
- // bool WaitSignalstate = true;
- // //_isLastCheckFlag = false;
- // measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
- // foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- // {
- // string index = (i.ImageIndex + 1).ToString();
- // if (ConfigAOI1.P3SFstate)
- // {
- // if (!WaitSignal(index, "p3"))
- // {
- // WaitSignalstate = false;
- // break;
- // }
- // }
- // var products = i.ProductIndices.Select(pi =>
- // {
- // return FindProductBySequence($"{inputSequence}_{pi}", true);
- // }).ToList();
-
- // IImageSet imgSet = null;
- // try
- // {
- // imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- // lock (trigerStr3)
- // {
- // trigerStr3.Add(index + "over");
- // }
- // if (imgSet == null)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}澶辫触 鍥惧儚涓虹┖");
- // break;
- // }
- // }
- // catch (Exception ex)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}寮傚父锛寋ex.ToString()}");
- // break;
- // }
-
- // RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- // {
- // Interlocked.Decrement(ref measureNums);
- // });
- // }
- // });
-
- // if (!WaitSignalstate)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖閲囬泦淇℃伅涓嶅叏");
- // msg.IsReply = false;
- // return msg;
- // }
-
-
- // while (measureNums > 0)
- // {
- // Thread.Sleep(50);
- // }
-
- // //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- // measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- // {
- // var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- // camera.ClearImageBufferQueue();
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅1妫�娴嬪悗娓呯悊缂撳瓨");
- // });
-
- // string positionName = measureBinds[0].WorkPosition;
- // var pList = CheckPositionDoneAsync_plc(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- // return msg;
- //}
-
-
- //[ProcessMethod("", "PositionCheck_P3_photo", "宸ヤ綅3鎷嶇収", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P3_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // ResponseMessage msg = new ResponseMessage();
- // msg.IsReply = false;
-
- // int index = config.TriggerValue;
- // if (index == 1)
- // {
- // trigerStr3.Clear();
- // }
- // lock (trigerStr3)
- // {
- // trigerStr3.Add(index.ToString());
- // }
-
- // WaitSignal(index + "over", "p3");
- // ReplyPlcData("P3", index);
- // return msg;
- //}
-
- //public bool WaitSignal(string index, string p = "p1")
- //{
- // DateTime dt = DateTime.Now;
- // while ((DateTime.Now - dt).TotalMilliseconds < ConfigAOI1.PhotolayoutTime)
- // {
- // if (p.Equals("p1"))
- // {
- // lock (trigerStr)
- // {
- // if (trigerStr.Contains(index))
- // {
- // return true;
- // }
- // }
- // }
- // else if (p == "p2")
- // {
- // lock (trigerStr2)
- // {
- // if (trigerStr2.Contains(index))
- // {
- // return true;
- // }
- // }
- // }
- // else if (p == "p3")
- // {
- // lock (trigerStr3)
- // {
- // if (trigerStr3.Contains(index))
- // {
- // return true;
- // }
- // }
- // }
- // Thread.Sleep(50);
- // }
- // return false;
- //}
-
- //List<string> trigerStr = new List<string>();
- //List<string> trigerStr2 = new List<string>();
- //List<string> trigerStr3 = new List<string>();
-
-
-
-
- //[ProcessMethod("", "PositionCheck_P2", "宸ヤ綅2妫�娴�", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // config.TriggerStr = "2#," + config.TriggerValue + ",Str," + Productcode;
- // ResponseMessage msg = RunImageCheck_plc(config);
- // msg.IsReply = false;
-
- // if (msg.Result != 1)
- // {
- // ReplyPlcData("P2", config.TriggerValue);
- // }
- // return msg;
- //}
-
- //[ProcessMethod("", "PositionCheck_P3", "宸ヤ綅3妫�娴�", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // config.TriggerStr = "3#," + config.TriggerValue + ",Str," + Productcode;
- // ResponseMessage msg = RunImageCheck_plc(config);
- // msg.IsReply = false;
-
- // if (msg.Result != 1)
- // {
- // ReplyPlcData("P3", config.TriggerValue);
- // }
- // return msg;
- //}
-
-
- //[ProcessMethod("", "PositionCheck_Fin", "缁撴灉鍙嶉plc", InvokeType.TestInvoke)]
- //public ResponseMessage PositionCheck_Fin(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- //{
- // config.TriggerStr = "#,UpData," + Productcode;
- // ResponseMessage msg = new ResponseMessage();
-
- // var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- // string inputSequence = triggerDatas[triggerDatas.Length - 1];
-
- // var productList = new List<int>() { 1 }.Select(u =>
- // {
- // string sequence = $"{inputSequence}_{u}";
- // return FindProductBySequence(sequence, true);
- // }).ToList();
-
-
- // int waitInterval = 300;
- // int repeatTime = /*M141Config.DetectTimeout / waitInterval+*/2;
-
- // do
- // {
- // if (productList.All(p => !string.IsNullOrWhiteSpace(p.Result)))
- // {
- // break;
- // }
- // else
- // {
- // Thread.Sleep(waitInterval);
- // repeatTime--;
- // }
-
- // if (repeatTime < 0)
- // {
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜у搧{string.Join(",", productList.Select(u => u.PID))}妫�娴嬭幏鍙栨眹鎬荤粨鏋滆秴鏃讹紝浣跨敤褰撳墠缁撴灉");
- // break;
- // }
- // } while (true);
-
-
- // var Defaultclass = M141Config.DefectClassCollection.FirstOrDefault(u => u.IsDefault);
- // productList.ForEach(p =>
- // {
- // if (Defaultclass == null)
- // {
- // if (string.IsNullOrEmpty(p.Result))
- // {
- // p.Result = "NG";
- // }
- // }
- // else
- // {
- // if (string.IsNullOrEmpty(p.Result))
- // {
- // p.Result = Defaultclass.ClassName;
- // }
- // }
-
- // var specList = p.Details.SelectMany(u => u.ResultList.SelectMany(r => r.Specs)).ToList();
- // p.Details.SelectMany(u => u.SpecList).ToList().ForEach(s =>
- // {
- // if (!specList.Any(u => u.Code == s.Code))
- // {
- // specList.Add(s);
- // }
- // });
-
- // List<Pointdata> Pointdatas11 = new List<Pointdata>();
-
- // foreach (var item in specList)
- // {
- // try
- // {
- // Pointdatas11.Add(new Pointdata()
- // {
- // Code = item.Code,
- // Value = Convert.ToDouble(item.GetMeasureValueStr()),
- // Stand = item.StandardValue,
- // Min = item.StandardValue - item.Tolrenance_Negative,
- // Max = item.StandardValue + item.Tolrenance_Positive,
- // ispoint = false,
- // });
- // }
- // catch
- // {
-
- // }
- // }
- // M141Codelist.Add(Pointdatas11);
-
- // ReplyPlcData("Fin", p.Result.ToUpper().Contains("NG") ? 2 : 1);
- // });
-
-
-
- // return msg;
- //}
-
-
-
-
-
-
diff --git a/src/Bro.M141_AOI2.Process/AOI2Config.cs b/src/Bro.M141_AOI2.Process/AOI2Config.cs
deleted file mode 100644
index cb27fce..0000000
--- a/src/Bro.M141_AOI2.Process/AOI2Config.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Model;
-using Bro.M141.Process;
-using System.ComponentModel;
-using System.Drawing.Design;
-
-namespace Bro.M141_AOI2.Process
-{
- [Process("AOI2", EnumHelper.DeviceAttributeType.InitialConfig)]
- public class AOI2Config : M141Config
- {
- [Category("宸ヤ綅2閰嶇疆")]
- [Description("宸ヤ綅2妫�娴嬭繍鍔ㄧ偣浣嶉泦鍚�")]
- [DisplayName("宸ヤ綅2妫�娴嬭繍鍔ㄧ偣浣�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<CheckPoint>), typeof(UITypeEditor))]
- public List<CheckPoint> CheckPoints_P2 { get; set; } = new List<CheckPoint>();
-
-
- [Category("宸ヤ綅1閰嶇疆")]
- [Description("宸ヤ綅1妫�娴嬭繍鍔ㄧ偣浣嶉泦鍚�")]
- [DisplayName("宸ヤ綅1妫�娴嬭繍鍔ㄧ偣浣�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<CheckPoint>), typeof(UITypeEditor))]
- public List<CheckPoint> CheckPoints_P1 { get; set; } = new List<CheckPoint>();
-
- //[Category("宸ヤ綅3閰嶇疆")]
- //[Description("浜у搧娴嬮噺鐐逛綅闆嗗悎")]
- //[DisplayName("浜у搧娴嬮噺鐐逛綅闆嗗悎")]
- //[TypeConverter(typeof(CollectionCountConvert))]
- //[Editor(typeof(ComplexCollectionEditor<ContourPoint>), typeof(UITypeEditor))]
- //public List<ContourPoint> MeasurePointCollection { get; set; } = new List<ContourPoint>();
-
- //[Category("宸ヤ綅3閰嶇疆")]
- //[Description("妫�娴嬮」閰嶇疆闆嗗悎锛岃缃寘鍚粍鍚堢偣浣嶇殑妫�娴嬮」")]
- //[DisplayName("妫�娴嬮」閰嶇疆闆嗗悎")]
- //[TypeConverter(typeof(CollectionCountConvert))]
- //[Editor(typeof(ComplexCollectionEditor<MeasureItemBind>), typeof(UITypeEditor))]
- //public List<MeasureItemBind> MeasureItemBinds { get; set; } = new List<MeasureItemBind>();
-
- //[Category("宸ヤ綅3閰嶇疆")]
- //[DisplayName("杞粨鐐硅绠楀亸绉�")]
- //[Description("璁$畻杞粨鐐逛綅缃椂鐨勭偣浣嶅亸绉诲ぇ灏忥紝鍗曚綅mm")]
- //public float CountLineShift { get; set; } = 0.5f;
-
- [Category("鏉$爜閰嶇疆")]
- [Description("宸ヤ綅1浜у搧鏉$爜姝e垯鍒ゆ柇琛ㄨ揪寮忥紝璁剧疆涓虹┖鏃朵笉闇�瑕佸垽鏂�")]
- [DisplayName("浜у搧鏉$爜鍒ゆ柇")]
- public string BarcodeRegex { get; set; } = "";
-
- [Category("鏉$爜閰嶇疆")]
- [Description("閫夋嫨鏉$爜鏍囧噯閰嶇疆淇℃伅锛屾柟渚挎潯鐮丯G杈撳嚭")]
- [DisplayName("鏉$爜鏍囧噯")]
- [TypeConverter(typeof(SpecCodeSelectorConverter))]
- public string BarcodeSpecCode { get; set; } = "";
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141_AOI2.Process/AOI2Process.cs b/src/Bro.M141_AOI2.Process/AOI2Process.cs
deleted file mode 100644
index c8124de..0000000
--- a/src/Bro.M141_AOI2.Process/AOI2Process.cs
+++ /dev/null
@@ -1,1241 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.Device.InsCamera;
-using Bro.M141.Process;
-using Bro.UI.Model.Winform;
-using HalconDotNet;
-using SixLabors.ImageSharp;
-using System.Text.RegularExpressions;
-using static Bro.Common.Helper.EnumHelper;
-
-namespace Bro.M141_AOI2.Process
-{
- [Process("AOI2", EnumHelper.DeviceAttributeType.Device)]
- public class AOI2Process : M141Process
- {
- #region constructor
- public AOI2Process() : base() { }
- public AOI2Process(string productCode) : base(productCode) { }
- #endregion
-
- AOI2Config AOI2Config => Config as AOI2Config;
-
- InsCameraDriver _insCameraDriver = null;
- InsCameraInitialConfig _insCameraConfig = null;
- public override void Open()
- {
- base.Open();
-
- _insCameraDriver = DeviceCollection.FirstOrDefault(u => u is InsCameraDriver) as InsCameraDriver;
- if (_insCameraDriver == null)
- {
- LogAsync(DateTime.Now, LogLevel.Warning, $"鏈厤缃嫃鏄犺寰窛鐩告満璁惧");
- }
- else
- {
- _insCameraDriver.OnImageSetOutput += InsImageSetProcess;
- }
-
-
-
- //_insCameraConfig = Config.CameraConfigCollection.FirstOrDefault(x => x is InsCameraInitialConfig) as InsCameraInitialConfig;
- //if (_insCameraConfig == null)
- //{
- // LogAsync(DateTime.Now, LogLevel.Warning, $"鏈厤缃嫃鏄犺寰窛鐩告満璁惧");
- //}
- }
-
- public override void Close()
- {
- if (_insCameraDriver != null)
- {
- _insCameraDriver.OnImageSetOutput -= InsImageSetProcess;
- }
-
- base.Close();
- }
-
-
-
- List<IImageSet> insimage = new List<IImageSet>();
- /// <summary>
- /// 宸ヤ綅4锛屾帴鏀秈mageSet涓殑鍘熷浘鍜岃瀺鍚堝浘锛屽苟杩涜鐩稿簲妫�娴�
- /// </summary>
- /// <param name="camera"></param>
- /// <param name="imageSet"></param>
- public void InsImageSetProcess(CameraBase camera, IImageSet imageSet)
- {
- DateTime dt = DateTime.Now;
- insimage.Add(imageSet);
- //var images = imageSet as MultiImageSet;
- //for (int i = 0; i < images.FusionImages.Count; i++)
- //{
- //var im = images.FusionImages[i];
- //if (im!=null)
- //{
- // HOperatorSet.WriteImage(im, "png", 0, "D:\\PROJECTS\\M141\\Images\\20241010\\P4\\Origin\\33.png");
- //}
- //}
- }
-
- #region position0
- [ProcessMethod("", "SycnPointsData_P0", "鍚屾宸ヤ綅0妫�娴嬬偣浣�", InvokeType.TestInvoke)]
- public ResponseMessage SycnPointsData_P0(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- var allPoints = AOI2Config.CheckPoints_P1.Where(u => u.IsEnabled);
- string pointDataStr = string.Join(",", allPoints.Select(u => $"{u.PointPosition.X.ToString("f3")},{u.PointPosition.Y.ToString("f3")},{u.PointZ.ToString("f3")}"));
-
- pointDataStr = $"1#,Points,{allPoints.Count()},{pointDataStr}";
- msg.DataStr = pointDataStr;
- msg.IsReply = true;
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1], out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- var measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
- //妫�娴嬪墠娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ReleaseImageWaitHandle();
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅1妫�娴嬪墠娓呯悊缂撳瓨");
- });
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P0", "宸ヤ綅0鎵爜", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P0(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- //ResponseMessage msg = new ResponseMessage();
-
- //msg.IsReply = true;
- //msg.DataStr = "1#," + config.TriggerStr.Split(',')[1] + ",NG";
- //return msg;
-
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
- //msg.DataStr = "1#,"+ config.TriggerStr.Split(',')[1] + ",OK";
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- if (config.TriggerStr.Split(',')[1].Contains("1"))
- {
- msg.DataStr = "0#,Scan1,ScanNG1";
- }
- else
- {
- msg.DataStr = "0#,Scan2,ScanNG2";
- }
- }
-
- return msg;
-
- }
-
- [ProcessMethod("ImageCheck", "GetProductBarcode_P0", "宸ヤ綅0鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P0(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
-
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- FillSpecResults(results[0].PID, results[0].Specs, ret.Item2["OUTPUT_Results"].HTupleToDouble(), opConfig.Products[0].SEQUENCE);
- var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI2Config.BarcodeSpecCode);
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- if (!string.IsNullOrWhiteSpace(AOI2Config.BarcodeRegex))
- {
- bool isOK = Regex.IsMatch(barcode, AOI2Config.BarcodeRegex);
- if (!isOK)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"浜у搧{opConfig.Products[0].PID}鏉$爜{barcode}鏈兘閫氳繃楠岃瘉锛屽垽瀹氭潯鐮丯G");
- if (barcodeSpec == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈兘鑾峰彇浜у搧鏉$爜鏍囧噯锛岃妫�鏌ユ祦绋嬮厤缃腑鏄惁閫夋嫨鏉$爜鏍囧噯鎴栨潯鐮佹娴嬫搷浣滀腑鏄惁娣诲姞鏉$爜鏍囧噯");
-
- results[0].Specs.ForEach(u => u.ActualValue = -999);
- }
- else
- {
- barcodeSpec.ActualValue = -999;
- }
- }
- }
-
-
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧鏉$爜鑾峰彇澶辫触1");
- }
-
- return msg;
- }
- #endregion
-
-
- #region position1
- [ProcessMethod("", "SycnPointsData_P1", "鍚屾宸ヤ綅1妫�娴嬬偣浣�", InvokeType.TestInvoke)]
- public ResponseMessage SycnPointsData_P1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- var allPoints = AOI2Config.CheckPoints_P1.Where(u => u.IsEnabled);
- string pointDataStr = string.Join(",", allPoints.Select(u => $"{u.PointPosition.X.ToString("f3")},{u.PointPosition.Y.ToString("f3")},{u.PointZ.ToString("f3")}"));
-
- pointDataStr = $"1#,Points,{allPoints.Count()},{pointDataStr}";
- msg.DataStr = pointDataStr;
- msg.IsReply = true;
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1], out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- var measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
- //妫�娴嬪墠娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ReleaseImageWaitHandle();
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅1妫�娴嬪墠娓呯悊缂撳瓨");
- });
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P1", "宸ヤ綅1妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- //ResponseMessage msg = new ResponseMessage();
-
- //msg.IsReply = true;
- //msg.DataStr = "1#," + config.TriggerStr.Split(',')[1] + ",NG";
- //return msg;
-
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
- //msg.DataStr = "1#,"+ config.TriggerStr.Split(',')[1] + ",OK";
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "1#," + config.TriggerStr.Split(',')[1] + ",NG";
- }
-
- return msg;
-
- }
- #endregion
-
- #region position2
-
- bool _isLastCheckFlag = false;
- [ProcessMethod("", "SycnPointsData_P2", "鍚屾宸ヤ綅2妫�娴嬬偣浣�", InvokeType.TestInvoke)]
- public ResponseMessage SycnPointsData_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- var allPoints = AOI2Config.CheckPoints_P2.Where(u => u.IsEnabled);
- string pointDataStr = string.Join(",", allPoints.Select(u => $"{u.PointPosition.X.ToString("f3")},{u.PointPosition.Y.ToString("f3")},{u.PointZ.ToString("f3")}"));
-
- pointDataStr = $"2#,Points,{allPoints.Count()},{pointDataStr}";
- msg.DataStr = pointDataStr;
- msg.IsReply = true;
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1], out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- var measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
- //妫�娴嬪墠娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ReleaseImageWaitHandle();
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪墠娓呯悊缂撳瓨");
- });
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P2", "宸ヤ綅2妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = true;
- msg.DataStr = "2#,P,OK";
-
- if (msg.Result != 1)
- {
- msg.DataStr = "2#,P,NG";
- }
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P2_F", "宸ヤ綅2妫�娴嬮鎷�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- msg.IsReply = false;
-
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- msg.IsReply = true;
- msg.DataStr = $"2#,NG.NG,No Read,No Read,NG,NG";
- return msg;
- }
-
- int measureNums = measureBinds.Count;
-
- _isLastCheckFlag = false;
- measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
-
- foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- {
- var products = i.ProductIndices.Select(pi =>
- {
- return FindProductBySequence($"{inputSequence}_{pi}", true);
- }).ToList();
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- if (imgSet==null||imgSet.HImage==null)
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- }
-
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2{camera.Name}鍙栧儚{i.ImageIndex}寮傚父锛寋ex.GetExceptionMessage()}");
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝鑾峰彇鍥剧墖涓嶆墽琛屾娴�");
- //Interlocked.Decrement(ref measureNums);
- measureNums = 0;
- break;
- }
- else
- {
- RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- {
- Interlocked.Decrement(ref measureNums);
- });
- }
- }
- });
-
- while (measureNums > 0 && !_isLastCheckFlag)
- {
- Thread.Sleep(50);
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝閫�鍑烘娴嬶紝涓嶆墽琛屽弽棣�");
- msg.IsReply = false;
- return msg;
- }
-
- //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪悗娓呯悊缂撳瓨");
- });
-
- string positionName = measureBinds[0].WorkPosition;
- var pList = CheckPositionDoneAsync(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- //string replyData = $"2#,C";
-
- //pList.ForEach(p =>
- //{
- // var isOK = p.GetPositionResult(AOI2Config.StationCode, positionName, out _);
- // //replyData += $",{(isOK ? "OK" : "NG")}";
- //});
-
- //replyData += $",{string.Join(",", pList.Select(u => u.SN))},{string.Join(",", pList.Select(u => u.IsPreStationOK ? "OK" : "NG"))}";
-
- //ReplyTcpData(positionName, config.TriggerSource, replyData);
- //msg.IsReply = false;
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "GetProductBarcode_P2", "宸ヤ綅2鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- FillSpecResults(results[0].PID, results[0].Specs, ret.Item2["OUTPUT_Results"].HTupleToDouble(), opConfig.Products[0].SEQUENCE);
- var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI2Config.BarcodeSpecCode);
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- if (!string.IsNullOrWhiteSpace(AOI2Config.BarcodeRegex))
- {
- bool isOK = Regex.IsMatch(barcode, AOI2Config.BarcodeRegex);
- if (!isOK)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"浜у搧{opConfig.Products[0].PID}鏉$爜{barcode}鏈兘閫氳繃楠岃瘉锛屽垽瀹氭潯鐮丯G");
- if (barcodeSpec == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈兘鑾峰彇浜у搧鏉$爜鏍囧噯锛岃妫�鏌ユ祦绋嬮厤缃腑鏄惁閫夋嫨鏉$爜鏍囧噯鎴栨潯鐮佹娴嬫搷浣滀腑鏄惁娣诲姞鏉$爜鏍囧噯");
-
- results[0].Specs.ForEach(u => u.ActualValue = -999);
- }
- else
- {
- barcodeSpec.ActualValue = -999;
- }
- }
- }
-
- //if (AOI2Config.IsEnabelMESUpload)
- //{
- // if (barcodeSpec == null || barcodeSpec.MeasureResult != true)
- // {
- // opConfig.Products[0].IsPreStationOK = false;
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇澶辫触锛岄粯璁ゅ墠绔欐娴婲G");
- // }
- // else
- // {
- // var res = CheckProductSNByMES(new OperationConfigBase() { TriggerStr = barcode }, null, null);
- // opConfig.Products[0].IsPreStationOK = res.Result == 1;
- // }
- //}
- //else
- //{
- //opConfig.Products[0].IsPreStationOK = true;
- //}
- }
-
- return msg;
- }
-
-
-
- #endregion
-
- #region position 3
- [ProcessMethod("", "PositionCheck_P3", "宸ヤ綅3妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
-
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "3#,NG,NG";
- }
-
- return msg;
- }
-
-
- [ProcessMethod("ImageCheck", "CheckLineProfile_P3", "宸ヤ綅3妫�娴嬩骇鍝佺嚎杞粨搴�", InvokeType.TestInvoke)]
- public ResponseMessage CheckLineProfile_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- try
- {
- if (config is IImageCheckOperationConfig opConfig)
- {
-
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GenerateSpecByMeasureItems(AOI2Config.MeasureItemBinds);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- #region 璁$畻杞粨鐐圭殑绾挎
- List<double> segLineDatas = new List<double>();
- AOI2Config.MeasurePointCollection.ForEach(p =>
- {
- if (p.ContourEdge == ContourEdge.X)
- {
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y);
-
- segLineDatas.Add(p.X + AOI2Config.CountLineShift);
- segLineDatas.Add(p.Y);
- }
- else
- {
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y);
-
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y + AOI2Config.CountLineShift);
- }
- });
- #endregion
-
- List<ContourPoint> contourPoints = AOI2Config.MeasurePointCollection.Select(u => u.Copy()).ToList();
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖id 2 {opConfig.ImageSet.Id}");
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
-
- var ret = tool.RunProcedure(new Dictionary<string, HalconDotNet.HTuple>() { { "INPUT_SegLines", segLineDatas.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results", "OUTPUT_Barcode", "OUTPUT_PointStandard", "OUTPUT_PointCatch" }, null);
-
- if (ret == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛岃繑鍥炲�间负null");
- }
- else if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var pResult = results[0];
- var p = opConfig.Products[0];
- //鏍规嵁褰撳墠浜у搧绱㈠紩锛岃幏鍙栧搴斾骇鍝佺殑琛ュ伩鍊奸厤缃�
- var pResultOffsets = AOI2Config.Product_PointsOffsetList.FirstOrDefault(pp => pp.ProductIndex.ToString() == p.SEQUENCE.Split("_")[p.SEQUENCE.Split("_").Count() - 1]);
- List<double> datas = ret.Item2["OUTPUT_Results"].HTupleToDouble();
-
- //string barcode = ret.Item2["OUTPUT_Barcode"].S;
- var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI2Config.BarcodeSpecCode);
- string barcode = ret.Item2["OUTPUT_Barcode"].S.Replace(" ", "").ToLower() == "noread" ? opConfig.Products[0].SN.ToUpper() : ret.Item2["OUTPUT_Barcode"].S.ToUpper();
-
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- if (!string.IsNullOrWhiteSpace(AOI2Config.BarcodeRegex))
- {
- bool isOK = Regex.IsMatch(barcode, AOI2Config.BarcodeRegex);
- if (!isOK)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"浜у搧{opConfig.Products[0].PID}鏉$爜{barcode}鏈兘閫氳繃楠岃瘉锛屽垽瀹氭潯鐮丯G");
- if (barcodeSpec == null)
- {
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈兘鑾峰彇浜у搧鏉$爜鏍囧噯锛岃妫�鏌ユ祦绋嬮厤缃腑鏄惁閫夋嫨鏉$爜鏍囧噯鎴栨潯鐮佹娴嬫搷浣滀腑鏄惁娣诲姞鏉$爜鏍囧噯");
-
- //results[0].Specs.ForEach(u => u.ActualValue = -999);
- }
- else
- {
- barcodeSpec.ActualValue = -999;
- }
- }
- }
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"璁$畻杞粨搴︼紝杈撳叆鐐逛綅锛歿string.Join(",", segLineDatas.Select(u => u.ToString("f3")))}锛涜緭鍑哄師濮嬫暟鎹細{string.Join(",", string.Join(",", datas.Select(u => u.ToString("f3"))))}");
-
-
- List<Pointdata> Pointdatas11 = new List<Pointdata>();
- List<IShapeElement> eleList = new List<IShapeElement>();
-
-
-
- List<double> pointsred = ret.Item2["OUTPUT_PointCatch"].HTupleToDouble();
- List<double> pointsgreen = ret.Item2["OUTPUT_PointStandard"].HTupleToDouble();
-
- for (int i = 0; i < pointsred.Count / 2; i++)
- {
- PointIndicator point = new PointIndicator(new List<double>()
- {
- pointsred[2*i+1],
- pointsred[2*i],
-
- });
- point.Pen = new Pen(System.Drawing.Color.Red, 1);
- eleList.Add(point);
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"RED{i}");
-
- }
-
- for (int i = 0; i < pointsgreen.Count / 2; i++)
- {
- PointIndicator point = new PointIndicator(new List<double>()
- {
- pointsgreen[2*i+1],
- pointsgreen[2*i],
-
- });
- point.Pen = new Pen(System.Drawing.Color.Green, 1);
- eleList.Add(point);
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"GREEN{i}");
- }
-
- if (invokeDevice is CameraBase cam)
- {
- //LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鎷熷悎鍥�");
- cam.SaveFitImage(eleList, opConfig.ImageSet);
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"璁惧鍚嶇О{invokeDevice.Name}");
- }
-
-
-
- if (datas.Count != AOI2Config.MeasurePointCollection.Count * 2)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"杞粨搴︾偣浣嶆暟鎹暟閲弡datas.Count}锛屽拰棰勭疆鐐逛綅鏁伴噺{AOI2Config.MeasurePointCollection.Count}涓嶄竴鑷�");
-
- contourPoints.ForEach(u =>
- {
- u.ActualX = -999;
- u.ActualY = -999;
-
- u.CalculateError(true);
- });
- }
- else
- {
- for (int i = 0; i < contourPoints.Count; i++)
- {
- //鍒濆鍖栬ˉ鍋垮�硷紝骞舵牴鎹綋鍓嶅鐞嗙殑鐐逛綅鍚嶇О銆佸強琛ュ伩寮�鍏筹紝鑾峰彇琛ュ伩鍊艰繘琛岀浉鍏宠绠�
- double offsetX = 0.0, offsetY = 0.0;
- if (pResultOffsets != null)
- {
- var checkPointsOffset = pResultOffsets.CheckPointsOffsetList.FirstOrDefault(c => c.ReadyToOffsetMeasurePointName == contourPoints[i].Name);
- if (checkPointsOffset != null && checkPointsOffset.IsOffsetCalculate == true)
- {
- offsetX = checkPointsOffset.OffsetX;
- offsetY = checkPointsOffset.OffsetY;
-
- }
- contourPoints[i].ActualX = datas[i * 2] + offsetX;
- contourPoints[i].ActualY = datas[i * 2 + 1] + offsetY;
- contourPoints[i].CalculateError(true);
- }
- else
- {
- contourPoints[i].ActualX = datas[i * 2] + offsetX;
- contourPoints[i].ActualY = datas[i * 2 + 1] + offsetY;
- contourPoints[i].CalculateError(true);
- }
-
- Pointdatas11.Add(new Pointdata
- {
- Code = contourPoints[i].Name,
- ValueX = contourPoints[i].ActualX,
- ValueY = contourPoints[i].ActualY,
- });
- }
-
- p.DataTag = contourPoints;
-
- var tempDatas = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- string positionNum = tempDatas[tempDatas.Count - 1];
- ContourPointDataRecord(contourPoints, pResult.PID, positionNum);
- }
-
-
-
-
- pResult.Specs.ForEach(s =>
- {
- var point = contourPoints.FirstOrDefault(u => u.Name == s.Code);
- if (point != null)
- {
- s.ActualValue = Math.Abs(point.Error) * 2.0;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}妫�娴嬮」{s.Code}璧嬪�納s.GetMeasureValueStr()}锛岀粨鏋渰s.GetMeasureResultStr()}");
-
-
- }
- else
- {
- var measureItem = AOI2Config.MeasureItemBinds.FirstOrDefault(u => u.FAIName == s.Code || u.SpecCode == s.Code);
- if (measureItem != null)
- {
- var pointDatas = measureItem.MeasurePointNameCollection.Select(u =>
- {
- var mPoint = contourPoints.FirstOrDefault(p => p.Name == u.MeasurePointName);
- if (mPoint != null)
- {
- return Math.Abs(mPoint.Error);
- }
- else
- {
- return 999;
- }
- });
-
- s.ActualValue = pointDatas.Max() * 2.0;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}妫�娴嬮」{s.Code}璧嬪�納s.GetMeasureValueStr()}锛岀粨鏋渰s.GetMeasureResultStr()}");
- }
- }
-
-
- //Pointdatas11.Add(new Pointdata()
- //{
- // Code = s.Code,
- // Value = Convert.ToDouble(s.GetMeasureValueStr()),
- // Stand = s.StandardValue,
- // Min = s.StandardValue - s.Tolrenance_Negative,
- // Max = s.StandardValue + s.Tolrenance_Positive,
- // ispoint = false,
- //});
- });
-
-
-
- if (M141Pointlist.Count > 500)
- {
- M141Pointlist.Add(Pointdatas11);
- M141Pointlist.RemoveAt(0);
- }
- else
- {
- M141Pointlist.Add(Pointdatas11);
- }
-
- lock (o_numrefresh)
- {
- if (numrefresh > 10)
- {
- PointRefreshUI();
- numrefresh = 0;
- }
- else
- {
- numrefresh++;
- }
- }
- }
- //opConfig.ImageSet.HImage?.Dispose();
- //opConfig.ImageSet.HImage = null;
-
- }
- }
- catch (Exception re)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"{re.ToString()}");
- }
-
- return msg;
- }
- object o_numrefresh = new object();
- int numrefresh = 0;
-
-
- string _contourPointDataHead = "";
- private async void ContourPointDataRecord(List<ContourPoint> points, string pid, string positionNum)
- {
- await Task.Run(() =>
- {
- try
- {
- if (string.IsNullOrWhiteSpace(_contourPointDataHead))
- {
- _contourPointDataHead = "Time,PID,Position,";
- points.OrderBy(u => u.Name).ToList().ForEach(u =>
- {
- _contourPointDataHead += $"{u.Name}_X,{u.Name}_Y,{u.Name}_X瀹為檯鍊�,{u.Name}_Y瀹為檯鍊�,{u.Name}璇樊,";
- });
- }
-
- DateTime dt = DateTime.Now;
- string data = $"{dt.ToString("HH:mm:ss.fff")}T,{pid},{positionNum},";
-
- points.OrderBy(u => u.Name).ToList().ForEach(u =>
- {
- data += $"{u.X.ToString("f3")},{u.Y.ToString("f3")},{u.ActualX.ToString("f3")},{u.ActualY.ToString("f3")},{u.Error.ToString("f3")},";
- });
-
- CSVRecordAsync($"ContourPointRecord_{dt.ToString("yyyyMMdd")}.csv", data, _contourPointDataHead);
- }
- catch
- {
-
- }
- });
- }
-
- // 鍚堝苟鍒� CheckLineProfile_P3
- [ProcessMethod("ImageCheck", "GetProductBarcode_P3", "宸ヤ綅3鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- FillSpecResults(results[0].PID, results[0].Specs, ret.Item2["OUTPUT_Results"].HTupleToDouble(), opConfig.Products[0].SEQUENCE);
- var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI2Config.BarcodeSpecCode);
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- if (!string.IsNullOrWhiteSpace(AOI2Config.BarcodeRegex))
- {
- bool isOK = Regex.IsMatch(barcode, AOI2Config.BarcodeRegex);
- if (!isOK)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"浜у搧{opConfig.Products[0].PID}鏉$爜{barcode}鏈兘閫氳繃楠岃瘉锛屽垽瀹氭潯鐮丯G");
- if (barcodeSpec == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈兘鑾峰彇浜у搧鏉$爜鏍囧噯锛岃妫�鏌ユ祦绋嬮厤缃腑鏄惁閫夋嫨鏉$爜鏍囧噯鎴栨潯鐮佹娴嬫搷浣滀腑鏄惁娣诲姞鏉$爜鏍囧噯");
-
- results[0].Specs.ForEach(u => u.ActualValue = -999);
- }
- else
- {
- barcodeSpec.ActualValue = -999;
- }
- }
- }
-
- //if (AOI2Config.IsEnabelMESUpload)
- //{
- // if (barcodeSpec == null || barcodeSpec.MeasureResult != true)
- // {
- // opConfig.Products[0].IsPreStationOK = false;
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇澶辫触锛岄粯璁ゅ墠绔欐娴婲G");
- // }
- // else
- // {
- // var res = CheckProductSNByMES(new OperationConfigBase() { TriggerStr = barcode }, null, null);
- // opConfig.Products[0].IsPreStationOK = res.Result == 1;
- // }
- //}
- //else
- //{
- // opConfig.Products[0].IsPreStationOK = true;
- //}
- }
-
- return msg;
- }
- #endregion
-
- #region position 4
- [ProcessMethod("", "PositionCheck_P4", "宸ヤ綅4妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P4(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
-
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "4#,NG,NG";
- }
-
- return msg;
- }
-
-
- [ProcessMethod("", "PositionCheck_P4_INS", "宸ヤ綅4妫�娴婭NS", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P4_INS(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- msg.IsReply = false;
-
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- msg.IsReply = true;
- msg.DataStr = $"4#,NG.NG,No Read,No Read,NG,NG";
- return msg;
- }
-
- int measureNums = measureBinds.Count;
-
- int index = 0;
- insimage.Clear();
- _isLastCheckFlag = false;
- measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
-
- foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- {
- var products = i.ProductIndices.Select(pi =>
- {
- return FindProductBySequence($"{inputSequence}_{pi}", true);
- }).ToList();
-
- IImageSet imgSet = null;
- try
- {
- if (index == 0)
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- index++;
- }
- else
- {
- imgSet = insimage[index - 1];
- index++;
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅4{camera.Name}鍙栧儚{i.ImageIndex}寮傚父锛寋ex.GetExceptionMessage()}");
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝鑾峰彇鍥剧墖涓嶆墽琛屾娴�");
- //Interlocked.Decrement(ref measureNums);
- measureNums = 0;
- break;
- }
- else
- {
- RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- {
- Interlocked.Decrement(ref measureNums);
- });
- }
- }
- });
-
- while (measureNums > 0 && !_isLastCheckFlag)
- {
- Thread.Sleep(50);
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝閫�鍑烘娴嬶紝涓嶆墽琛屽弽棣�");
- msg.IsReply = false;
- return msg;
- }
-
- //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅4妫�娴嬪悗娓呯悊缂撳瓨");
- });
-
- string positionName = measureBinds[0].WorkPosition;
- var pList = CheckPositionDoneAsync(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
-
- return msg;
- }
-
-
-
- [ProcessMethod("ImageCheck", "CheckLineProfile_P4", "宸ヤ綅4妫�娴嬩骇鍝佺嚎杞粨搴�", InvokeType.TestInvoke)]
- public ResponseMessage CheckLineProfile_P4(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GenerateSpecByMeasureItems(AOI2Config.MeasureItemBinds);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- #region 璁$畻杞粨鐐圭殑绾挎
- List<double> segLineDatas = new List<double>();
- AOI2Config.MeasurePointCollection.ForEach(p =>
- {
- if (p.ContourEdge == ContourEdge.X)
- {
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y);
-
- segLineDatas.Add(p.X + AOI2Config.CountLineShift);
- segLineDatas.Add(p.Y);
- }
- else
- {
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y);
-
- segLineDatas.Add(p.X);
- segLineDatas.Add(p.Y + AOI2Config.CountLineShift);
- }
- });
- #endregion
-
- List<ContourPoint> contourPoints = AOI2Config.MeasurePointCollection.Select(u => u.Copy()).ToList();
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(new Dictionary<string, HalconDotNet.HTuple>() { { "INPUT_SegLines", segLineDatas.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results" }, null);
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var pResult = results[0];
-
- var p = opConfig.Products[0];
-
- //鏍规嵁褰撳墠浜у搧绱㈠紩锛岃幏鍙栧搴斾骇鍝佺殑琛ュ伩鍊奸厤缃�
- var pResultOffsets = AOI2Config.Product_PointsOffsetList.FirstOrDefault(pp => pp.ProductIndex.ToString() == p.SEQUENCE.Split("_")[p.SEQUENCE.Split("_").Count() - 1]);
- var datas = ret.Item2[$"OUTPUT_Results"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"璁$畻杞粨搴︼紝杈撳叆鐐逛綅锛歿string.Join(",", segLineDatas.Select(u => u.ToString("f3")))}锛涜緭鍑哄師濮嬫暟鎹細{string.Join(",", string.Join(",", datas.Select(u => u.ToString("f3"))))}");
-
- if (datas.Count != AOI2Config.MeasurePointCollection.Count * 2)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"杞粨搴︾偣浣嶆暟鎹暟閲弡datas.Count}锛屽拰棰勭疆鐐逛綅鏁伴噺{AOI2Config.MeasurePointCollection.Count}涓嶄竴鑷�");
-
- contourPoints.ForEach(u =>
- {
- u.ActualX = -999;
- u.ActualY = -999;
-
- u.CalculateError(true);
- });
- }
- else
- {
- for (int i = 0; i < contourPoints.Count; i++)
- {
- //鍒濆鍖栬ˉ鍋垮�硷紝骞舵牴鎹綋鍓嶅鐞嗙殑鐐逛綅鍚嶇О銆佸強琛ュ伩寮�鍏筹紝鑾峰彇琛ュ伩鍊艰繘琛岀浉鍏宠绠�
- double offsetX = 0.0, offsetY = 0.0;
- if (pResultOffsets != null)
- {
- var checkPointsOffset = pResultOffsets.CheckPointsOffsetList.FirstOrDefault(c => c.ReadyToOffsetMeasurePointName == contourPoints[i].Name);
- if (checkPointsOffset != null && checkPointsOffset.IsOffsetCalculate == true)
- {
- offsetX = checkPointsOffset.OffsetX;
- offsetY = checkPointsOffset.OffsetY;
- }
- }
-
- contourPoints[i].ActualX = datas[i * 2] + offsetX;
- contourPoints[i].ActualY = datas[i * 2 + 1] + offsetY;
-
- contourPoints[i].CalculateError(true);
- }
-
- p.DataTag = contourPoints;
-
- var tempDatas = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- string positionNum = tempDatas[tempDatas.Count - 1];
- ContourPointDataRecord(contourPoints, pResult.PID, positionNum);
- }
-
- pResult.Specs.ForEach(s =>
- {
- var point = contourPoints.FirstOrDefault(u => u.Name == s.Code);
- if (point != null)
- {
- s.ActualValue = Math.Abs(point.Error) * 2.0;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}妫�娴嬮」{s.Code}璧嬪�納s.GetMeasureValueStr()}锛岀粨鏋渰s.GetMeasureResultStr()}");
- }
- else
- {
- var measureItem = AOI2Config.MeasureItemBinds.FirstOrDefault(u => u.FAIName == s.Code || u.SpecCode == s.Code);
- if (measureItem != null)
- {
- var pointDatas = measureItem.MeasurePointNameCollection.Select(u =>
- {
- var mPoint = contourPoints.FirstOrDefault(p => p.Name == u.MeasurePointName);
- if (mPoint != null)
- {
- return Math.Abs(mPoint.Error);
- }
- else
- {
- return 999;
- }
- });
-
- s.ActualValue = pointDatas.Max() * 2.0;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}妫�娴嬮」{s.Code}璧嬪�納s.GetMeasureValueStr()}锛岀粨鏋渰s.GetMeasureResultStr()}");
- }
- }
- });
- }
- }
-
- return msg;
- }
-
- #endregion
- }
-}
diff --git a/src/Bro.M141_AOI2.Process/Bro.M141_AOI2.Process.csproj b/src/Bro.M141_AOI2.Process/Bro.M141_AOI2.Process.csproj
deleted file mode 100644
index 4febbbf..0000000
--- a/src/Bro.M141_AOI2.Process/Bro.M141_AOI2.Process.csproj
+++ /dev/null
@@ -1,46 +0,0 @@
-锘�<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <OutputType>Library</OutputType>
- <UseWindowsForms>True</UseWindowsForms>
- <BaseOutputPath>..\</BaseOutputPath>
- <AssemblyVersion>1.0.31215.0</AssemblyVersion>
- <FileVersion>1.0.31215.0</FileVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="System.ServiceModel.Federation" Version="4.8.1" />
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M141.Process\Bro.M141.Process.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Device">
- <HintPath>..\..\libs\PFW\Bro.Common.Device.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Device.InsCamera">
- <HintPath>..\..\libs\PFW\Bro.Device.InsCamera.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process">
- <HintPath>..\..\libs\PFW\Bro.Process.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- <Reference Include="halcondotnet">
- <HintPath>..\..\libs\halcon12\halcondotnet.dll</HintPath>
- </Reference>
- </ItemGroup>
-</Project>
diff --git a/src/Bro.M141_AOI2.Process/Properties/launchSettings.json b/src/Bro.M141_AOI2.Process/Properties/launchSettings.json
deleted file mode 100644
index 3822ae3..0000000
--- a/src/Bro.M141_AOI2.Process/Properties/launchSettings.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "profiles": {
- "Bro.M141_AOI2.Process": {
- "commandName": "Project"
- },
- "Main": {
- "commandName": "Executable",
- "executablePath": "..\\net6.0-windows10.0.19041.0\\Bro.UI.Main.exe"
- }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141_AOI3.Process/AOI3Config.cs b/src/Bro.M141_AOI3.Process/AOI3Config.cs
deleted file mode 100644
index 8e8f2df..0000000
--- a/src/Bro.M141_AOI3.Process/AOI3Config.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-锘縰sing Bro.Common.Helper;
-using Bro.Common.Model;
-using Bro.M141.Process;
-using System.ComponentModel;
-using System.Drawing.Design;
-
-namespace Bro.M141_AOI3.Process
-{
- [Process("AOI3", EnumHelper.DeviceAttributeType.InitialConfig)]
- public class AOI3Config : M141Config
- {
- [Category("杩愬姩閰嶇疆")]
- [Description("妫�娴嬭繍鍔ㄧ偣浣嶉泦鍚�")]
- [DisplayName("妫�娴嬭繍鍔ㄧ偣浣�")]
- [TypeConverter(typeof(CollectionCountConvert))]
- [Editor(typeof(ComplexCollectionEditor<CheckPoint>), typeof(UITypeEditor))]
- public List<CheckPoint> CheckPoints_P2 { get; set; } = new List<CheckPoint>();
-
- [Category("鏉$爜閰嶇疆")]
- [Description("宸ヤ綅1浜у搧鏉$爜姝e垯鍒ゆ柇琛ㄨ揪寮忥紝璁剧疆涓虹┖鏃朵笉闇�瑕佸垽鏂�")]
- [DisplayName("浜у搧鏉$爜鍒ゆ柇")]
- public string BarcodeRegex { get; set; } = "";
-
- [Category("鏉$爜閰嶇疆")]
- [Description("閫夋嫨鏉$爜鏍囧噯閰嶇疆淇℃伅锛屾柟渚挎潯鐮丯G杈撳嚭")]
- [DisplayName("鏉$爜鏍囧噯")]
- [TypeConverter(typeof(SpecCodeSelectorConverter))]
- public string BarcodeSpecCode { get; set; } = "";
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141_AOI3.Process/AOI3Process.cs b/src/Bro.M141_AOI3.Process/AOI3Process.cs
deleted file mode 100644
index 1a40a36..0000000
--- a/src/Bro.M141_AOI3.Process/AOI3Process.cs
+++ /dev/null
@@ -1,709 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M141.Process;
-using HalconDotNet;
-using System.Text.RegularExpressions;
-using static Org.BouncyCastle.Math.EC.ECCurve;
-
-namespace Bro.M141_AOI3.Process
-{
- [Process("AOI3", EnumHelper.DeviceAttributeType.Device)]
- public class AOI3Process : M141Process
- {
- #region constructor
- public AOI3Process() : base() { }
- public AOI3Process(string productCode) : base(productCode) { }
- #endregion
-
- AOI3Config AOI3Config => Config as AOI3Config;
-
- #region position1
- [ProcessMethod("", "PositionCheck_P1", "宸ヤ綅1妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck1(config);
- msg.IsReply = false;
-
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "1#,C,NG,NG,NOREAD,NOREAD";
- }
-
- return msg;
- }
- #endregion
-
- #region position2
- bool _isLastCheckFlag = false;
-
- [ProcessMethod("", "SycnPointsData_P2", "鍚屾宸ヤ綅2妫�娴嬬偣浣�", InvokeType.TestInvoke)]
- public ResponseMessage SycnPointsData_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- //_isLastCheckFlag = true;
- ResponseMessage msg = new ResponseMessage();
-
- var allPoints = AOI3Config.CheckPoints_P2.Where(u => u.IsEnabled);
- string pointDataStr = string.Join(",", allPoints.Select(u => $"{u.PointPosition.Y.ToString("f3")}"));
-
- pointDataStr = $"{config.TriggerStr.Split(',')[0]},Points,{allPoints.Count()},{pointDataStr}";
- msg.DataStr = pointDataStr;
- msg.IsReply = true;
-
- var triggerDatas = config.TriggerStr.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (triggerDatas.Length < 2)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾暟鎹暱搴﹀皬浜�2");
- }
-
- string positionValue = triggerDatas[0];
- int checkIndex = -1;
- if (!int.TryParse(triggerDatas[1], out checkIndex))
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}瑙f瀽澶辫触锛屾湭鑳借幏鍙栨娴嬪簭鍙�");
- }
-
- var positionSet = M141Config.WorkPositionCollection.Where(u => u.IsEnabled).FirstOrDefault(u => u.TriggerValue == positionValue);
- if (positionSet == null)
- {
- throw new ProcessException($"瑙﹀彂鏂囨湰{config.TriggerStr}鏈兘鑾峰彇{positionValue}瀵瑰簲鐨勫彲鐢ㄥ伐浣嶄俊鎭�");
- }
-
- var measureBinds = M141Config.MeasureBindCollection.Where(u => u.WorkPosition == positionSet.PositionName && u.CheckIndex == checkIndex).ToList();
- if (measureBinds.Count == 0)
- {
- throw new ProcessException($"鏈兘鑾峰彇宸ヤ綅{positionSet.PositionName}鐨勭{checkIndex}妫�娴嬮厤缃俊鎭�");
- }
-
-
- ////妫�娴嬪墠娓呯悊鍥剧墖缂撳瓨
- //measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- //{
- // var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- // camera.ReleaseImageWaitHandle();
- // camera.ClearImageBufferQueue();
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪墠娓呯悊缂撳瓨");
- //});
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P2", "宸ヤ綅2妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- msg.IsReply = false;
-
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- msg.IsReply = true;
- msg.DataStr = $"2#,C,NG,NG,NOREAD,NOREAD";
- return msg;
- }
-
- int measureNums = measureBinds.Count;
-
- _isLastCheckFlag = false;
- measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
-
- foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- {
- var products = i.ProductIndices.Select(pi =>
- {
- return FindProductBySequence($"{inputSequence}_{pi}", true);
- }).ToList();
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2{camera.Name}鍙栧儚{i.ImageIndex}寮傚父锛寋ex.GetExceptionMessage()}");
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝鑾峰彇鍥剧墖涓嶆墽琛屾娴�");
- //Interlocked.Decrement(ref measureNums);
- measureNums = 0;
- break;
- }
- else
- {
- RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- {
- Interlocked.Decrement(ref measureNums);
- });
- }
- }
- });
-
- while (measureNums > 0 && !_isLastCheckFlag)
- {
- Thread.Sleep(50);
- }
-
- if (_isLastCheckFlag)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝閫�鍑烘娴嬶紝涓嶆墽琛屽弽棣�");
- msg.IsReply = false;
- return msg;
- }
-
- //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪悗娓呯悊缂撳瓨");
- });
-
- string positionName = measureBinds[0].WorkPosition;
- var pList = CheckPositionDoneAsync(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- //string replyData = $"2#,C";
-
- //pList.ForEach(p =>
- //{
- // var isOK = p.GetPositionResult(AOI3Config.StationCode, positionName, out _);
- // replyData += $",{(isOK ? "OK" : "NG")}";
- //});
-
- //replyData += $",{string.Join(",", pList.Select(u => u.SN))},{string.Join(",", pList.Select(u => u.IsPreStationOK ? "OK" : "NG"))}";
-
- //ReplyTcpData(positionName, config.TriggerSource, replyData);
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "GetProductBarcode_P2", "宸ヤ綅2鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- FillSpecResults(results[0].PID, results[0].Specs, ret.Item2["OUTPUT_Results"].HTupleToDouble(), opConfig.Products[0].SEQUENCE);
- var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI3Config.BarcodeSpecCode);
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- if (!string.IsNullOrWhiteSpace(AOI3Config.BarcodeRegex))
- {
- bool isOK = Regex.IsMatch(barcode, AOI3Config.BarcodeRegex);
- if (!isOK)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"浜у搧{opConfig.Products[0].PID}鏉$爜{barcode}鏈兘閫氳繃楠岃瘉锛屽垽瀹氭潯鐮丯G");
- if (barcodeSpec == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"鏈兘鑾峰彇浜у搧鏉$爜鏍囧噯锛岃妫�鏌ユ祦绋嬮厤缃腑鏄惁閫夋嫨鏉$爜鏍囧噯鎴栨潯鐮佹娴嬫搷浣滀腑鏄惁娣诲姞鏉$爜鏍囧噯");
-
- results[0].Specs.ForEach(u => u.ActualValue = -999);
- }
- else
- {
- barcodeSpec.ActualValue = -999;
- }
- }
- }
-
- //if (AOI3Config.IsEnabelMESUpload)
- //{
- // if (barcodeSpec == null || barcodeSpec.MeasureResult != true)
- // {
- // opConfig.Products[0].IsPreStationOK = false;
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇澶辫触锛岄粯璁ゅ墠绔欐娴婲G");
- // }
- // else
- // {
- // var res = CheckProductSNByMES(new OperationConfigBase() { TriggerStr = barcode }, null, null);
- // opConfig.Products[0].IsPreStationOK = res.Result == 1;
- // }
- //}
- //else
- //{
- // opConfig.Products[0].IsPreStationOK = true;
- //}
- }
-
- return msg;
- }
- #endregion
-
- #region position3
- [ProcessMethod("", "PositionCheck_P3", "宸ヤ綅3妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "3#,C,NG,NG,NOREAD,NOREAD";
- }
- return msg;
- }
-
- object locko3 = new object();
- [ProcessMethod("ImageCheck", "CheckPosition_P3", "宸ヤ綅3妫�娴嬩骇鍝佷綅缃害", InvokeType.TestInvoke)]
- public ResponseMessage CheckPosition_P3(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var preSpecs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- var measureItemSpecs = GenerateSpecByMeasureItems(AOI3Config.MeasureItemBinds);
-
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = preSpecs.Concat(measureItemSpecs).ToList();
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- #region 璁$畻浣嶇疆搴︾殑鐐逛綅
- List<double> standardPoints = new List<double>();
- AOI3Config.MeasurePointCollection.ForEach(p =>
- {
- standardPoints.Add(p.X);
- standardPoints.Add(p.Y);
- });
- #endregion
-
- #region 璁$畻浣嶇疆搴︾偣浣嶇殑鏂瑰悜
- List<string> standardPointsDirection = new List<string>();
- AOI3Config.MeasurePointCollection.ForEach(p =>
- {
- if (p.ContourEdge == ContourEdge.X)
- {
- standardPointsDirection.Add("X");
- }
- else
- {
- standardPointsDirection.Add("Y");
- }
- });
- #endregion
-
- List<ContourPoint> contourPoints = AOI3Config.MeasurePointCollection.Select(u => u.Copy()).ToList();
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- //var ret = tool.RunProcedure(new Dictionary<string, HalconDotNet.HTuple>() { { "INPUT_StandardPoints", standardPoints.ToArray() }, { "INPUT_StandardPointsDirection", standardPointsDirection.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results", "OUTPUT_Distances", "OUTPUT_Flag", "OUTPUT_Points" }, null);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- lock (locko3)
- {
- ret = tool.RunProcedure(new Dictionary<string, HalconDotNet.HTuple>() { { "INPUT_StandardPoints", standardPoints.ToArray() }, { "INPUT_StandardPointsDirection", standardPointsDirection.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results", "OUTPUT_Distances", "OUTPUT_Flag", "OUTPUT_Points" }, null);
-
- }
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var pResult = results[0];
- var p = opConfig.Products[0];
- //鏍规嵁褰撳墠浜у搧绱㈠紩锛岃幏鍙栧搴斾骇鍝佺殑琛ュ伩鍊奸厤缃�
- var pResultOffsets = AOI3Config.Product_PointsOffsetList.FirstOrDefault(pp => pp.ProductIndex.ToString() == p.SEQUENCE.Split("_")[p.SEQUENCE.Split("_").Count() - 1]);
- var specDatas = ret.Item2["OUTPUT_Results"].HTupleToDouble();
- var positionDatas = ret.Item2["OUTPUT_Distances"].HTupleToDouble();
- var points = ret.Item2["OUTPUT_Points"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"璁$畻浣嶇疆搴︼紝杈撳叆鐐逛綅锛歿string.Join(",", standardPoints.Select(u => u.ToString("f3")))}锛涜緭鍑哄師濮嬫娴嬫暟鎹細{string.Join(",", string.Join(",", specDatas.Select(u => u.ToString("f3"))))}锛涜緭鍑哄師濮嬬偣浣嶆暟鎹細{string.Join(",", positionDatas.Select(u => u.ToString("f3")))}");
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅3浣嶇疆搴︽娴嬪師濮嬭緭鍑烘暟鎹紝Spec锛歿string.Join(",", specDatas.Select(u => u.ToString("f3")))}锛涙祴閲忛」锛歿string.Join(",", positionDatas.Select(u => u.ToString("f3")))}锛涚偣浣嶆暟鎹細{string.Join(",", points.Select(u => u.ToString("f3")))}");
-
-
- List<Pointdata> Pointdatas = new List<Pointdata>();
- if (positionDatas.Count != AOI3Config.MeasurePointCollection.Count)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浣嶇疆搴︾偣浣嶆暟鎹暟閲弡positionDatas.Count}锛屽拰棰勭疆鐐逛綅鏁伴噺{AOI3Config.MeasurePointCollection.Count}涓嶄竴鑷�");
- }
- else
- {
- for (int i = 0; i < contourPoints.Count; i++)
- {
- //鍒濆鍖栬ˉ鍋垮�硷紝骞舵牴鎹綋鍓嶅鐞嗙殑鐐逛綅鍚嶇О銆佸強琛ュ伩寮�鍏筹紝鑾峰彇琛ュ伩鍊艰繘琛岀浉鍏宠绠�
- double offsetX = 0.0, offsetY = 0.0;
- if (pResultOffsets != null)
- {
- var checkPointsOffset = pResultOffsets.CheckPointsOffsetList.FirstOrDefault(c => c.ReadyToOffsetMeasurePointName == contourPoints[i].Name);
- if (checkPointsOffset != null && checkPointsOffset.IsOffsetCalculate == true)
- {
- offsetX = checkPointsOffset.OffsetX;
- offsetY = checkPointsOffset.OffsetY;
- }
- }
-
- if (points.Count > (i * 2 + 1))
- {
- contourPoints[i].ActualX = points[i * 2] + offsetX;
- contourPoints[i].ActualY = points[i * 2 + 1] + offsetY;
- }
- else
- {
- contourPoints[i].ActualX = -999;
- contourPoints[i].ActualY = -999;
- }
-
-
- if (contourPoints[i].ContourEdge == ContourEdge.X)
- {
- contourPoints[i].Error = Math.Abs(positionDatas[i]) + offsetY;
- }
- else
- {
- contourPoints[i].Error = Math.Abs(positionDatas[i]) + offsetX;
- }
-
- Pointdatas.Add(new Pointdata
- {
- Code = contourPoints[i].Name,
- ValueX = contourPoints[i].ActualX,
- ValueY = contourPoints[i].ActualY,
- });
- }
-
- var tempDatas = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- string positionNum = tempDatas[tempDatas.Count - 1];
- PositionPointDataRecord(contourPoints, pResult.PID, preSpecs, specDatas, positionNum);
- }
-
- if (M141Pointlist.Count > 500)
- {
- M141Pointlist.Add(Pointdatas);
- M141Pointlist.RemoveAt(0);
- }
- else
- {
- M141Pointlist.Add(Pointdatas);
- }
- lock (o_numrefresh)
- {
- if (numrefresh > 10)
- {
- PointRefreshUI();
- numrefresh = 0;
- }
- else
- {
- numrefresh++;
- }
- }
-
- FillSpecResults(opConfig.Products[0].PID, preSpecs, specDatas, opConfig.Products[0].SEQUENCE);
-
- measureItemSpecs.ForEach(m =>
- {
- var measureItem = AOI3Config.MeasureItemBinds.FirstOrDefault(u => u.SpecCode == m.Code || u.FAIName == m.Code);
- if (measureItem != null)
- {
- var point = contourPoints.FirstOrDefault(u => u.Name == measureItem.MeasurePointNameCollection[0].MeasurePointName);
- m.ActualValue = point.Error;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}浣嶇疆搴︽娴嬮」{m.Code}璧嬪�納m.GetMeasureValueStr()}锛岀粨鏋渰m.GetMeasureResultStr()}");
- }
- });
- }
- }
-
- return msg;
- }
- object o_numrefresh = new object();
- int numrefresh = 0;
- string _contourPointDataHead = "";
- private async void PositionPointDataRecord(List<ContourPoint> points, string pid, List<ISpec> specs, List<double> doubles, string positionNum)
- {
- await Task.Run(() =>
- {
- if (string.IsNullOrWhiteSpace(_contourPointDataHead))
- {
- _contourPointDataHead = "Time,PID,Position,";
- specs.OrderBy(u => u.Code).ToList().ForEach(u =>
- {
- _contourPointDataHead += $"{u.Code},";
- });
- points.OrderBy(u => u.Name).ToList().ForEach(u =>
- {
- _contourPointDataHead += $"{u.Name}_X,{u.Name}_Y,{u.Name}_ActualX,{u.Name}_ActualY,{u.Name}璺濈,";
- });
- }
-
- DateTime dt = DateTime.Now;
- string data = $"{dt.ToString("HH:mm:ss.fff")}T,{pid},{positionNum},";
- doubles.ForEach(u =>
- {
- data += $"{u.ToString()},";
- });
- points.OrderBy(u => u.Name).ToList().ForEach(u =>
- {
- data += $"{u.X.ToString("f3")},{u.Y.ToString("f3")},{u.ActualX.ToString("f3")},{u.ActualY.ToString("f3")},{u.Error.ToString("f3")},";
- });
-
- CSVRecordAsync($"PositionPointRecord_{dt.ToString("yyyyMMdd")}.csv", data, _contourPointDataHead);
- });
- }
- #endregion
-
-
- [ProcessMethod("", "PositionCheck_P4", "宸ヤ綅4妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P4(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
-
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "4#,C,NG,NG,NOREAD,NOREAD";
- }
-
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "CheckPosition_P4", "宸ヤ綅4妫�娴嬩骇鍝佷綅缃害", InvokeType.TestInvoke)]
- public ResponseMessage CheckPosition_P4(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var preSpecs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- var measureItemSpecs = GenerateSpecByMeasureItems(AOI3Config.MeasureItemBinds);
-
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = preSpecs.Concat(measureItemSpecs).ToList();
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- #region 璁$畻浣嶇疆搴︾殑鐐逛綅
- List<double> standardPoints = new List<double>();
- AOI3Config.MeasurePointCollection.ForEach(p =>
- {
- standardPoints.Add(p.X);
- standardPoints.Add(p.Y);
- });
- #endregion
-
- #region 璁$畻浣嶇疆搴︾偣浣嶇殑鏂瑰悜
- List<string> standardPointsDirection = new List<string>();
- AOI3Config.MeasurePointCollection.ForEach(p =>
- {
- if (p.ContourEdge == ContourEdge.X)
- {
- standardPointsDirection.Add("X");
- }
- else
- {
- standardPointsDirection.Add("Y");
- }
- });
- #endregion
-
- List<ContourPoint> contourPoints = AOI3Config.MeasurePointCollection.Select(u => u.Copy()).ToList();
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
- lock (locko3)
- {
- ret = tool.RunProcedure(new Dictionary<string, HalconDotNet.HTuple>() { { "INPUT_StandardPoints", standardPoints.ToArray() }, { "INPUT_StandardPointsDirection", standardPointsDirection.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results", "OUTPUT_Distances", "OUTPUT_Flag", "OUTPUT_Points" }, null);
- }
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var pResult = results[0];
- var p = opConfig.Products[0];
- //鏍规嵁褰撳墠浜у搧绱㈠紩锛岃幏鍙栧搴斾骇鍝佺殑琛ュ伩鍊奸厤缃�
- var pResultOffsets = AOI3Config.Product_PointsOffsetList.FirstOrDefault(pp => pp.ProductIndex.ToString() == p.SEQUENCE.Split("_")[p.SEQUENCE.Split("_").Count() - 1]);
- var specDatas = ret.Item2["OUTPUT_Results"].HTupleToDouble();
- var positionDatas = ret.Item2["OUTPUT_Distances"].HTupleToDouble();
- var points = ret.Item2["OUTPUT_Points"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"璁$畻浣嶇疆搴︼紝杈撳叆鐐逛綅锛歿string.Join(",", standardPoints.Select(u => u.ToString("f3")))}锛涜緭鍑哄師濮嬫娴嬫暟鎹細{string.Join(",", string.Join(",", specDatas.Select(u => u.ToString("f3"))))}锛涜緭鍑哄師濮嬬偣浣嶆暟鎹細{string.Join(",", positionDatas.Select(u => u.ToString("f3")))}");
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"宸ヤ綅4浣嶇疆搴︽娴嬪師濮嬭緭鍑烘暟鎹紝Spec锛歿string.Join(",", specDatas.Select(u => u.ToString("f3")))}锛涙祴閲忛」锛歿string.Join(",", positionDatas.Select(u => u.ToString("f3")))}锛涚偣浣嶆暟鎹細{string.Join(",", points.Select(u => u.ToString("f3")))}");
-
- if (positionDatas.Count != AOI3Config.MeasurePointCollection.Count)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浣嶇疆搴︾偣浣嶆暟鎹暟閲弡positionDatas.Count}锛屽拰棰勭疆鐐逛綅鏁伴噺{AOI3Config.MeasurePointCollection.Count}涓嶄竴鑷�");
- }
- else
- {
- for (int i = 0; i < contourPoints.Count; i++)
- {
- //鍒濆鍖栬ˉ鍋垮�硷紝骞舵牴鎹綋鍓嶅鐞嗙殑鐐逛綅鍚嶇О銆佸強琛ュ伩寮�鍏筹紝鑾峰彇琛ュ伩鍊艰繘琛岀浉鍏宠绠�
- double offsetX = 0.0, offsetY = 0.0;
- if (pResultOffsets != null)
- {
- var checkPointsOffset = pResultOffsets.CheckPointsOffsetList.FirstOrDefault(c => c.ReadyToOffsetMeasurePointName == contourPoints[i].Name);
- if (checkPointsOffset != null && checkPointsOffset.IsOffsetCalculate == true)
- {
- offsetX = checkPointsOffset.OffsetX;
- offsetY = checkPointsOffset.OffsetY;
- }
- }
-
- if (points.Count > (i * 2 + 1))
- {
- contourPoints[i].ActualX = points[i * 2] + offsetX;
- contourPoints[i].ActualY = points[i * 2 + 1] + offsetY;
- }
- else
- {
- contourPoints[i].ActualX = -999;
- contourPoints[i].ActualY = -999;
- }
-
- //鏍规嵁椤圭洰娴嬮噺闇�姹傦紝闇�瑕佽绠楁爣鍑嗙偣鍦ㄤ骇鍝佷笂鐨勫疄闄呯偣浣嶏紝鍜屽熀鍑嗙殑璺濈銆傞�氳繃鑴氭湰璁$畻杈撳嚭锛屾晠闇�瑕佸湪涓婁綅杩涜鍩哄噯鐨勫垽鏂紝骞惰繘琛屽搴旇ˉ鍋�
- //if (contourPoints[i].ContourEdge == ContourEdge.X)
- //{
- // contourPoints[i].Error = Math.Abs(positionDatas[i] + offsetY);
- //}
- //else
- //{
- // contourPoints[i].Error = Math.Abs(positionDatas[i] + offsetX);
- //}
- if (contourPoints[i].ContourEdge == ContourEdge.X)
- {
- contourPoints[i].Error = Math.Abs(positionDatas[i]) + offsetY;
- }
- else
- {
- contourPoints[i].Error = Math.Abs(positionDatas[i]) + offsetX;
- }
- }
-
- var tempDatas = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- string positionNum = tempDatas[tempDatas.Count - 1];
- PositionPointDataRecord(contourPoints, pResult.PID, preSpecs, specDatas, positionNum);
- }
-
- FillSpecResults(opConfig.Products[0].PID, preSpecs, specDatas, opConfig.Products[0].SEQUENCE);
-
- measureItemSpecs.ForEach(m =>
- {
- var measureItem = AOI3Config.MeasureItemBinds.FirstOrDefault(u => u.SpecCode == m.Code || u.FAIName == m.Code);
- if (measureItem != null)
- {
- var point = contourPoints.FirstOrDefault(u => u.Name == measureItem.MeasurePointNameCollection[0].MeasurePointName);
- m.ActualValue = point.Error;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{pResult.PID}浣嶇疆搴︽娴嬮」{m.Code}璧嬪�納m.GetMeasureValueStr()}锛岀粨鏋渰m.GetMeasureResultStr()}");
- }
- });
- }
- }
-
- return msg;
- }
-
-
- [ProcessMethod("", "BiaoDing", "鏍囧畾", InvokeType.TestInvoke)]
- public ResponseMessage BiaoDing(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- try
- {
- int index = Convert.ToInt32(config.TriggerStr.Split(',')[1]) - 1;
- List<BDMeasureBind> testBd = M141Config.BDCollection.Where(u => u.CheckIndex == index).ToList();
-
- for (int i = 0; i < testBd.Count; i++)
- {
- try
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == testBd[i].CameraId) as CameraBase;
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾搴忓彿{index}鏈兘鑾峰彇鐩告満璁惧");
- }
- camera.ClearImageBufferQueue();
- var imgSet = CollectHImage(camera, testBd[i].SnapshotOpConfig);
- camera.ClearImageBufferQueue();
-
- var tool = GetHalconTool(null, "", ((CameraOperationConfigBase)testBd[i].SnapshotOpConfig).AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", imgSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results" });
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾搴忓彿{index}杩愯澶辫触锛寋ret.Item4}");
- }
- else
- {
- testBd[i].BDList = ret.Item2["OUTPUT_Results"].HTupleToDouble();
- }
- }
- catch (Exception e)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾寮傚父,{e.ToString()}");
- }
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾寮傚父,{ex.ToString()}");
- }
- SaveProcessConfig(M141Config);
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = true;
- msg.DataStr = config.TriggerStr;
- return msg;
- }
-
-
-
-
-
-
- }
-}
diff --git a/src/Bro.M141_AOI3.Process/Bro.M141_AOI3.Process.csproj b/src/Bro.M141_AOI3.Process/Bro.M141_AOI3.Process.csproj
deleted file mode 100644
index e1023ff..0000000
--- a/src/Bro.M141_AOI3.Process/Bro.M141_AOI3.Process.csproj
+++ /dev/null
@@ -1,44 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <OutputType>Library</OutputType>
- <UseWindowsForms>True</UseWindowsForms>
- <BaseOutputPath>..\</BaseOutputPath>
- <AssemblyVersion>1.0.31222.0</AssemblyVersion>
- <FileVersion>1.0.31222.0</FileVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="System.ServiceModel.Federation" Version="4.8.1" />
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M141.Process\Bro.M141.Process.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Device">
- <HintPath>..\..\libs\PFW\Bro.Common.Device.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process">
- <HintPath>..\..\libs\PFW\Bro.Process.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- <Reference Include="halcondotnet">
- <HintPath>..\..\libs\halcon12\halcondotnet.dll</HintPath>
- </Reference>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.M141_AOI3.Process/Properties/launchSettings.json b/src/Bro.M141_AOI3.Process/Properties/launchSettings.json
deleted file mode 100644
index abc95e7..0000000
--- a/src/Bro.M141_AOI3.Process/Properties/launchSettings.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "profiles": {
- "Bro.M141_AOI3.Process": {
- "commandName": "Project"
- },
- "Main": {
- "commandName": "Executable",
- "executablePath": "..\\net6.0-windows10.0.19041.0\\Bro.UI.Main.exe"
- }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.M141_AOI3B.Process/AOI3BConfig.cs b/src/Bro.M141_AOI3B.Process/AOI3BConfig.cs
deleted file mode 100644
index 5426af7..0000000
--- a/src/Bro.M141_AOI3B.Process/AOI3BConfig.cs
+++ /dev/null
@@ -1,142 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M141.Process;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing.Design;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Bro.M141_AOI3B.Process
-{
- [Process("AOI3B", EnumHelper.DeviceAttributeType.InitialConfig)]
- public class AOI3BConfig : M141Config
- {
-
- [Category("椋炴媿閰嶇疆")]
- [Description("椋炴媿淇″彿瓒呮椂")]
- [DisplayName("椋炴媿淇″彿瓒呮椂")]
- public int PhotolayoutTime { get; set; } = 5000;
-
- [Category("椋炴媿閰嶇疆")]
- [Description("P1椋炴媿杞Е鍙戝紑鍏�,true,杞Е鍙戝紑鍚�")]
- [DisplayName("P1椋炴媿杞Е鍙戝紑鍏�")]
- public bool P1SFstate { get; set; } = false;
-
- [Category("椋炴媿閰嶇疆")]
- [Description("P2椋炴媿杞Е鍙戝紑鍏�,杞Е鍙戝紑鍚�")]
- [DisplayName("P2椋炴媿杞Е鍙戝紑鍏�")]
- public bool P2SFstate { get; set; } = false;
-
-
-
- [Category("寮曞閰嶇疆")]
- [Description("鏍囧畾鐭╅樀")]
- [DisplayName("鏍囧畾鐭╅樀")]
- [TypeConverter(typeof(SimpleCollectionConvert<double>))]
- [Editor(typeof(SimpleCollectionEditor<double>), typeof(UITypeEditor))]
- public List<double> BDBD { get; set; } = new List<double>();
-
- [Category("寮曞閰嶇疆")]
- [Description("妯℃澘鍧愭爣")]
- [DisplayName("妯℃澘鍧愭爣")]
- [TypeConverter(typeof(SimpleCollectionConvert<double>))]
- [Editor(typeof(SimpleCollectionEditor<double>), typeof(UITypeEditor))]
- public List<double> BDMD { get; set; } = new List<double>();
-
- [Category("寮曞閰嶇疆")]
- [Description("鍦嗗績鍧愭爣")]
- [DisplayName("鍦嗗績鍧愭爣")]
- [TypeConverter(typeof(SimpleCollectionConvert<double>))]
- [Editor(typeof(SimpleCollectionEditor<double>), typeof(UITypeEditor))]
- public List<double> BDYX { get; set; } = new List<double>();
-
-
-
- [Category("寮曞閰嶇疆")]
- [Description("妫�娴嬪彇鍍忔椂鐨勫彇鍍忛厤缃�")]
- [DisplayName("鍙栧儚閰嶇疆")]
- [TypeConverter(typeof(ComplexObjectConvert))]
- [Editor(typeof(OperationConfigByCameraEditor), typeof(UITypeEditor))]
- public IOperationConfig P0SnapshotOpConfig { get; set; } = new CameraOperationConfigBase();
-
- [ResCategory("寮曞閰嶇疆")]
- [ResDescription("鏍囧畾妯℃澘绠楁硶璺緞")]
- [ResDisplayName("鏍囧畾妯℃澘绠楁硶璺緞")]
- [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
- public string BD2AlgorithemPath { get; set; } = "";
-
-
- [Category("寮曞閰嶇疆")]
- [DisplayName("寮曞琛ュ伩璁剧疆")]
- [Description("寮曞琛ュ伩璁剧疆")]
- [TypeConverter(typeof(ComplexObjectConvert))]
- [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))]
- public CompensateValue CompensateValueBD { get; set; } = new CompensateValue();
-
-
- }
-
-
- public class CompensateValue : IComplexDisplay
- {
- [Category("琛ュ伩鍊�")]
- [DisplayName("1.X1")]
- [Description("X1")]
- public double X1 { get; set; } = 0;
-
- [Category("琛ュ伩鍊�")]
- [DisplayName("2.X2")]
- [Description("X2")]
- public double X2 { get; set; } = 0;
-
- [Category("琛ュ伩鍊�")]
- [DisplayName("1.Y1")]
- [Description("Y1")]
- public double Y1 { get; set; } = 0;
-
-
- [Category("琛ュ伩鍊�")]
- [DisplayName("2.Y2")]
- [Description("Y2")]
- public double Y2 { get; set; } = 0;
-
-
- [Category("琛ュ伩鍊�")]
- [DisplayName("1.R1")]
- [Description("R1")]
- public double Z1 { get; set; } = 0;
-
-
- [Category("琛ュ伩鍊�")]
- [DisplayName("2.R2")]
- [Description("R2")]
- public double Z2 { get; set; } = 0;
-
-
-
- public string GetDisplayText()
- {
- return $"";
- }
-
- public override string ToString()
- {
- return GetDisplayText();
- }
- }
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/src/Bro.M141_AOI3B.Process/AOI3BProcess.cs b/src/Bro.M141_AOI3B.Process/AOI3BProcess.cs
deleted file mode 100644
index 34d1218..0000000
--- a/src/Bro.M141_AOI3B.Process/AOI3BProcess.cs
+++ /dev/null
@@ -1,1129 +0,0 @@
-锘縰sing Bro.Common.Base;
-using Bro.Common.Helper;
-using Bro.Common.Interface;
-using Bro.Common.Model;
-using Bro.M141.Process;
-using Bro.Process;
-using HalconDotNet;
-using NPOI.SS.Formula.Functions;
-using ScottPlot.MarkerShapes;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Net.Sockets;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using Windows.Devices.Radios;
-using static Bro.Common.Helper.EnumHelper;
-using static Org.BouncyCastle.Math.EC.ECCurve;
-
-namespace Bro.M141_AOI3B.Process
-{
- [Process("AOI3B", EnumHelper.DeviceAttributeType.Device)]
- public class AOI3BProcess : M141Process
- {
- #region constructor
- public AOI3BProcess() : base() { }
- public AOI3BProcess(string productCode) : base(productCode) { }
- #endregion
-
- ManualResetEvent _snapHandle = new ManualResetEvent(false);
-
- AOI3BConfig AOI3BConfig1 => Config as AOI3BConfig;
-
- TcpListenerWrap TcpListenerx = null;
-
- public override void Open()
- {
-
-
- base.Open();
-
- TcpListenerx = DeviceCollection.FirstOrDefault(u => u is TcpListenerWrap) as TcpListenerWrap;
- //if (TcpListenerx == null)
- //{
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Warning, $"鏈缃甌CP鐩戝惉瀹炰緥");
- //}
- }
-
-
-
-
- [ProcessMethod("", "PositionCheck_P1_F", "宸ヤ綅1妫�娴嬮鎷�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P1_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- msg.IsReply = false;
- trigerStr.Clear();
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat1(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- msg.IsReply = true;
- msg.DataStr = $"1#,C,NG,NG,NOREAD,NOREAD";
- return msg;
- }
-
- //棰勫鐞嗗畬鎴�,鎷嶇収鍑嗗灏辩华
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
- TcpListenerx.WriteAndRead("1#,OK", out _, out _, false, ip, port);
-
- int measureNums = measureBinds.Count;
- bool WaitSignalstate = true;
- //_isLastCheckFlag = false;
- measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
- foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- {
- string index = (i.ImageIndex + 1).ToString();
- if (AOI3BConfig1.P1SFstate)
- {
- if (!WaitSignal(index))
- {
- WaitSignalstate = false;
- break;
- }
- }
- var products = i.ProductIndices.Select(pi =>
- {
- return FindProductBySequence($"{inputSequence}_{pi}", true);
- }).ToList();
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- lock (trigerStr)
- {
- trigerStr.Add(index + "over");
- }
- if (imgSet == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}澶辫触 鍥惧儚涓虹┖");
- break;
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1{camera?.Name}鍙栧儚{i?.ImageIndex}寮傚父锛寋ex.ToString()}");
- break;
- }
-
- RunImageCheckAsync(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- {
- Interlocked.Decrement(ref measureNums);
- });
- }
- });
-
- //bool WaitSignalstate = true;
- if (!WaitSignalstate)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖閲囬泦淇℃伅涓嶅叏");
- msg.IsReply = true;
- msg.DataStr = $"1#,C,NG,NG,NOREAD,NOREAD";
- return msg;
- }
-
-
- while (measureNums > 0)
- {
- Thread.Sleep(50);
- }
-
- //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅1妫�娴嬪悗娓呯悊缂撳瓨");
- });
-
- string positionName = measureBinds[0].WorkPosition;
- var pList = CheckPositionDoneAsync1(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- return msg;
- }
-
- public bool WaitSignal(string index, string p = "p1")
- {
- DateTime dt = DateTime.Now;
- while ((DateTime.Now - dt).TotalMilliseconds < AOI3BConfig1.PhotolayoutTime)
- {
- if (p.Equals("p1"))
- {
- lock (trigerStr)
- {
- if (trigerStr.Contains(index))
- {
- return true;
- }
- }
- }
- else
- {
- lock (trigerStr2)
- {
- if (trigerStr2.Contains(index))
- {
- return true;
- }
- }
- }
- Thread.Sleep(50);
- }
- return false;
- }
-
- List<string> trigerStr = new List<string>();
- [ProcessMethod("", "PositionCheck_P1_photo", "宸ヤ綅1鎷嶇収", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P1_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = false;
-
- string index = config.TriggerStr.Split(",")[config.TriggerStr.Split(",").Length - 1];
- lock (trigerStr)
- {
- trigerStr.Add(index);
- }
- msg.DataStr = config.TriggerStr + ",OK";
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- WaitSignal(index + "over");
- TcpListenerx.WriteAndRead(config.TriggerStr + ",OK", out _, out _, false, ip, port);
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "GetProductBarcode_P1", "宸ヤ綅1鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
-
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() {
- { "INPUT_Image", opConfig.ImageSet.HImage } },
- new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
-
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅1鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- FillSpecResults(results[0].PID, results[0].Specs, ret.Item2["OUTPUT_Results"].HTupleToDouble(), opConfig.Products[0].SEQUENCE);
- //var barcodeSpec = results[0].Specs.FirstOrDefault(u => u.Code == AOI2Config.BarcodeSpecCode);
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- opConfig.Products[0].SN = barcode;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"浜у搧{opConfig.Products[0].PID}鏉$爜鑾峰彇涓簕barcode}");
-
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode);
-
- }
- else
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"浜у搧鏉$爜鑾峰彇澶辫触1");
- }
-
- return msg;
- }
-
- [ProcessMethod("", "PositionCheck_P2", "宸ヤ綅2妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck(config);
- msg.IsReply = false;
-
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "2#,C,NG,NG,NOREAD,NOREAD";
- }
- return msg;
- }
-
-
- List<string> trigerStr2 = new List<string>();
- [ProcessMethod("", "PositionCheck_P2_F", "宸ヤ綅2妫�娴嬮鎷�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2_F(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.Result = 1;
- msg.IsReply = false;
- trigerStr2.Clear();
- P2data.Clear();
- List<MeasureBind> measureBinds = new List<MeasureBind>();
- string inputSequence = "";
-
- try
- {
- RunImageCheckPreTreat1(config, out measureBinds, out inputSequence);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"妫�娴嬮澶勭悊寮傚父锛寋ex.GetExceptionMessage()}");
- msg.Result = -1;
- msg.Message = ex.Message;
-
- msg.IsReply = true;
- msg.DataStr = $"2#,NG";
- return msg;
- }
-
- //棰勫鐞嗗畬鎴�,鎷嶇収鍑嗗灏辩华
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
- TcpListenerx.WriteAndRead("2#,OK", out _, out _, false, ip, port);
-
- int measureNums = measureBinds.Count;
- bool WaitSignalstate = true;
- //_isLastCheckFlag = false;
- measureBinds.GroupBy(u => u.CameraId).AsParallel().ForAll(c =>
- {
- var camera = DeviceCollection.FirstOrDefault(u => u.Id == c.Key) as CameraBase;
- foreach (var i in c.ToList().OrderBy(u => u.ImageIndex).ToList())
- {
- string index = (i.ImageIndex + 1).ToString();
- if (AOI3BConfig1.P2SFstate)
- {
- if (!WaitSignal(index, "p2"))
- {
- WaitSignalstate = false;
- break;
- }
- }
- var products = i.ProductIndices.Select(pi =>
- {
- return FindProductBySequence($"{inputSequence}_{pi}", true);
- }).ToList();
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, i.SnapshotOpConfig);
- lock (trigerStr2)
- {
- trigerStr2.Add(index + "over");
- }
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅2{camera.Name}鍙栧儚{i.ImageIndex}寮傚父锛寋ex.GetExceptionMessage()}");
- }
-
- RunImageCheckAsyncForSB(products, config.TriggerStr, config.TriggerSource, imgSet, i).ContinueWith(t =>
- {
- Interlocked.Decrement(ref measureNums);
- });
-
- }
- });
-
- //bool WaitSignalstate = true;
- if (!WaitSignalstate)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鍥剧墖閲囬泦淇℃伅涓嶅叏");
- msg.IsReply = true;
- msg.DataStr = $"2#,C,NG,NG,NOREAD,NOREAD";
- return msg;
- }
-
-
- while (measureNums > 0)
- {
- Thread.Sleep(50);
- }
-
- //if (_isLastCheckFlag)
- //{
- // LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"褰撳墠娴佺▼宸茶繃鏈燂紝閫�鍑烘娴嬶紝涓嶆墽琛屽弽棣�");
- // msg.IsReply = false;
- // return msg;
- //}
-
- //妫�娴嬪畬鎴愬悗娓呯悊鍥剧墖缂撳瓨
- measureBinds.Select(u => u.CameraId).Distinct().ToList().ForEach(u =>
- {
- var camera = DeviceCollection.FirstOrDefault(c => c.Id == u) as CameraBase;
- camera.ClearImageBufferQueue();
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"{camera.Name}鐩告満宸ヤ綅2妫�娴嬪悗娓呯悊缂撳瓨");
- });
-
- string positionName = measureBinds[0].WorkPosition;
- var pList = CheckPositionDoneAsyncforsb(positionName, inputSequence, config, new List<string>()).GetAwaiter().GetResult();
-
- return msg;
- }
-
-
- [ProcessMethod("", "PositionCheck_P2_photo", "宸ヤ綅2鎷嶇収", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P2_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = false;
- string index = config.TriggerStr.Split(",")[config.TriggerStr.Split(",").Length - 1];
- lock (trigerStr2)
- {
- trigerStr2.Add(index);
- }
- msg.DataStr = config.TriggerStr + ",OK";
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- WaitSignal(index + "over", "p2");
- Thread.Sleep(300);
- TcpListenerx.WriteAndRead(config.TriggerStr + ",OK", out _, out _, false, ip, port);
- return msg;
- }
-
-
- [ProcessMethod("ImageCheck", "PositionCheck_P0", "宸ヤ綅0寮曞", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P0(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = true;
- msg.DataStr = "0#,NG,0,0,0,0,0,0";
- if (config is IImageCheckOperationConfig opConfig)
- {
- if (string.IsNullOrEmpty(opConfig.AlgorithemPath))
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"P0鏍囧畾閰嶇疆寮傚父锛岃妫�鏌ラ厤缃�");
- }
- else
- {
-
- var camera = invokeDevice as CameraBase;
-
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"P0閰嶇疆鐩告満涓虹┖锛岃妫�鏌ラ厤缃�");
- msg.DataStr = "";
- return msg;
- }
-
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, AOI3BConfig1.P0SnapshotOpConfig);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0鍙栧儚寮傚父锛寋ex.GetExceptionMessage()}");
- return msg;
- }
-
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_BiaodingTupe", AOI3BConfig1.BDBD.ToArray() }, { "INPUT_xxzx", AOI3BConfig1.BDYX.ToArray() }, { "INPUT_muban", AOI3BConfig1.BDMD.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", imgSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- msg.DataStr = "0#,NG,0,0,0,0,0,0";
- }
- else
- {
- var datas = ret.Item2[$"OUTPUT_Results_1"].HTupleToDouble();
- msg.DataStr = "0#,OK";
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"寮曞鍧愭爣鑴氭湰杈撳嚭鏁版嵁 {string.Join(",", datas)}");
-
- if (datas != null && datas.Count == 6)
- {
- datas[0] += AOI3BConfig1.CompensateValueBD.X1;
- datas[1] += AOI3BConfig1.CompensateValueBD.Y1;
- datas[2] += AOI3BConfig1.CompensateValueBD.Z1;
- datas[3] += AOI3BConfig1.CompensateValueBD.X2;
- datas[4] += AOI3BConfig1.CompensateValueBD.Y2;
- datas[5] += AOI3BConfig1.CompensateValueBD.Z2;
-
-
- for (int i = 0; i < datas.Count; i++)
- {
- msg.DataStr += $",{datas[i]}";
- }
- }
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"寮曞鍧愭爣鑴氭湰琛ュ伩鍚庢暟鎹暟鎹� {string.Join(",", datas)}");
- }
- }
- }
- return msg;
- }
-
-
- [ProcessMethod("", "PositionCheck_P0_SN", "宸ヤ綅0妫�娴�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P0_SN(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = RunImageCheck1(config);
- msg.IsReply = false;
- if (msg.Result != 1)
- {
- msg.IsReply = true;
- msg.DataStr = "0#,2,NG,NOREAD,NOREAD";
- }
-
- return msg;
- }
-
-
- Dictionary<int, List<double>> P2data = new Dictionary<int, List<double>>();
- //Dictionary<int, List<double>> P2data2 = new Dictionary<int, List<double>>();
-
- [ProcessMethod("ImageCheck", "ImageCheckOperationP2out", "鏁版嵁杈撳嚭", InvokeType.TestInvoke)]
- public ResponseMessage ImageCheckOperationP2out(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2", "OUTPUT_TransmitData" }, null);
-
-
- //var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- //if (opConfig.Outindex==1)
- //{
- // P2data1.Clear();
- //}
- opConfig.Products.ForEach(p =>
- {
- var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- string i = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- //var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- var Tdatas = ret.Item2["OUTPUT_TransmitData"].HTupleToDouble();
-
- ///*if*/ (i == "1")
- //{
- lock (P2data)
- {
- P2data[opConfig.Outindex] = Tdatas;
- }
- //}
- //else
- //{
- // P2data2[opConfig.Outindex] = Tdatas;
- //}
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏁版嵁浜や簰杈撳嚭浜у搧{i}搴忓彿{opConfig.Outindex} {string.Join(",", Tdatas)}");
-
-
- //if (pResult != null && datas.Count > 0)
- //{
- // FillSpecResults(pResult.PID, pResult.Specs, datas, p.SEQUENCE);
- //}
- });
- }
- }
-
- return msg;
- }
-
-
- [ProcessMethod("ImageCheck", "ImageCheckOperationP2in", "鏁版嵁杈撳叆,浜屾杩涚畻娉�", InvokeType.TestInvoke)]
- public ResponseMessage ImageCheckOperationP2in(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- try
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- List<double> tem = new List<double>();
-
-
- DateTime dt = DateTime.Now;
- while ((DateTime.Now - dt).TotalMilliseconds < AOI3BConfig1.PhotolayoutTime)
- {
- lock (P2data)
- {
- if (P2data.Count >= opConfig.Outindex)
- {
- break;
- }
- }
- Thread.Sleep(5);
- }
-
- lock (P2data)
- {
- P2data.OrderBy(u => u.Key).ToList().ForEach(x =>
- {
- tem.AddRange(x.Value);
- tem.Add(-998);
- });
- tem.RemoveAt(tem.Count - 1);
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"浜屾杩涚畻娉曡緭鍏ユ暟鎹甶n {string.Join(",", tem)}");
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_TransmitData", tem.ToArray() } }, null, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- P2data.Clear();
- P2data = new Dictionary<int, List<double>>();
- }
-
-
-
- if (!ret.Item1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- opConfig.Products.ForEach(p =>
- {
- var pResult = results.FirstOrDefault(u => u.PID == p.PID);
- string i = p.SEQUENCE[p.SEQUENCE.Length - 1].ToString();
- var datas = ret.Item2[$"OUTPUT_Results_{i}"].HTupleToDouble();
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"浜屾杩涚畻娉曡緭鍑烘暟鎹畂ut {string.Join(",", datas)}");
-
- if (pResult != null && datas.Count > 0)
- {
- FillSpecResults(pResult.PID, pResult.Specs, datas, p.SEQUENCE);
- }
- });
- }
- }
- catch (Exception ee)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"浜屾杩涚畻娉曞紓甯� {ee.ToString()}");
- }
- }
- return msg;
- }
-
-
-
- [ProcessMethod("ImageCheck", "PositionCheck_P0BD", "宸ヤ綅0妫�娴嬫爣瀹�", InvokeType.CalibInvoke)]
- public ResponseMessage PositionCheck_P0BD(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = false;
- string trg = config.TriggerStr;
- if (!config.TriggerStr.ToLower().Contains("start"))
- {
- return msg;
- }
- xList = new List<double>();
- yList = new List<double>();
- uList = new List<double>();
- vList = new List<double>();
- BDphoto.Clear();
-
- if (config.TriggerStr.Split(',')[1] == "1")
- {
- msg = PositionCheck_P0BD1(config, invokeDevice, sourceDevice);
- }
- else
- {
- msg = PositionCheck_P0BD2(config, invokeDevice, sourceDevice);
- }
-
- if (msg.DataStr.Contains("OK"))
- {
- msg.DataStr = trg + ",OK";
- }
- else
- {
- msg.DataStr = trg + ",NG";
- }
- return msg;
- }
-
-
- [ProcessMethod("", "PositionCheck_P0BD_photo", "宸ヤ綅0妫�娴嬫爣瀹氭媿鐓�", InvokeType.TestInvoke)]
- public ResponseMessage PositionCheck_P0BD_photo(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- msg.IsReply = false;
-
- if (config.TriggerStr.ToLower().Contains("start"))
- {
- return msg;
- }
-
-
- string index = config.TriggerStr.Split(",")[2];
- lock (BDphoto)
- {
- BDphoto.Add(index);
- }
-
- uList.Add(Convert.ToDouble(config.TriggerStr.Split(",")[3]) / 1000);
- vList.Add(Convert.ToDouble(config.TriggerStr.Split(",")[4]) / 1000);
-
- var sourceData = config.TriggerSource.Split(':');
- string ip = "";
- int port = 0;
- if (sourceData.Length >= 2)
- {
- ip = sourceData[0];
- port = int.Parse(sourceData[1]);
- }
-
- waitBD(index + "over");
- TcpListenerx.WriteAndRead(config.TriggerStr + ",OK", out _, out _, false, ip, port);
- return msg;
- }
-
- [ProcessMethod("ImageCheck", "GetProductBarcode_P0", "宸ヤ綅0鑾峰彇浜у搧鏉$爜", InvokeType.TestInvoke)]
- public ResponseMessage GetProductBarcode_P0(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
-
- if (config is IImageCheckOperationConfig opConfig)
- {
- try
- {
- var results = opConfig.Products.Select(u =>
- {
- DetectResult result = new DetectResult();
- result.PID = u.PID;
- result.Specs = GetSpecListFromConfigSelection(opConfig.SpecCollection);
- return result;
- }).ToList();
-
- msg.DataObj = results;
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- var ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", opConfig.ImageSet.HImage } }, new List<string>() { "OUTPUT_Flag", "OUTPUT_Results", "OUTPUT_Barcode" });
-
- if (!ret.Item1 || ret.Item2["OUTPUT_Flag"].I != 1)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0鏉$爜妫�娴嬪伐鍏疯繍琛屽け璐ワ紝{ret.Item4}");
- msg.Result = -1;
- return msg;
- }
-
- string barcode = ret.Item2["OUTPUT_Barcode"].S;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Action, $"鏉$爜鑾峰彇涓簕barcode}");
-
- string barcode1 = barcode.Split(',')[0];
- string barcode2 = barcode.Split(',')[1];
-
- if (barcode.Contains("NOREAD"))
- {
- msg.Result = -1;
- msg.Message = "鏉$爜璇诲彇澶辫触";
- }
-
- opConfig.Products[0].SN = barcode1;
- opConfig.Products[0].Details.ForEach(u => u.SN = barcode1);
- UpdateProductSNIntoDB(opConfig.Products[0].PID, barcode1);
-
- opConfig.Products[1].SN = barcode2;
- opConfig.Products[1].Details.ForEach(u => u.SN = barcode2);
- UpdateProductSNIntoDB(opConfig.Products[1].PID, barcode2);
-
-
- }
- catch (Exception e)
- {
- msg.Result = -1;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏉$爜寮傚父 {e.ToString()}");
- }
-
- }
-
- return msg;
- }
-
-
-
- List<double> xList = new List<double>();
- List<double> yList = new List<double>();
- List<double> uList = new List<double>();
- List<double> vList = new List<double>();
- List<string> BDphoto = new List<string>();
- object bdobject = new object();
-
- public bool waitBD(string index)
- {
- DateTime dt = DateTime.Now;
- while ((DateTime.Now - dt).TotalMilliseconds < AOI3BConfig1.PhotolayoutTime)
- {
- lock (BDphoto)
- {
- if (BDphoto.Contains(index))
- {
- return true;
- }
- }
- Thread.Sleep(10);
- }
- return false;
- }
-
-
-
-
- public ResponseMessage PositionCheck_P0BD1(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- bool issave = true;
- ResponseMessage msg = new ResponseMessage();
- if (config is IImageCheckOperationConfig opConfig)
- {
- var camera = invokeDevice as CameraBase;
-
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"P0閰嶇疆鐩告満涓虹┖锛岃妫�鏌ラ厤缃�");
- msg.DataStr = "";
- return msg;
- }
-
-
- for (int i = 0; i < 9; i++)
- {
-
- if (!waitBD((i + 1).ToString()))
- {
- issave = false;
- break;
- }
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, AOI3BConfig1.P0SnapshotOpConfig);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0妫�娴嬫爣瀹�1鍙栧儚寮傚父锛寋ex.GetExceptionMessage()}");
- return msg;
- }
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", imgSet.HImage } }, new List<string>() { "OUTPUT_Results", }, null);
-
- if (!ret.Item1)
- {
- issave = false;
- break;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var datas = ret.Item2[$"OUTPUT_Results"].HTupleToDouble();
- if (datas == null || datas.Contains(-999) || datas.Count < 2)
- {
- issave = false;
- break;
- }
- xList.Add(datas[0]);
- yList.Add(datas[1]);
-
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"宸ヤ綅0妫�娴嬫爣瀹�1 搴忓彿{(i + 1).ToString()}杈撳嚭鏁版嵁{string.Join(",", datas)}");
- }
-
- lock (BDphoto)
- {
- BDphoto.Add((i + 1).ToString() + "over");
- }
-
- }
-
- if (xList.Count == 9 && yList.Count == 9 && uList.Count == 9 && vList.Count == 9)
- {
-
-
- //HOperatorSet.VectorToHomMat2d(new HTuple(uList.ToArray()), new HTuple(vList.ToArray()), new HTuple(xList.ToArray()), new HTuple(yList.ToArray()), out HTuple matrix);
- HOperatorSet.VectorToHomMat2d(new HTuple(xList.ToArray()), new HTuple(yList.ToArray()), new HTuple(uList.ToArray()), new HTuple(vList.ToArray()), out HTuple matrix);
- double sum = 0;
- for (int i = 0; i < xList.Count; i++)
- {
- HOperatorSet.AffineTransPoint2d(matrix, uList[i], vList[i], out HTuple m, out HTuple n);
-
- sum += Math.Sqrt((Math.Pow((m.D - xList[i]), 2) + Math.Pow((n.D - yList[i]), 2)));
- }
- sum = (sum / (double)xList.Count);
- var Matrix = matrix.HTupleToDouble();
- AOI3BConfig1.BDBD = Matrix;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏍囧畾1缁撴灉OK,鏁版嵁:{string.Join(",", Matrix)}; 鏍囧畾鐐规暟閲�:{xList.Count}; 鍗曠偣璇樊:{sum.ToString()}鑴夊啿");
-
-
-
- //msg.IsReply = true;
- //msg.DataStr = config.TriggerStr + ",OK";
- }
- else
- {
- issave = false;
- msg.IsReply = false;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾1澶辫触,鏁版嵁缂哄け");
- }
-
-
- for (int i = 9; i < 12; i++)
- {
-
- if (!waitBD((i + 1).ToString()))
- {
- issave = false;
- break;
- }
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, AOI3BConfig1.P0SnapshotOpConfig);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0妫�娴嬫爣瀹�1鍙栧儚寮傚父锛寋ex.GetExceptionMessage()}");
- return msg;
- }
-
- var tool = GetHalconTool(null, "", opConfig.AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- ret = tool.RunProcedure(null, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", imgSet.HImage } }, new List<string>() { "OUTPUT_Results", }, null);
-
- if (!ret.Item1)
- {
- issave = false;
- break;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var datas = ret.Item2[$"OUTPUT_Results"].HTupleToDouble();
- if (datas == null || datas.Contains(-999) || datas.Count < 2)
- {
- issave = false;
- break;
- }
- xList.Add(datas[0]);
- yList.Add(datas[1]);
-
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"宸ヤ綅0妫�娴嬫爣瀹�2 搴忓彿{(i + 1).ToString()}杈撳嚭鏁版嵁{string.Join(",", datas)}");
- }
-
- lock (BDphoto)
- {
- BDphoto.Add((i + 1).ToString() + "over");
- }
-
- }
-
-
-
- if (xList.Count == 12 && yList.Count == 12 && uList.Count == 12 && vList.Count == 12)
- {
- List<double> xList2 = new List<double>() { xList[9], xList[10], xList[11] };
- List<double> yList2 = new List<double>() { yList[9], yList[10], yList[11] };
-
- //HOperatorSet.AffineTransPoint2d(new HTuple(AOI3BConfig1.BDBD.ToArray()), new HTuple(xList2.ToArray()), new HTuple(yList2.ToArray()), out HTuple qx, out HTuple qy);
-
- ////HOperatorSet.GenRegionPolygon(out HObject Region, new HTuple(xList2.ToArray()), new HTuple(yList2.ToArray()));
- //HOperatorSet.GenRegionPolygon(out HObject Region, qx, qy);
- //HOperatorSet.GenContourRegionXld(Region, out HObject Contours, "border");
-
- //HOperatorSet.FitCircleContourXld(Contours, "algebraic", -1, 0, 0, 3, 2, out HTuple Row, out HTuple column, out HTuple Radius, out HTuple StartPhi, out HTuple EndPhi, out HTuple PointOrder);
-
- HOperatorSet.AffineTransPoint2d(new HTuple(AOI3BConfig1.BDBD.ToArray()), new HTuple(xList2.ToArray()), new HTuple(yList2.ToArray()), out HTuple qx, out HTuple qy);
- HOperatorSet.GenContourPolygonXld(out HObject Region, qx, qy);
- HOperatorSet.FitCircleContourXld(Region, "algebraic", -1, 0, 0, 3, 2, out HTuple Row, out HTuple column, out HTuple Radius, out HTuple StartPhi, out HTuple EndPhi, out HTuple PointOrder);
-
-
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"鏍囧畾2缁撴灉OK :X杞磠Row.D},Y杞磠column.D}");
- AOI3BConfig1.BDYX = new List<double>() { Row.D, column.D };
- //SaveProcessConfig(AOI3BConfig1);
-
- //msg.IsReply = true;
- //msg.DataStr = config.TriggerStr + ",OK";
- }
- else
- {
- issave = false;
- msg.IsReply = false;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鏍囧畾澶辫触,鏁版嵁缂哄け");
- }
-
-
-
-
- if (issave)
- {
- SaveProcessConfig(AOI3BConfig1);
- msg.IsReply = true;
- msg.DataStr = config.TriggerStr + ",OK";
- }
- else
- {
- msg.IsReply = true;
- msg.DataStr = config.TriggerStr + ",NG";
- }
-
- }
-
- return msg;
- }
-
-
- public ResponseMessage PositionCheck_P0BD2(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice)
- {
- ResponseMessage msg = new ResponseMessage();
- if (config is IImageCheckOperationConfig opConfig)
- {
- var camera = invokeDevice as CameraBase;
- if (camera == null)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"P0閰嶇疆鐩告満涓虹┖锛岃妫�鏌ラ厤缃�");
- msg.DataStr = "";
- return msg;
- }
-
-
- for (int i = 12; i < 13; i++)
- {
- if (!waitBD((i + 1).ToString()))
- {
- break;
- }
-
- IImageSet imgSet = null;
- try
- {
- imgSet = CollectHImage(camera, AOI3BConfig1.P0SnapshotOpConfig);
- }
- catch (Exception ex)
- {
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"宸ヤ綅0妫�娴嬫爣瀹�2鍙栧儚寮傚父锛寋ex.GetExceptionMessage()}");
- return msg;
- }
-
- //INPUT_Tuple
- var tool = GetHalconTool(null, "", AOI3BConfig1.BD2AlgorithemPath);
- Tuple<bool, Dictionary<string, HTuple>, Dictionary<string, HObject>, string, int> ret = null;
-
- ret = tool.RunProcedure(new Dictionary<string, HTuple>() { { "INPUT_Tuple", AOI3BConfig1.BDBD.ToArray() } }, new Dictionary<string, HalconDotNet.HObject>() { { "INPUT_Image", imgSet.HImage } }, new List<string>() { "OUTPUT_Results_1", "OUTPUT_Results_2" }, null);
-
- if (!ret.Item1)
- {
- msg.IsReply = true;
- msg.DataStr = config.TriggerStr + ",NG";
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"鑴氭湰{opConfig.AlgorithemPath}杩愯寮傚父锛寋ret.Item4}");
- }
- else
- {
- var datas = ret.Item2[$"OUTPUT_Results_2"].HTupleToDouble();
-
- AOI3BConfig1.BDMD = datas;
- LogAsync(DateTime.Now, EnumHelper.LogLevel.Detail, $"宸ヤ綅0妫�娴嬫爣瀹�2 搴忓彿{(i + 1).ToString()}杈撳嚭鏁版嵁{string.Join(",", datas)}");
-
- msg.IsReply = true;
- msg.DataStr = config.TriggerStr + ",OK";
- SaveProcessConfig(AOI3BConfig1);
- }
-
- lock (BDphoto)
- {
- BDphoto.Add((i + 1).ToString() + "over");
- }
- }
-
- }
- return msg;
- }
-
-
- }
-}
diff --git a/src/Bro.M141_AOI3B.Process/Bro.M141_AOI3B.Process.csproj b/src/Bro.M141_AOI3B.Process/Bro.M141_AOI3B.Process.csproj
deleted file mode 100644
index e15388a..0000000
--- a/src/Bro.M141_AOI3B.Process/Bro.M141_AOI3B.Process.csproj
+++ /dev/null
@@ -1,36 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- <BaseOutputPath>..\</BaseOutputPath>
- <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Bro.M141.Process\Bro.M141.Process.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="Bro.Common.Device">
- <HintPath>..\..\libs\PFW\Bro.Common.Device.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Common.Model">
- <HintPath>..\..\libs\PFW\Bro.Common.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.DataBase.Model">
- <HintPath>..\..\libs\PFW\Bro.DataBase.Model.dll</HintPath>
- </Reference>
- <Reference Include="Bro.Process">
- <HintPath>..\..\libs\PFW\Bro.Process.dll</HintPath>
- </Reference>
- <Reference Include="Bro.UI.Model.Winform">
- <HintPath>..\..\libs\PFW\Bro.UI.Model.Winform.dll</HintPath>
- </Reference>
- <Reference Include="halcondotnet">
- <HintPath>..\..\libs\halcon12\halcondotnet.dll</HintPath>
- </Reference>
- </ItemGroup>
-
-</Project>
diff --git a/src/Bro.M141_AOI3B.Process/Properties/launchSettings.json b/src/Bro.M141_AOI3B.Process/Properties/launchSettings.json
deleted file mode 100644
index 0471865..0000000
--- a/src/Bro.M141_AOI3B.Process/Properties/launchSettings.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "profiles": {
- "Bro.M141_AOI3B.Process": {
- "commandName": "Project"
- },
- "Main": {
- "commandName": "Executable",
- "executablePath": "..\\net6.0-windows10.0.19041.0\\Bro.UI.Main.exe"
- }
- }
-}
\ No newline at end of file
diff --git a/src/Bro.Process.dll b/src/Bro.Process.dll
deleted file mode 100644
index 0c4a5af..0000000
--- a/src/Bro.Process.dll
+++ /dev/null
Binary files differ
--
Gitblit v1.8.0