From aaae1139f2bb3a55910fff0aa907b3ba6395deea Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期二, 30 六月 2020 08:54:06 +0800 Subject: [PATCH] 添加goactor驱动 --- src/Bro.Device.HikCamera/Bro.Device.HikCamera.csproj | 43 + src/Bro.Device.SchneiderPLC/Bro.Device.SchneiderPLC.csproj | 40 + src/Bro.M071.Process/UI/M071_MainForm.Designer.cs | 39 + libs/gocator/GoSdk.dll | 0 src/Bro.M071.Process/packages.config | 2 src/GocatorTest/Properties/Settings.settings | 7 libs/gocator/GoSdkNet.dll | 0 src/Bro.Device.HikCamera/HikCameraDriver.cs | 64 - libs/gocator/kApi.dll | 0 src/Bro.Process.DBManager/Bro.Process.DataBase.csproj | 40 + src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj | 40 + src/Bro.M071.Process/M071Process.cs | 49 + src/GocatorTest/Form1.Designer.cs | 61 + src/Bro.M071.Process.Model/Bro.M071.Model.csproj | 40 + src/Bro.M071.Process/UI/M071_MainForm.cs | 22 src/GocatorTest/Properties/Resources.resx | 117 +++ src/Bro.Device.Gocator/Bro.Device.Gocator.csproj | 48 + libs/gocator/msvcp120.dll | 0 src/Bro.Common.Model/Bro.Common.Model.csproj | 40 + src/Bro.UI.Device.Winform/CtrlCameraRunBase.cs | 12 src/GocatorTest/App.config | 6 src/Bro.UI.Config/App.config | 25 src/Bro.Process/Bro.Process.csproj | 40 + libs/gocator/msvcr120.dll | 0 src/Bro.Common.Device/Bro.Common.Device.csproj | 43 + src/GocatorTest/Properties/Resources.Designer.cs | 71 ++ src/Bro.M071.Process/Bro.M071.Process.csproj | 54 + src/Bro.UI.Config/MenuForms/FrmOperation.cs | 14 src/Bro.UI.Model.Winform/Bro.UI.Model.Winform.csproj | 40 + src/GocatorTest/Properties/Settings.Designer.cs | 30 src/GocatorTest/Properties/AssemblyInfo.cs | 36 + src/GocatorTest/Program.cs | 22 src/Bro.UI.Config/MenuForms/FrmOperation.resx | 4 src/Bro.Device.Gocator/kApi.dll | 0 src/GocatorTest/Form1.resx | 120 +++ libs/gocator/kApiNet.dll | 0 src/Bro.Device.Gocator/GocatorDriver.cs | 219 ++++++ src/Bro.UI.Device.Winform/CtrlCameraRunBase.Designer.cs | 16 src/Bro.Device.Gocator/GoSdk.dll | 0 src/Bro.M071.Process/UI/M071Node.cs | 15 src/GocatorTest/Form1.cs | 35 + src/Bro.Device.Gocator/msvcp120.dll | 0 src/Bro.UI.Device.Winform/Bro.UI.Device.Winform.csproj | 40 + src/Bro.Common.Device/DeviceBase/CameraBase.cs | 125 +++ M071.sln | 126 --- src/Bro.Device.Gocator/msvcr120.dll | 0 src/GocatorTest/GocatorTest.csproj | 94 ++ src/Bro.Common.Model/Interface/IRunCtrl.cs | 16 src/Bro.Device.Gocator/GocatorConfig.cs | 66 + src/Bro.UI.Config/Bro.UI.Config.csproj | 77 ++ 50 files changed, 1,766 insertions(+), 232 deletions(-) diff --git a/M071.sln b/M071.sln index 78da12e..a9fb730 100644 --- a/M071.sln +++ b/M071.sln @@ -31,184 +31,74 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.Device.Gocator", "src\Bro.Device.Gocator\Bro.Device.Gocator.csproj", "{112009F0-7902-454B-9A6C-A3AFC8FA8FFF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GocatorTest", "src\GocatorTest\GocatorTest.csproj", "{CD0809C4-6E03-4F04-8806-59C29A4C54CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|Any CPU.Build.0 = Debug|Any CPU {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|x64.ActiveCfg = Debug|Any CPU {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|x64.Build.0 = Debug|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|x86.ActiveCfg = Debug|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug|x86.Build.0 = Debug|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|Any CPU.Build.0 = Release|Any CPU {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|x64.ActiveCfg = Release|Any CPU {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|x64.Build.0 = Release|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|x86.ActiveCfg = Release|Any CPU - {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Release|x86.Build.0 = Release|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|x64.ActiveCfg = Debug|Any CPU {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|x64.Build.0 = Debug|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|x86.ActiveCfg = Debug|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug|x86.Build.0 = Debug|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|Any CPU.Build.0 = Release|Any CPU {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|x64.ActiveCfg = Release|Any CPU {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|x64.Build.0 = Release|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|x86.ActiveCfg = Release|Any CPU - {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Release|x86.Build.0 = Release|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|Any CPU.Build.0 = Debug|Any CPU {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|x64.ActiveCfg = Debug|Any CPU {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|x64.Build.0 = Debug|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|x86.ActiveCfg = Debug|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug|x86.Build.0 = Debug|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|Any CPU.Build.0 = Release|Any CPU {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|x64.ActiveCfg = Release|Any CPU {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|x64.Build.0 = Release|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|x86.ActiveCfg = Release|Any CPU - {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Release|x86.Build.0 = Release|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|Any CPU.Build.0 = Debug|Any CPU {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|x64.ActiveCfg = Debug|Any CPU {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|x64.Build.0 = Debug|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|x86.ActiveCfg = Debug|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug|x86.Build.0 = Debug|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|Any CPU.Build.0 = Release|Any CPU {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|x64.ActiveCfg = Release|Any CPU {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|x64.Build.0 = Release|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|x86.ActiveCfg = Release|Any CPU - {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Release|x86.Build.0 = Release|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|x64.ActiveCfg = Debug|Any CPU {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|x64.Build.0 = Debug|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|x86.ActiveCfg = Debug|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug|x86.Build.0 = Debug|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|Any CPU.Build.0 = Release|Any CPU {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|x64.ActiveCfg = Release|Any CPU {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|x64.Build.0 = Release|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|x86.ActiveCfg = Release|Any CPU - {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Release|x86.Build.0 = Release|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x64.ActiveCfg = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x64.Build.0 = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x86.ActiveCfg = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x86.Build.0 = Debug|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|Any CPU.Build.0 = Release|Any CPU + {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x64.ActiveCfg = Debug|x64 + {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x64.Build.0 = Debug|x64 {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|x64.ActiveCfg = Release|Any CPU {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|x64.Build.0 = Release|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|x86.ActiveCfg = Release|Any CPU - {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|x86.Build.0 = Release|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|Any CPU.Build.0 = Debug|Any CPU {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|x64.ActiveCfg = Debug|Any CPU {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|x64.Build.0 = Debug|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug|x86.Build.0 = Debug|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|Any CPU.Build.0 = Release|Any CPU {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|x64.ActiveCfg = Release|Any CPU {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|x64.Build.0 = Release|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|x86.ActiveCfg = Release|Any CPU - {E6429C64-92B3-46A2-B35E-579856D47F62}.Release|x86.Build.0 = Release|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|x64.ActiveCfg = Debug|Any CPU {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|x64.Build.0 = Debug|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|x86.ActiveCfg = Debug|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug|x86.Build.0 = Debug|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|Any CPU.Build.0 = Release|Any CPU {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|x64.ActiveCfg = Release|Any CPU {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|x64.Build.0 = Release|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|x86.ActiveCfg = Release|Any CPU - {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Release|x86.Build.0 = Release|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|x64.ActiveCfg = Debug|Any CPU {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|x64.Build.0 = Debug|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|x86.ActiveCfg = Debug|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|x86.Build.0 = Debug|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|Any CPU.Build.0 = Release|Any CPU {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|x64.ActiveCfg = Release|Any CPU {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|x64.Build.0 = Release|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|x86.ActiveCfg = Release|Any CPU - {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|x86.Build.0 = Release|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|Any CPU.Build.0 = Debug|Any CPU {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|x64.ActiveCfg = Debug|Any CPU {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|x64.Build.0 = Debug|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|x86.ActiveCfg = Debug|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|x86.Build.0 = Debug|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|Any CPU.Build.0 = Release|Any CPU {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x64.ActiveCfg = Release|Any CPU {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x64.Build.0 = Release|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x86.ActiveCfg = Release|Any CPU - {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x86.Build.0 = Release|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|x64.ActiveCfg = Debug|Any CPU {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|x64.Build.0 = Debug|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|x86.ActiveCfg = Debug|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|x86.Build.0 = Debug|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|Any CPU.Build.0 = Release|Any CPU {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x64.ActiveCfg = Release|Any CPU {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x64.Build.0 = Release|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x86.ActiveCfg = Release|Any CPU - {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x86.Build.0 = Release|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|x64.ActiveCfg = Debug|Any CPU {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|x64.Build.0 = Debug|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|x86.ActiveCfg = Debug|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|x86.Build.0 = Debug|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|Any CPU.Build.0 = Release|Any CPU {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|x64.ActiveCfg = Release|Any CPU {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|x64.Build.0 = Release|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|x86.ActiveCfg = Release|Any CPU - {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|x86.Build.0 = Release|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|x64.ActiveCfg = Debug|Any CPU {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|x64.Build.0 = Debug|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|x86.ActiveCfg = Debug|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug|x86.Build.0 = Debug|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|Any CPU.Build.0 = Release|Any CPU {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|x64.ActiveCfg = Release|Any CPU {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|x64.Build.0 = Release|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|x86.ActiveCfg = Release|Any CPU - {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Release|x86.Build.0 = Release|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|Any CPU.Build.0 = Debug|Any CPU {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|x64.ActiveCfg = Debug|Any CPU {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|x64.Build.0 = Debug|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|x86.ActiveCfg = Debug|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug|x86.Build.0 = Debug|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|Any CPU.Build.0 = Release|Any CPU {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|x64.ActiveCfg = Release|Any CPU {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|x64.Build.0 = Release|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|x86.ActiveCfg = Release|Any CPU - {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Release|x86.Build.0 = Release|Any CPU + {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug|x64.ActiveCfg = Debug|x64 + {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug|x64.Build.0 = Debug|x64 + {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|x64.ActiveCfg = Release|x64 + {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/libs/gocator/GoSdk.dll b/libs/gocator/GoSdk.dll new file mode 100644 index 0000000..48da5a1 --- /dev/null +++ b/libs/gocator/GoSdk.dll Binary files differ diff --git a/libs/gocator/GoSdkNet.dll b/libs/gocator/GoSdkNet.dll new file mode 100644 index 0000000..0b7da13 --- /dev/null +++ b/libs/gocator/GoSdkNet.dll Binary files differ diff --git a/libs/gocator/kApi.dll b/libs/gocator/kApi.dll new file mode 100644 index 0000000..bf166fe --- /dev/null +++ b/libs/gocator/kApi.dll Binary files differ diff --git a/libs/gocator/kApiNet.dll b/libs/gocator/kApiNet.dll new file mode 100644 index 0000000..972a085 --- /dev/null +++ b/libs/gocator/kApiNet.dll Binary files differ diff --git a/libs/gocator/msvcp120.dll b/libs/gocator/msvcp120.dll new file mode 100644 index 0000000..4ea1efa --- /dev/null +++ b/libs/gocator/msvcp120.dll Binary files differ diff --git a/libs/gocator/msvcr120.dll b/libs/gocator/msvcr120.dll new file mode 100644 index 0000000..d711c92 --- /dev/null +++ b/libs/gocator/msvcr120.dll Binary files differ diff --git a/src/Bro.Common.Device/Bro.Common.Device.csproj b/src/Bro.Common.Device/Bro.Common.Device.csproj index b01c57c..bc55f15 100644 --- a/src/Bro.Common.Device/Bro.Common.Device.csproj +++ b/src/Bro.Common.Device/Bro.Common.Device.csproj @@ -38,6 +38,49 @@ <PropertyGroup> <AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> <HintPath>..\..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath> diff --git a/src/Bro.Common.Device/DeviceBase/CameraBase.cs b/src/Bro.Common.Device/DeviceBase/CameraBase.cs index 5673c27..b479b33 100644 --- a/src/Bro.Common.Device/DeviceBase/CameraBase.cs +++ b/src/Bro.Common.Device/DeviceBase/CameraBase.cs @@ -13,6 +13,7 @@ using System.Drawing.Imaging; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using static Bro.Common.Helper.EnumHelper; @@ -483,6 +484,110 @@ private System.Threading.Timer clearImageTimer = null; #endregion + + #region 鍥剧墖杞崲 + [DllImport("kernel32.dll", EntryPoint = "CopyMemory", SetLastError = false)] + public static extern void CopyMemory(IntPtr dest, IntPtr src, long count); + + protected async void Generate8GrayImageByPointer(int width, int height, IntPtr dataPtr, string imgSetId) + { + await Task.Run(() => + { + //************************Mono8 杞� Bitmap******************************* + Bitmap bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed); + Bitmap showImage = new Bitmap(width, height, PixelFormat.Format8bppIndexed); + + ColorPalette cp = bmp.Palette; + for (int i = 0; i < 256; i++) + { + cp.Entries[i] = Color.FromArgb(i, i, i); + } + bmp.Palette = cp; + + ColorPalette cp1 = showImage.Palette; + for (int i = 0; i < 256; i++) + { + cp1.Entries[i] = Color.FromArgb(i, i, i); + } + showImage.Palette = cp1; + + long[] ptr = new long[3]; + Rectangle rect = new Rectangle(0, 0, width, height); + BitmapData bitmapData = bmp.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); + BitmapData showImageData = showImage.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); + int PixelSize = Bitmap.GetPixelFormatSize(bitmapData.PixelFormat) / 8; + + if (width % 4 == 0) + { + CopyMemory(bitmapData.Scan0, dataPtr, width * height * PixelSize); + CopyMemory(showImageData.Scan0, dataPtr, width * height * PixelSize); + } + else + { + ptr[0] = bitmapData.Scan0.ToInt64(); + ptr[1] = showImageData.Scan0.ToInt64(); + ptr[2] = (long)dataPtr; + for (int i = 0; i < height - 1; i++) + { + ptr[2] += width; + + CopyMemory((IntPtr)ptr[0], (IntPtr)ptr[2], width * PixelSize); + CopyMemory((IntPtr)ptr[1], (IntPtr)ptr[2], width * PixelSize); + ptr[0] += bitmapData.Stride; + ptr[1] += showImageData.Stride; + } + } + bmp.UnlockBits(bitmapData); + showImage.UnlockBits(showImageData); + + SaveOriginImage(bmp, showImage, imgSetId); + }); + } + + protected async void Generate16GrayImageByPointer(int width, int height, IntPtr dataPtr, string imgSetId) + { + await Task.Run(() => + { + int widthIn4 = (int)Math.Ceiling(width / 4.0) * 4; + + Bitmap bmp = new Bitmap(widthIn4, height, PixelFormat.Format48bppRgb); + Bitmap showImage = new Bitmap(widthIn4, height, PixelFormat.Format48bppRgb); + + Rectangle rect = new Rectangle(0, 0, widthIn4, height); + BitmapData bitmapData = bmp.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format48bppRgb); + BitmapData showImageData = showImage.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format48bppRgb); + unsafe + { + byte* data = (byte*)dataPtr; + byte* bitmapBuffer = (byte*)bitmapData.Scan0; + byte* showBitmapBuffer = (byte*)showImageData.Scan0; + + //Parallel.For(0, height, i => + // { + // Parallel.For(0, width, j => + // { + // showBitmapBuffer[(i * widthIn4 + j) * 6] = bitmapBuffer[(i * widthIn4 + j) * 6] = data[(i * width + j) * 2]; + // showBitmapBuffer[(i * widthIn4 + j) * 6 + 1] = bitmapBuffer[(i * widthIn4 + j) * 6 + 1] = data[(i * width + j) * 2 + 1]; + // }); + // }); + + Parallel.For(0, width * height, i => + { + int index = (i + 1) % width + widthIn4 * ((i + 1) / width) - 1; + + showBitmapBuffer[index * 6] = data[i * 2]; + showBitmapBuffer[index * 6 + 1] = data[i * 2 + 1]; + }); + } + + bmp.UnlockBits(bitmapData); + showImage.UnlockBits(showImageData); + + //showImage.Save(@"D:\1.bmp", ImageFormat.Bmp); + SaveOriginImage(bmp, showImage, imgSetId); + }); + } + #endregion } #region Config @@ -496,7 +601,7 @@ [Category("鍙栧儚閰嶇疆")] [Description("鏇濆厜")] [DisplayName("鏇濆厜")] - public float Exposure + public virtual float Exposure { get => exposure; set @@ -515,17 +620,17 @@ [Category("鍙栧儚閰嶇疆")] [Description("澧炵泭")] [DisplayName("澧炵泭")] - public float Gain { get; set; } + public virtual float Gain { get; set; } [Category("鍙栧儚閰嶇疆")] [Description("鏇濆厜淇敼鍚庣瓑寰呮椂闂达紝鍗曚綅ms銆傞拡瀵归儴鍒嗗満鏅‘淇濇洕鍏変慨鏀瑰強鏃剁敓鏁堛��")] [DisplayName("鏇濆厜绛夊緟")] - public int ExposureWaitTime { get; set; } + public virtual int ExposureWaitTime { get; set; } [Category("鍙栧儚閰嶇疆")] [Description("鎷嶆憚鍚庢洕鍏夊�笺�傚彲鍦ㄤ竴娆℃媿鎽勫悗灏嗘洕鍏変慨鏀逛负涓嬫鎷嶆憚鐨勬洕鍏夊�硷紝鑺傜害鏇濆厜鐢熸晥鏃堕棿銆�")] [DisplayName("鎷嶆憚鍚庢洕鍏�")] - public float ExposureAfterSnap { get; set; } + public virtual float ExposureAfterSnap { get; set; } [Category("绠楁硶閰嶇疆")] [Description("绠楁硶璺緞")] @@ -581,35 +686,35 @@ [Category("鐩告満璁剧疆")] [Description("鐩告満IP鍦板潃")] [DisplayName("鐩告満IP鍦板潃")] - public string CameraIP { get; set; } + public virtual string CameraIP { get; set; } [Category("鐩告満璁剧疆")] [Description("涓婁綅鏈篒P鍦板潃")] [DisplayName("涓婁綅鏈篒P鍦板潃")] - public string ComputerIP { get; set; } + public virtual string ComputerIP { get; set; } [Category("淇濆瓨璁剧疆")] [Description("鍥剧墖淇濆瓨鐩綍")] [DisplayName("鍥剧墖淇濆瓨鐩綍")] [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))] - public string ImgDirectory { get; set; } = @"../Images"; + public virtual string ImgDirectory { get; set; } = @"../Images"; [Category("淇濆瓨璁剧疆")] [Description("鍥剧墖淇濆瓨澶╂暟")] [DisplayName("鍥剧墖淇濆瓨澶╂暟")] - public int SaveImageDayLimit { get; set; } = 0; + public virtual int SaveImageDayLimit { get; set; } = 0; [Category("淇濆瓨璁剧疆")] [Description("鍥剧墖淇濆瓨榛樿閰嶇疆锛屼富瑕佺敤浜庣‖瑙﹀彂绛夋病鏈夋槑纭搷浣滈厤缃鏄庣殑鍥剧墖淇濆瓨")] [DisplayName("鍥剧墖淇濆瓨榛樿閰嶇疆")] [TypeConverter(typeof(ComplexObjectConvert))] [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] - public ImageSaveOption ImageSaveOption { get; set; } = new ImageSaveOption(); + public virtual ImageSaveOption ImageSaveOption { get; set; } = new ImageSaveOption(); [Category("鎷嶆憚璁剧疆")] [Description("榛樿鏇濆厜鍊硷紝鐩告満寮�鍚悗灏辫缃鏇濆厜鍊�")] [DisplayName("榛樿鏇濆厜鍊�")] - public float DefaultExposure { get; set; } + public virtual float DefaultExposure { get; set; } } #endregion diff --git a/src/Bro.Common.Model/Bro.Common.Model.csproj b/src/Bro.Common.Model/Bro.Common.Model.csproj index 1f91dd4..547c452 100644 --- a/src/Bro.Common.Model/Bro.Common.Model.csproj +++ b/src/Bro.Common.Model/Bro.Common.Model.csproj @@ -32,6 +32,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> <HintPath>..\..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath> diff --git a/src/Bro.Common.Model/Interface/IRunCtrl.cs b/src/Bro.Common.Model/Interface/IRunCtrl.cs index b450dfe..9b088f7 100644 --- a/src/Bro.Common.Model/Interface/IRunCtrl.cs +++ b/src/Bro.Common.Model/Interface/IRunCtrl.cs @@ -3,11 +3,17 @@ public interface IRunCtrl { IDevice Device { get; set; } + + //IOperationConfig OpConfig { get; set; } + + //void UploadOperationConfig(IOperationConfig opConfig); + + //IOperationConfig GetOperationConfig(); } - public interface IEditCtrl - { - IRunCtrl RunCtrl { get; set; } - IOperationConfig OpConfig { get; set; } - } + //public interface IEditCtrl + //{ + // IRunCtrl RunCtrl { get; set; } + // IOperationConfig OpConfig { get; set; } + //} } diff --git a/src/Bro.Device.Gocator/Bro.Device.Gocator.csproj b/src/Bro.Device.Gocator/Bro.Device.Gocator.csproj index c3a0b6a..ea7b73b 100644 --- a/src/Bro.Device.Gocator/Bro.Device.Gocator.csproj +++ b/src/Bro.Device.Gocator/Bro.Device.Gocator.csproj @@ -21,6 +21,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -30,9 +31,38 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <PlatformTarget>x64</PlatformTarget> + <OutputPath>bin\x64\Debug\</OutputPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <PlatformTarget>x64</PlatformTarget> + <OutputPath>bin\x64\Release\</OutputPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <PlatformTarget>x64</PlatformTarget> + <OutputPath>bin\x64\Debug1\</OutputPath> + </PropertyGroup> <ItemGroup> + <Reference Include="GoSdkNet"> + <HintPath>..\..\libs\gocator\GoSdkNet.dll</HintPath> + </Reference> + <Reference Include="kApiNet"> + <HintPath>..\..\libs\gocator\kApiNet.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> + <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> @@ -54,6 +84,24 @@ <Project>{1a3cbfe7-3f78-42c3-95c5-10360450dbea}</Project> <Name>Bro.Common.Model</Name> </ProjectReference> + <ProjectReference Include="..\Bro.UI.Device.Winform\Bro.UI.Device.Winform.csproj"> + <Project>{E6429C64-92B3-46A2-B35E-579856D47F62}</Project> + <Name>Bro.UI.Device.Winform</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="GoSdk.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + <Content Include="kApi.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + <Content Include="msvcp120.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + <Content Include="msvcr120.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/src/Bro.Device.Gocator/GoSdk.dll b/src/Bro.Device.Gocator/GoSdk.dll new file mode 100644 index 0000000..48da5a1 --- /dev/null +++ b/src/Bro.Device.Gocator/GoSdk.dll Binary files differ diff --git a/src/Bro.Device.Gocator/GocatorConfig.cs b/src/Bro.Device.Gocator/GocatorConfig.cs index 6dba56f..b6d73ac 100644 --- a/src/Bro.Device.Gocator/GocatorConfig.cs +++ b/src/Bro.Device.Gocator/GocatorConfig.cs @@ -1,7 +1,10 @@ 锘縰sing Bro.Common.Base; +using Bro.Common.Base.UI; using Bro.Common.Helper; +using Bro.Common.Interface; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,10 +14,73 @@ [Device("Gocator", "Gocator婵�鍏夋壂鎻忎华", EnumHelper.DeviceAttributeType.InitialConfig)] public class GocatorInitialConfig : CameraInitialConfigBase { + #region Not used + [Browsable(false)] + public override string SerialNum { get; set; } + [Browsable(false)] + public override string ComputerIP { get; set; } + #endregion + + [Category("璁$畻璁剧疆")] + [Description("true锛氳绠楁椂浣跨敤鍔犻�熷櫒锛宖alse锛氫笉浣跨敤鍔犻�熷櫒")] + [DefaultValue(false)] + public bool IsUseAccelerator { get; set; } = false; + + [Category("鎷嶆憚璁剧疆")] + [Description("榛樿Job")] + [DisplayName("榛樿Job")] + [DefaultValue("")] + public string DefaultJob { get; set; } = ""; + + [Category("鎷嶆憚璁剧疆")] + [Description("鍙栧儚瓒呮椂璁剧疆锛屽崟浣峬s")] + [DefaultValue(1000)] + public int SnapshotTimeout { get; set; } = 1000; + + //[Category("閲囧浘妯″紡")] + //[Description("鏄惁纭Е鍙戞ā寮忋�倀rue锛氱‖瑙﹀彂锛沠alse锛氳蒋瑙﹀彂")] + //[DisplayName("纭Е鍙�")] + //public bool IsHardwareTrigger { get; set; } = false; + + [Category("閲囧浘妯″紡")] + [Description("true锛氬紓姝�/琚姩閲囧浘妯″紡 false锛氬悓姝�/涓诲姩閲囧浘妯″紡")] + [DefaultValue(false)] + public bool IsAsyncMode { get; set; } = false; } [Device("Gocator", "Gocator婵�鍏夋壂鎻忎华", EnumHelper.DeviceAttributeType.OperationConfig)] public class GocatorOperationConfig : CameraOprerationConfigBase { + [Category("绠楁硶閰嶇疆")] + [Description("鍒囨崲Job鍚嶇О")] + public string JobName { get; set; } + + [Category("鍙栧儚閰嶇疆")] + [Description("true: 鍙栧儚鎿嶄綔 false: 涓嶆槸鍙栧儚鎿嶄綔")] + public bool IsSnapshotAction { get; set; } + + [Category("鍙栧儚閰嶇疆")] + [Description("true: 杩炴帴鎿嶄綔 false: 鏂紑杩炴帴鎿嶄綔")] + public bool IsOpenConnection { get; set; } + + public new string GetDisplayText() + { + return $"{(IsSnapshotAction ? "鍙栧儚鎿嶄綔" : "")} {(IsOpenConnection ? "寮�濮嬭繛鎺�" : "")} 绠楁硶锛歿AlgorithemPath}"; + } + + #region Not used + [Browsable(false)] + public override float ExposureAfterSnap { get; set; } + [Browsable(false)] + public override int ExposureWaitTime { get; set; } + [Browsable(false)] + public override float Gain { get; set; } + #endregion + } + + [Device("Gocator", "Gocator婵�鍏夋壂鎻忎华", EnumHelper.DeviceAttributeType.RunCtrl)] + public class GocatorRunCtrl : CtrlCameraRunBase + { + public GocatorRunCtrl(IDevice device) : base(device) { } } } diff --git a/src/Bro.Device.Gocator/GocatorDriver.cs b/src/Bro.Device.Gocator/GocatorDriver.cs index 0290bd1..bdfac10 100644 --- a/src/Bro.Device.Gocator/GocatorDriver.cs +++ b/src/Bro.Device.Gocator/GocatorDriver.cs @@ -1,9 +1,14 @@ 锘縰sing Bro.Common.Base; using Bro.Common.Helper; using Bro.Common.Interface; +using Lmi3d.GoSdk; +using Lmi3d.GoSdk.Messages; +using Lmi3d.Zen; +using Lmi3d.Zen.Io; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; @@ -12,34 +17,236 @@ [Device("Gocator", "Gocator婵�鍏夋壂鎻忎华", EnumHelper.DeviceAttributeType.Device)] public class GocatorDriver : CameraBase { + #region CameraBase public override IOperationConfig GetOperationConfigFromDevice() { - throw new NotImplementedException(); + var opConfig = new GocatorOperationConfig(); + GoSetup setup = sensor.Setup; + opConfig.Exposure = (float)setup.GetExposure(GoRole.Main); + opConfig.JobName = sensor.DefaultJob; + + return opConfig; } public override void Snapshot() { - throw new NotImplementedException(); + if (IIConfig.IsAsyncMode) + { + + } + else + { + GoDataSet dataSet = null; + + try + { + dataSet = system.ReceiveData(IIConfig.SnapshotTimeout); + } + catch (Exception ex) + { + LogAsync(DateTime.Now, $"{Name}鑾峰彇鍥惧儚寮傚父", ex.GetExceptionMessage()); + return; + } + + HandleGoData(dataSet); + } } + private void HandleGoData(GoDataSet dataSet) + { + if (dataSet == null) + return; + + for (UInt32 i = 0; i < dataSet.Count; i++) + { + GoDataMsg dataObj = (GoDataMsg)dataSet.Get(i); + switch (dataObj.MessageType) + { + //case GoDataMessageType.Stamp: + // { + // GoStampMsg stampMsg = (GoStampMsg)dataObj; + // for (UInt32 j = 0; j < stampMsg.Count; j++) + // { + // GoStamp stamp = stampMsg.Get(j); + // Console.WriteLine("Frame Index = {0}", stamp.FrameIndex); + // Console.WriteLine("Time Stamp = {0}", stamp.Timestamp); + // Console.WriteLine("Encoder Value = {0}", stamp.Encoder); + // } + // } + // break; + case GoDataMessageType.Surface: + { + GoSurfaceMsg surfaceMsg = (GoSurfaceMsg)dataObj; + long width = surfaceMsg.Width; + long height = surfaceMsg.Length; + long bufferSize = width * height; + IntPtr bufferPointer = surfaceMsg.Data; + + //Console.WriteLine("Whole Part Height Map received:"); + //Console.WriteLine(" Buffer width: {0}", width); + //Console.WriteLine(" Buffer height: {0}", height); + + //short[] ranges = new short[bufferSize]; + //Marshal.Copy(bufferPointer, ranges, 0, ranges.Length); + + Generate16GrayImageByPointer((int)(width / 1), (int)(height / 1), bufferPointer, ""); + } + break; + //case GoDataMessageType.SurfaceIntensity: + // { + // GoSurfaceIntensityMsg surfaceMsg = (GoSurfaceIntensityMsg)dataObj; + // long width = surfaceMsg.Width; + // long height = surfaceMsg.Length; + // long bufferSize = width * height; + // IntPtr bufferPointeri = surfaceMsg.Data; + + // //Console.WriteLine("Whole Part Intensity Image received:"); + // //Console.WriteLine(" Buffer width: {0}", width); + // //Console.WriteLine(" Buffer height: {0}", height); + // //byte[] ranges = new byte[bufferSize]; + // //Marshal.Copy(bufferPointeri, ranges, 0, ranges.Length); + // //GenerateGrayImageByPointer((int)width, (int)height, bufferPointeri, ""); + // } + // break; + } + } + } + + public override ImageSet Snapshot(IOperationConfig config) + { + ImageSet imgSet = base.Snapshot(config); + + return imgSet; + } + + + float _currentExposure = 0; + string _currentJob = ""; public override void UploadOperationConfig(IOperationConfig config) { - throw new NotImplementedException(); + if (config is GocatorOperationConfig opConfig) + { + if (opConfig.Exposure > 0 && opConfig.Exposure != _currentExposure) + { + sensor.Setup.SetExposure(GoRole.Main, opConfig.Exposure); + _currentExposure = opConfig.Exposure; + } + + if (!string.IsNullOrWhiteSpace(opConfig.JobName) && _currentJob != opConfig.JobName) + { + _currentJob = sensor.DefaultJob = opConfig.JobName; + } + + sensor.Flush(); + } } protected override void Init() { - throw new NotImplementedException(); + KApiLib.Construct(); + GoSdkLib.Construct(); + + system = new GoSystem(); + + if (IIConfig.IsUseAccelerator) + { + accelerator = new GoAccelerator(); + } + + KIpAddress ip = KIpAddress.Parse(IConfig.CameraIP); + + if (IIConfig.IsUseAccelerator) + { + accelerator.Start(); + } + + sensor = system.FindSensorByIpAddress(ip); + + if (IIConfig.IsUseAccelerator) + { + accelerator.Attach(sensor); + } + sensor.Connect(); + + if (IIConfig.IsUseAccelerator) + { + sensor.Flush(); + accelerator.Start(); + } + + sensor.Setup.ScanMode = GoMode.Surface; + + system.EnableData(true); + + if (IIConfig.IsAsyncMode) + { + system.SetDataHandler(onData); + } + + _currentExposure = (float)sensor.Setup.GetExposure(GoRole.Main); + if (IIConfig.DefaultExposure > 0 && _currentExposure != IIConfig.DefaultExposure) + { + sensor.Setup.SetExposure(GoRole.Main, IIConfig.DefaultExposure); + _currentExposure = (float)sensor.Setup.GetExposure(GoRole.Main); + } + + _currentJob = sensor.DefaultJob; + if (!string.IsNullOrWhiteSpace(IIConfig.DefaultJob) && _currentJob != IIConfig.DefaultJob) + { + _currentJob = sensor.DefaultJob = IIConfig.DefaultJob; + } + + sensor.Flush(); + } + + protected override void Start() + { + base.Start(); + + if (IIConfig.IsAsyncMode) + system.Start(); + } + + protected override void Stop() + { + base.Stop(); + + if (IIConfig.IsAsyncMode) + system.Stop(); + + if (IIConfig.IsUseAccelerator) + { + accelerator.Stop(); + } + + sensor.Disconnect(); } protected override void Pause() { - throw new NotImplementedException(); } protected override void Resume() { - throw new NotImplementedException(); + } + #endregion + + GoSystem system = null; + GoAccelerator accelerator = null; + GoSensor sensor = null; + + public GocatorInitialConfig IIConfig + { + get => InitialConfig as GocatorInitialConfig; + } + + /// <summary> + /// 寮傛妯″紡鑾峰彇鏁版嵁 + /// </summary> + /// <param name="data"></param> + private void onData(KObject data) + { + GoDataSet dataSet = (GoDataSet)data; } } } diff --git a/src/Bro.Device.Gocator/kApi.dll b/src/Bro.Device.Gocator/kApi.dll new file mode 100644 index 0000000..bf166fe --- /dev/null +++ b/src/Bro.Device.Gocator/kApi.dll Binary files differ diff --git a/src/Bro.Device.Gocator/msvcp120.dll b/src/Bro.Device.Gocator/msvcp120.dll new file mode 100644 index 0000000..4ea1efa --- /dev/null +++ b/src/Bro.Device.Gocator/msvcp120.dll Binary files differ diff --git a/src/Bro.Device.Gocator/msvcr120.dll b/src/Bro.Device.Gocator/msvcr120.dll new file mode 100644 index 0000000..d711c92 --- /dev/null +++ b/src/Bro.Device.Gocator/msvcr120.dll Binary files differ diff --git a/src/Bro.Device.HikCamera/Bro.Device.HikCamera.csproj b/src/Bro.Device.HikCamera/Bro.Device.HikCamera.csproj index 0850bff..fe771d3 100644 --- a/src/Bro.Device.HikCamera/Bro.Device.HikCamera.csproj +++ b/src/Bro.Device.HikCamera/Bro.Device.HikCamera.csproj @@ -31,6 +31,49 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> diff --git a/src/Bro.Device.HikCamera/HikCameraDriver.cs b/src/Bro.Device.HikCamera/HikCameraDriver.cs index 57aebcd..02864f5 100644 --- a/src/Bro.Device.HikCamera/HikCameraDriver.cs +++ b/src/Bro.Device.HikCamera/HikCameraDriver.cs @@ -324,7 +324,7 @@ NewImageSet(set); OnHImageOutput?.BeginInvoke(this, hImage, set.Id, null, null); - HikToBitmap(nWidth, nHeight, pData, set.Id); + Generate8GrayImageByPointer(nWidth, nHeight, pData, set.Id); } else { @@ -382,7 +382,7 @@ uint nHeight = pFrameInfo.nHeight; //HikToBitmap(pFrameInfo, frameInfo.pBufAddr); - HikToBitmap((int)nWidth, (int)nHeight, frameInfo.pBufAddr, ""); + Generate8GrayImageByPointer((int)nWidth, (int)nHeight, frameInfo.pBufAddr, ""); } } } @@ -437,71 +437,13 @@ set.HImage = hImage; - HikToBitmap((int)nWidth, (int)nHeight, frameInfo.pBufAddr, set.Id); + Generate8GrayImageByPointer((int)nWidth, (int)nHeight, frameInfo.pBufAddr, set.Id); return set; } } } throw new Exception($"Grap Image Failed:{nRet:x8}"); - } - - [DllImport("kernel32.dll", EntryPoint = "CopyMemory", SetLastError = false)] - public static extern void CopyMemory(IntPtr dest, IntPtr src, uint count); - - private async void HikToBitmap(int width, int height, IntPtr dataPtr, string imgSetId) - { - await Task.Run(() => - { - //************************Mono8 杞� Bitmap******************************* - Bitmap bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed); - Bitmap showImage = new Bitmap(width, height, PixelFormat.Format8bppIndexed); - - ColorPalette cp = bmp.Palette; - for (int i = 0; i < 256; i++) - { - cp.Entries[i] = Color.FromArgb(i, i, i); - } - bmp.Palette = cp; - - ColorPalette cp1 = showImage.Palette; - for (int i = 0; i < 256; i++) - { - cp1.Entries[i] = Color.FromArgb(i, i, i); - } - showImage.Palette = cp1; - - int[] ptr = new int[3]; - Rectangle rect = new Rectangle(0, 0, width, height); - BitmapData bitmapData = bmp.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); - BitmapData showImageData = showImage.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); - int PixelSize = Bitmap.GetPixelFormatSize(bitmapData.PixelFormat) / 8; - - if (width % 4 == 0) - { - CopyMemory(bitmapData.Scan0, dataPtr, (uint)(width * height * PixelSize)); - CopyMemory(showImageData.Scan0, dataPtr, (uint)(width * height * PixelSize)); - } - else - { - ptr[0] = bitmapData.Scan0.ToInt32(); - ptr[1] = showImageData.Scan0.ToInt32(); - ptr[2] = (int)dataPtr; - for (int i = 0; i < height - 1; i++) - { - ptr[2] += width; - - CopyMemory((IntPtr)ptr[0], (IntPtr)ptr[2], (uint)(width * PixelSize)); - CopyMemory((IntPtr)ptr[1], (IntPtr)ptr[2], (uint)(width * PixelSize)); - ptr[0] += bitmapData.Stride; - ptr[1] += showImageData.Stride; - } - } - bmp.UnlockBits(bitmapData); - showImage.UnlockBits(showImageData); - - SaveOriginImage(bmp, showImage, imgSetId); - }); } readonly MyCamera device = new MyCamera(); diff --git a/src/Bro.Device.SchneiderPLC/Bro.Device.SchneiderPLC.csproj b/src/Bro.Device.SchneiderPLC/Bro.Device.SchneiderPLC.csproj index d43a332..e3e1b1a 100644 --- a/src/Bro.Device.SchneiderPLC/Bro.Device.SchneiderPLC.csproj +++ b/src/Bro.Device.SchneiderPLC/Bro.Device.SchneiderPLC.csproj @@ -29,6 +29,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> diff --git a/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj b/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj index 32fb634..5bb2a9a 100644 --- a/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj +++ b/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj @@ -33,6 +33,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.dll</HintPath> diff --git a/src/Bro.M071.Process.Model/Bro.M071.Model.csproj b/src/Bro.M071.Process.Model/Bro.M071.Model.csproj index 335fb1c..6b7c29c 100644 --- a/src/Bro.M071.Process.Model/Bro.M071.Model.csproj +++ b/src/Bro.M071.Process.Model/Bro.M071.Model.csproj @@ -34,6 +34,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.dll</HintPath> diff --git a/src/Bro.M071.Process/Bro.M071.Process.csproj b/src/Bro.M071.Process/Bro.M071.Process.csproj index e276212..c4f1e16 100644 --- a/src/Bro.M071.Process/Bro.M071.Process.csproj +++ b/src/Bro.M071.Process/Bro.M071.Process.csproj @@ -35,6 +35,46 @@ <PropertyGroup> <StartupObject /> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> <HintPath>..\..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath> @@ -61,6 +101,9 @@ <Reference Include="System.Net.Http" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> + <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=3.0.6.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DockPanelSuite.3.0.6\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="M071Converters.cs" /> @@ -68,6 +111,13 @@ <Compile Include="M071Models.cs" /> <Compile Include="M071Process.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="UI\M071Node.cs" /> + <Compile Include="UI\M071_MainForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="UI\M071_MainForm.Designer.cs"> + <DependentUpon>M071_MainForm.cs</DependentUpon> + </Compile> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> @@ -101,6 +151,10 @@ <Project>{197C5AA8-9609-4D1C-B1E3-5879006EAAF4}</Project> <Name>Bro.Process</Name> </ProjectReference> + <ProjectReference Include="..\Bro.UI.Model.Winform\Bro.UI.Model.Winform.csproj"> + <Project>{741F6491-57C7-479A-B391-09BBA9FBA9DC}</Project> + <Name>Bro.UI.Model.Winform</Name> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/src/Bro.M071.Process/M071Process.cs b/src/Bro.M071.Process/M071Process.cs index 13fde83..fbdd8fe 100644 --- a/src/Bro.M071.Process/M071Process.cs +++ b/src/Bro.M071.Process/M071Process.cs @@ -10,6 +10,7 @@ using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace Bro.M071.Process @@ -138,8 +139,6 @@ //} #endregion - //Dictionary<string, ProductionMeasurement> MeasureDict = new Dictionary<string, ProductionMeasurement>(); - private string barCode = ""; public string BarCode { @@ -168,17 +167,7 @@ measurements.ForEach(m => { m.InitialKeyUnitMeasureChanged(); - //m.KeyUnitCollection.ForEach(k => k.InitialMeasureValueDictPropertyChanged()); }); - - //MeasureDict[BarCode] = new ProductionMeasurement() - //{ - // Barcode = BarCode, - // Measurements = measurements, - //}; - - //MeasureDict[BarCode].InitialMeasurementsPropertyChanged(); - //MeasureDict[BarCode].PropertyChanged += MeasureProduction_PropertyChanged; var pMeasure = new ProductionMeasurement() { @@ -191,6 +180,8 @@ Config.SnapshotPointCollection.Where(u => u.IsEnabled).ToList().ForEach(s => { + _pauseHandle.WaitHandle.WaitOne(); + IDevice device = DeviceCollection.FirstOrDefault(u => u.Id == s.MotionDevice); if (device == null) throw new ProcessException($"{s.Name}鎷嶇収鐐逛綅鏈缃繍鍔ㄨ澶�"); @@ -220,6 +211,39 @@ return new ProcessResponse(true); } + /// <summary> + /// 鏆傚仠鏍囧織 + /// WaitHandle 鏆傚仠鍙ユ焺 榛樿涓洪潪闃诲 鍙墽琛� + /// WaitResult 鏆傚仠鏍囧織 true 姝e父鎵ц false 鏆傚仠涓� + /// </summary> + ManualWaitConfirm _pauseHandle = new ManualWaitConfirm() + { + WaitHandle = new ManualResetEvent(true), + WaitResult = true, + }; + + [ProcessMethod("", "PauseJob", "鏆傚仠娴佺▼", InvokeType.TestInvoke)] + public ProcessResponse PauseJob(IOperationConfig opConfig, IDevice invokeDevice, IDevice sourceDevice) + { + if (_pauseHandle.WaitResult) + { + #region 鏉垮崱鏆傚仠鍔ㄤ綔 + #endregion + + _pauseHandle.WaitHandle.Reset(); + } + else + { + #region 鏉垮崱鎭㈠鍔ㄤ綔 + #endregion + + _pauseHandle.WaitHandle.Set(); + } + + _pauseHandle.WaitResult = !_pauseHandle.WaitResult; + return new ProcessResponse(_pauseHandle.WaitResult); + } + #region 绉佹湁鏂规硶 private void MeasureProduction_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (sender is ProductionMeasurement pMeasure) @@ -384,5 +408,6 @@ imgSet.HImage.Dispose(); }); } + #endregion } } diff --git a/src/Bro.M071.Process/UI/M071Node.cs b/src/Bro.M071.Process/UI/M071Node.cs new file mode 100644 index 0000000..05abc96 --- /dev/null +++ b/src/Bro.M071.Process/UI/M071Node.cs @@ -0,0 +1,15 @@ +锘縰sing Bro.Common.Interface; +using Bro.UI.Model.Winform; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bro.M071.Process.UI +{ + [MenuNode("M071Node", "閿洏妫�娴�", 3, "", false)] + public class M071Node : IMenuNode + { + } +} diff --git a/src/Bro.M071.Process/UI/M071_MainForm.Designer.cs b/src/Bro.M071.Process/UI/M071_MainForm.Designer.cs new file mode 100644 index 0000000..45eef01 --- /dev/null +++ b/src/Bro.M071.Process/UI/M071_MainForm.Designer.cs @@ -0,0 +1,39 @@ +锘縩amespace Bro.M071.Process.UI +{ + partial class M071_MainForm + { + /// <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 = "M071_MainForm"; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Bro.M071.Process/UI/M071_MainForm.cs b/src/Bro.M071.Process/UI/M071_MainForm.cs new file mode 100644 index 0000000..92c0b25 --- /dev/null +++ b/src/Bro.M071.Process/UI/M071_MainForm.cs @@ -0,0 +1,22 @@ +锘縰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.M071.Process.UI +{ + [MenuNode("M071_MainForm", "閿洏妫�娴嬩富鐣岄潰", 3, "M071Node", true)] + public partial class M071_MainForm : MenuFrmBase + { + public M071_MainForm() + { + InitializeComponent(); + } + } +} diff --git a/src/Bro.M071.Process/packages.config b/src/Bro.M071.Process/packages.config index d386c7e..a5ede62 100644 --- a/src/Bro.M071.Process/packages.config +++ b/src/Bro.M071.Process/packages.config @@ -1,5 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <packages> <package id="Autofac" version="4.9.4" targetFramework="net452" /> + <package id="DockPanelSuite" version="3.0.6" targetFramework="net452" /> <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" /> + <package id="WeifenLuo.WinFormsUI.Docking" version="2.1.0" targetFramework="net452" /> </packages> \ No newline at end of file diff --git a/src/Bro.Process.DBManager/Bro.Process.DataBase.csproj b/src/Bro.Process.DBManager/Bro.Process.DataBase.csproj index 1d3988a..c2ecbbd 100644 --- a/src/Bro.Process.DBManager/Bro.Process.DataBase.csproj +++ b/src/Bro.Process.DBManager/Bro.Process.DataBase.csproj @@ -33,6 +33,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.dll</HintPath> diff --git a/src/Bro.Process/Bro.Process.csproj b/src/Bro.Process/Bro.Process.csproj index fe1f2f0..81759b6 100644 --- a/src/Bro.Process/Bro.Process.csproj +++ b/src/Bro.Process/Bro.Process.csproj @@ -33,6 +33,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> <HintPath>..\..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath> diff --git a/src/Bro.UI.Config/App.config b/src/Bro.UI.Config/App.config index 794cd25..208a5c1 100644 --- a/src/Bro.UI.Config/App.config +++ b/src/Bro.UI.Config/App.config @@ -1,10 +1,23 @@ -锘�<?xml version="1.0" encoding="utf-8" ?> +锘�<?xml version="1.0" encoding="utf-8"?> <configuration> - <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> - </startup> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> + </startup> <appSettings> - <add key="AuthorityCheck" value="False"/> - <add key="AuthorityServer" value="192.168.1.255:11001"/> + <add key="AuthorityCheck" value="False" /> + <add key="AuthorityServer" value="192.168.1.255:11001" /> + <add key="ClientSettingsProvider.ServiceUri" value="" /> </appSettings> + <system.web> + <membership defaultProvider="ClientAuthenticationMembershipProvider"> + <providers> + <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> + </providers> + </membership> + <roleManager defaultProvider="ClientRoleProvider" enabled="true"> + <providers> + <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> + </providers> + </roleManager> + </system.web> </configuration> \ No newline at end of file diff --git a/src/Bro.UI.Config/Bro.UI.Config.csproj b/src/Bro.UI.Config/Bro.UI.Config.csproj index 52bed1c..d465720 100644 --- a/src/Bro.UI.Config/Bro.UI.Config.csproj +++ b/src/Bro.UI.Config/Bro.UI.Config.csproj @@ -12,16 +12,31 @@ <FileAlignment>512</FileAlignment> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <Deterministic>true</Deterministic> + <IsWebBootstrapper>false</IsWebBootstrapper> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> + <PlatformTarget>x64</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> + <WarningLevel>2</WarningLevel> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> @@ -35,6 +50,51 @@ </PropertyGroup> <PropertyGroup> <ApplicationIcon>Logo.ico</ApplicationIcon> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <WarningLevel>2</WarningLevel> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <WarningLevel>2</WarningLevel> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <Prefer32Bit>true</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <WarningLevel>2</WarningLevel> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <Prefer32Bit>true</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> @@ -53,6 +113,7 @@ <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath> </Reference> + <Reference Include="System.Web.Extensions" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> @@ -213,5 +274,17 @@ <Content Include="Logo2.ico" /> <None Include="Resources\load.bmp" /> </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include=".NETFramework,Version=v4.5.2"> + <Visible>False</Visible> + <ProductName>Microsoft .NET Framework 4.5.2 %28x86 鍜� x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/src/Bro.UI.Config/MenuForms/FrmOperation.cs b/src/Bro.UI.Config/MenuForms/FrmOperation.cs index 74ba196..9175789 100644 --- a/src/Bro.UI.Config/MenuForms/FrmOperation.cs +++ b/src/Bro.UI.Config/MenuForms/FrmOperation.cs @@ -140,10 +140,12 @@ btnStart.Enabled = false; + //Task.Run(() => + //{ try { //if (Process.ProcessState != EnumHelper.DeviceState.DSOpen) - if(isStart) + if (isStart) { ProcessOperation(true); } @@ -160,8 +162,9 @@ } finally { - btnStart.Enabled = true; + this.BeginInvoke(new Action(() => btnStart.Enabled = true)); } + //}); } string _currentProcssCode = ""; @@ -248,21 +251,28 @@ { Process.Open(); + //this.BeginInvoke(new Action(() => + //{ btnStart.Text = " 鍋� 姝�"; btnStart.ImageIndex = 1; btnStart.BackColor = Color.FromArgb(0x7f, Color.LimeGreen); btnLoad.Enabled = false; + //})); + } else { Process.Close(); + //this.BeginInvoke(new Action(() => + //{ btnStart.Text = " 鍚� 鍔�"; btnStart.ImageIndex = 0; btnStart.BackColor = SystemColors.Control; btnLoad.Enabled = true; + //})); } } } diff --git a/src/Bro.UI.Config/MenuForms/FrmOperation.resx b/src/Bro.UI.Config/MenuForms/FrmOperation.resx index 628ac3d..0e0a0e7 100644 --- a/src/Bro.UI.Config/MenuForms/FrmOperation.resx +++ b/src/Bro.UI.Config/MenuForms/FrmOperation.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADm - CgAAAk1TRnQBSQFMAgEBAgEAAbgBAAG4AQABGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAgEAAcABAAHAAQABGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABYAMAARgDAAEBAQABCAYAAQkYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -182,7 +182,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD4 - CAAAAk1TRnQBSQFMAwEBAAG4AQABuAEAARgBAAEYAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + CAAAAk1TRnQBSQFMAwEBAAHAAQABwAEAARgBAAEYAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AWADAAEYAwABAQEAAQgGAAEJGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm diff --git a/src/Bro.UI.Device.Winform/Bro.UI.Device.Winform.csproj b/src/Bro.UI.Device.Winform/Bro.UI.Device.Winform.csproj index acd878f..9419c55 100644 --- a/src/Bro.UI.Device.Winform/Bro.UI.Device.Winform.csproj +++ b/src/Bro.UI.Device.Winform/Bro.UI.Device.Winform.csproj @@ -30,6 +30,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> diff --git a/src/Bro.UI.Device.Winform/CtrlCameraRunBase.Designer.cs b/src/Bro.UI.Device.Winform/CtrlCameraRunBase.Designer.cs index 9dfdfdb..784f96b 100644 --- a/src/Bro.UI.Device.Winform/CtrlCameraRunBase.Designer.cs +++ b/src/Bro.UI.Device.Winform/CtrlCameraRunBase.Designer.cs @@ -42,9 +42,9 @@ this.tssBtnCameraOp, this.tsTxtExposure, this.tsBtnModifyExposure}); - this.toolStripOperation.Location = new System.Drawing.Point(38, 0); + this.toolStripOperation.Location = new System.Drawing.Point(38, 2); this.toolStripOperation.Name = "toolStripOperation"; - this.toolStripOperation.Size = new System.Drawing.Size(440, 25); + this.toolStripOperation.Size = new System.Drawing.Size(440, 28); this.toolStripOperation.TabIndex = 0; this.toolStripOperation.Text = "toolStrip1"; // @@ -56,7 +56,7 @@ this.tssBtnCameraOp.Image = ((System.Drawing.Image)(resources.GetObject("tssBtnCameraOp.Image"))); this.tssBtnCameraOp.ImageTransparentColor = System.Drawing.Color.Magenta; this.tssBtnCameraOp.Name = "tssBtnCameraOp"; - this.tssBtnCameraOp.Size = new System.Drawing.Size(64, 22); + this.tssBtnCameraOp.Size = new System.Drawing.Size(64, 25); this.tssBtnCameraOp.Text = "鎷� 鐓�"; this.tssBtnCameraOp.ToolTipText = "鐩告満妯″紡"; this.tssBtnCameraOp.DropDownClosed += new System.EventHandler(this.tssBtnCameraOp_DropDownClosed); @@ -96,13 +96,13 @@ this.tsmiShowElements, this.tsmiShowStatusBar}); this.ctmsVisibleControl.Name = "ctmsVisibleControl"; - this.ctmsVisibleControl.Size = new System.Drawing.Size(181, 114); + this.ctmsVisibleControl.Size = new System.Drawing.Size(149, 92); // // tsmiShowToolBar // this.tsmiShowToolBar.CheckOnClick = true; this.tsmiShowToolBar.Name = "tsmiShowToolBar"; - this.tsmiShowToolBar.Size = new System.Drawing.Size(180, 22); + this.tsmiShowToolBar.Size = new System.Drawing.Size(148, 22); this.tsmiShowToolBar.Text = "鏄剧ず宸ュ叿鏍�"; this.tsmiShowToolBar.CheckedChanged += new System.EventHandler(this.tsmiShowToolBar_CheckedChanged); // @@ -110,7 +110,7 @@ // this.tsmiShowOpBar.CheckOnClick = true; this.tsmiShowOpBar.Name = "tsmiShowOpBar"; - this.tsmiShowOpBar.Size = new System.Drawing.Size(180, 22); + this.tsmiShowOpBar.Size = new System.Drawing.Size(148, 22); this.tsmiShowOpBar.Text = "鏄剧ず鎿嶄綔鏍�"; this.tsmiShowOpBar.CheckedChanged += new System.EventHandler(this.tsmiShowOpBar_CheckedChanged); // @@ -118,7 +118,7 @@ // this.tsmiShowElements.CheckOnClick = true; this.tsmiShowElements.Name = "tsmiShowElements"; - this.tsmiShowElements.Size = new System.Drawing.Size(180, 22); + this.tsmiShowElements.Size = new System.Drawing.Size(148, 22); this.tsmiShowElements.Text = "鏄剧ず鍩哄厓鍒楄〃"; this.tsmiShowElements.CheckedChanged += new System.EventHandler(this.tsmiShowElements_CheckedChanged); // @@ -126,7 +126,7 @@ // this.tsmiShowStatusBar.CheckOnClick = true; this.tsmiShowStatusBar.Name = "tsmiShowStatusBar"; - this.tsmiShowStatusBar.Size = new System.Drawing.Size(180, 22); + this.tsmiShowStatusBar.Size = new System.Drawing.Size(148, 22); this.tsmiShowStatusBar.Text = "鏄剧ず鐘舵�佹爮"; this.tsmiShowStatusBar.CheckedChanged += new System.EventHandler(this.tsmiShowStatusBar_CheckedChanged); // diff --git a/src/Bro.UI.Device.Winform/CtrlCameraRunBase.cs b/src/Bro.UI.Device.Winform/CtrlCameraRunBase.cs index 624da37..c990ef1 100644 --- a/src/Bro.UI.Device.Winform/CtrlCameraRunBase.cs +++ b/src/Bro.UI.Device.Winform/CtrlCameraRunBase.cs @@ -249,5 +249,17 @@ IsShowStatusBar = tsmiShowStatusBar.Checked; } #endregion + + public IOperationConfig OpConfig { get; set; } + + public void UploadOperationConfig(IOperationConfig opConfig) + { + throw new NotImplementedException(); + } + + public IOperationConfig GetOperationConfig() + { + throw new NotImplementedException(); + } } } diff --git a/src/Bro.UI.Model.Winform/Bro.UI.Model.Winform.csproj b/src/Bro.UI.Model.Winform/Bro.UI.Model.Winform.csproj index 200e67a..400bb5d 100644 --- a/src/Bro.UI.Model.Winform/Bro.UI.Model.Winform.csproj +++ b/src/Bro.UI.Model.Winform/Bro.UI.Model.Winform.csproj @@ -30,6 +30,46 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug1\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <LangVersion>7.3</LangVersion> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> diff --git a/src/GocatorTest/App.config b/src/GocatorTest/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/src/GocatorTest/App.config @@ -0,0 +1,6 @@ +锘�<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> + </startup> +</configuration> \ No newline at end of file diff --git a/src/GocatorTest/Form1.Designer.cs b/src/GocatorTest/Form1.Designer.cs new file mode 100644 index 0000000..3c37677 --- /dev/null +++ b/src/GocatorTest/Form1.Designer.cs @@ -0,0 +1,61 @@ +锘縩amespace GocatorTest +{ + partial class Form1 + { + /// <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 Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 + + /// <summary> + /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼 + /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广�� + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(13, 50); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(498, 450); + this.Controls.Add(this.button1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + } +} + diff --git a/src/GocatorTest/Form1.cs b/src/GocatorTest/Form1.cs new file mode 100644 index 0000000..6fa54b6 --- /dev/null +++ b/src/GocatorTest/Form1.cs @@ -0,0 +1,35 @@ +锘縰sing Bro.Common.Base; +using Bro.Device.Gocator; +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 GocatorTest +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + GocatorDriver gocator = new GocatorDriver(); + + (gocator as DeviceBase).InitialConfig = new GocatorInitialConfig() + { + CameraIP="127.0.0.1" + }; + + gocator.StateChange(Bro.Common.Helper.EnumHelper.DeviceState.DSInit); + gocator.StateChange(Bro.Common.Helper.EnumHelper.DeviceState.DSOpen); + } + } +} diff --git a/src/GocatorTest/Form1.resx b/src/GocatorTest/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/GocatorTest/Form1.resx @@ -0,0 +1,120 @@ +锘�<?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/GocatorTest/GocatorTest.csproj b/src/GocatorTest/GocatorTest.csproj new file mode 100644 index 0000000..20735c8 --- /dev/null +++ b/src/GocatorTest/GocatorTest.csproj @@ -0,0 +1,94 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{CD0809C4-6E03-4F04-8806-59C29A4C54CE}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>GocatorTest</RootNamespace> + <AssemblyName>GocatorTest</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> + <PlatformTarget>AnyCPU</PlatformTarget> + <OutputPath>bin\Debug\</OutputPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> + <PlatformTarget>AnyCPU</PlatformTarget> + <OutputPath>bin\Release\</OutputPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + <PlatformTarget>x64</PlatformTarget> + <OutputPath>bin\x64\Debug\</OutputPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + <PlatformTarget>x64</PlatformTarget> + <OutputPath>bin\x64\Release\</OutputPath> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Form1.resx"> + <DependentUpon>Form1.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Bro.Common.Device\Bro.Common.Device.csproj"> + <Project>{987308DD-8BAA-463A-94E2-77D62E01A5BF}</Project> + <Name>Bro.Common.Device</Name> + </ProjectReference> + <ProjectReference Include="..\Bro.Common.Model\Bro.Common.Model.csproj"> + <Project>{1A3CBFE7-3F78-42C3-95C5-10360450DBEA}</Project> + <Name>Bro.Common.Model</Name> + </ProjectReference> + <ProjectReference Include="..\Bro.Device.Gocator\Bro.Device.Gocator.csproj"> + <Project>{112009f0-7902-454b-9a6c-a3afc8fa8fff}</Project> + <Name>Bro.Device.Gocator</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project> \ No newline at end of file diff --git a/src/GocatorTest/Program.cs b/src/GocatorTest/Program.cs new file mode 100644 index 0000000..be79987 --- /dev/null +++ b/src/GocatorTest/Program.cs @@ -0,0 +1,22 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace GocatorTest +{ + static class Program + { + /// <summary> + /// 搴旂敤绋嬪簭鐨勪富鍏ュ彛鐐广�� + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/src/GocatorTest/Properties/AssemblyInfo.cs b/src/GocatorTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4061b69 --- /dev/null +++ b/src/GocatorTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅 +// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("GocatorTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("GocatorTest")] +[assembly: AssemblyCopyright("Copyright 漏 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷 +//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷 +//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("cd0809c4-6e03-4f04-8806-59c29a4c54ce")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鐢熸垚鍙� +// 淇鍙� +// +//鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊� +//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/GocatorTest/Properties/Resources.Designer.cs b/src/GocatorTest/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a36b89a --- /dev/null +++ b/src/GocatorTest/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// 杩愯鏃剁増鏈�: 4.0.30319.42000 +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace GocatorTest.Properties +{ + + + /// <summary> + /// 寮虹被鍨嬭祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲瀛楃涓茬瓑銆� + /// </summary> + // 姝ょ被鏄敱 StronglyTypedResourceBuilder + // 绫婚�氳繃绫讳技浜� ResGen 鎴� Visual Studio 鐨勫伐鍏疯嚜鍔ㄧ敓鎴愮殑銆� + // 鑻ヨ娣诲姞鎴栧垹闄ゆ垚鍛橈紝璇风紪杈� .ResX 鏂囦欢锛岀劧鍚庨噸鏂拌繍琛� ResGen + // (浠� /str 浣滀负鍛戒护閫夐」)锛屾垨閲嶆柊鐢熸垚 VS 椤圭洰銆� + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// <summary> + /// 杩斿洖姝ょ被浣跨敤鐨勭紦瀛� ResourceManager 瀹炰緥銆� + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GocatorTest.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// 瑕嗙洊褰撳墠绾跨▼鐨� CurrentUICulture 灞炴�� + /// 浣跨敤姝ゅ己绫诲瀷鐨勮祫婧愮被鐨勮祫婧愭煡鎵俱�� + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/src/GocatorTest/Properties/Resources.resx b/src/GocatorTest/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/src/GocatorTest/Properties/Resources.resx @@ -0,0 +1,117 @@ +锘�<?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.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: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" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </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" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/src/GocatorTest/Properties/Settings.Designer.cs b/src/GocatorTest/Properties/Settings.Designer.cs new file mode 100644 index 0000000..30684ca --- /dev/null +++ b/src/GocatorTest/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace GocatorTest.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/src/GocatorTest/Properties/Settings.settings b/src/GocatorTest/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/src/GocatorTest/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> -- Gitblit v1.8.0