From f39f00ee0ee41e169fa24ccb85b4af36090dbd25 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期三, 08 七月 2020 16:38:51 +0800
Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071
---
src/Bro.Device.GTSCard/GTSCardDriver.cs | 263 +++-
src/Bro.M071.Model/Migrations/Configuration.cs | 0
src/Bro.M071.DBManager/Properties/AssemblyInfo.cs | 4
src/Bro.M071.DBManager/SQLiteHelper.cs | 2
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs | 396 +++---
src/Bro.M071.Model/Model/ProductionMeasurementRecords.cs | 2
src/Bro.M071.DBManager/ProductionMeasurementRecordsManager.cs | 34
src/Bro.M071.Process/UI/M071_DataForm.Designer.cs | 413 +++++++
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs | 37
src/Bro.M071.Model/Migrations/202007070851439_initDB.Designer.cs | 29
src/Bro.M071.DBManager/ExcelExportHelper.cs | 143 ++
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs | 67 +
src/Bro.M071.DBManager/ModelManager.cs | 0
src/Bro.M071.Model/Model/KeyUnitData.cs | 0
src/Bro.M071.DBManager/MeasurementUnitResultManager.cs | 57
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx | 3
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs | 12
src/Bro.M071.Model/Model/MeasurementUnitResult.cs | 33
src/Bro.Common.Model/Model/MotionCardRelated.cs | 24
src/Bro.M071.DBManager/App.config | 0
src/Bro.M071.Model/App.config | 2
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx | 3
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs | 89
src/Bro.M071.DBManager/KeyUnitDataManager.cs | 0
src/Bro.M071.DBManager/packages.config | 1
src/Bro.M071.Process/UI/M071_DataForm.resx | 120 ++
src/Bro.Common.Device/DeviceBase/MotionCardBase.cs | 50
src/Bro.M071.DBManager/Bro.M071.DBManager.csproj | 18
src/Bro.M071.Process/UI/M071_DataForm.cs | 22
src/Bro.M071.Model/Migrations/202007070851439_initDB.resx | 126 ++
src/Bro.M071.Model/Properties/AssemblyInfo.cs | 4
M071.sln | 140 ++
src/Bro.M071.Model/Model/MeasurementAndKeyDataRelation.cs | 0
src/Bro.M071.Model/BaseModel.cs | 0
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs | 35
src/Bro.M071.Model/Bro.M071.Model.csproj | 25
/dev/null | 10
src/Bro.UI.Config/App.config | 34
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs | 701 ++++++------
src/Bro.M071.Model/Migrations/202007070851439_initDB.cs | 92 +
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs | 25
src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs | 62
src/Bro.M071.Process/Bro.M071.Process.csproj | 11
src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs | 19
src/Bro.M071.Model/DBModel.cs | 0
src/Bro.M071.DBManager/MeasurementAndKeyDataRelationManager.cs | 0
46 files changed, 2,311 insertions(+), 797 deletions(-)
diff --git a/M071.sln b/M071.sln
index a9fb730..63c2069 100644
--- a/M071.sln
+++ b/M071.sln
@@ -21,10 +21,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.Device.GTSCard", "src\Bro.Device.GTSCard\Bro.Device.GTSCard.csproj", "{B536003E-70BA-4701-B8FD-BAFA303AB4E2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.DBManager", "src\Bro.M071.Process.DBManager\Bro.M071.DBManager.csproj", "{230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Model", "src\Bro.M071.Process.Model\Bro.M071.Model.csproj", "{AD645C48-5811-4B1E-B81F-D35D5E6B577F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.Process.DataBase", "src\Bro.Process.DBManager\Bro.Process.DataBase.csproj", "{65302D6E-9918-4E4C-92B4-75C8830C6BA7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Process", "src\Bro.M071.Process\Bro.M071.Process.csproj", "{B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}"
@@ -33,72 +29,192 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GocatorTest", "src\GocatorTest\GocatorTest.csproj", "{CD0809C4-6E03-4F04-8806-59C29A4C54CE}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Model", "src\Bro.M071.Model\Bro.M071.Model.csproj", "{AD645C48-5811-4B1E-B81F-D35D5E6B577F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.DBManager", "src\Bro.M071.DBManager\Bro.M071.DBManager.csproj", "{230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
+ Debug1|Any CPU = Debug1|Any CPU
+ Debug1|x64 = Debug1|x64
+ Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug1|x64.ActiveCfg = Debug1|x64
+ {987308DD-8BAA-463A-94E2-77D62E01A5BF}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug1|x64.ActiveCfg = Debug1|x64
+ {1A3CBFE7-3F78-42C3-95C5-10360450DBEA}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug1|x64.ActiveCfg = Debug1|x64
+ {5D6BD683-98B6-4D69-9FB7-7BC5AFF13FC4}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug1|x64.ActiveCfg = Debug1|x64
+ {45C51C86-9767-49C7-B2C3-2E9F60098E65}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug1|x64.ActiveCfg = Debug1|x64
+ {197C5AA8-9609-4D1C-B1E3-5879006EAAF4}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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|x64
{DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug|x64.Build.0 = Debug|x64
+ {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug1|x64.ActiveCfg = Debug1|x64
+ {DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Debug1|x64.Build.0 = Debug1|x64
+ {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}.Release|x64.ActiveCfg = Release|Any CPU
{DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}.Release|x64.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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug1|x64.ActiveCfg = Debug1|x64
+ {E6429C64-92B3-46A2-B35E-579856D47F62}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug1|x64.ActiveCfg = Debug1|x64
+ {741F6491-57C7-479A-B391-09BBA9FBA9DC}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug|Any CPU.ActiveCfg = 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}.Debug1|Any CPU.ActiveCfg = Debug|Any CPU
+ {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Debug1|x64.ActiveCfg = Debug|Any CPU
+ {B536003E-70BA-4701-B8FD-BAFA303AB4E2}.Release|Any CPU.ActiveCfg = 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
- {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}.Release|x64.ActiveCfg = Release|Any CPU
- {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x64.Build.0 = Release|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}.Release|x64.ActiveCfg = Release|Any CPU
- {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x64.Build.0 = Release|Any CPU
+ {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug|Any CPU.ActiveCfg = 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}.Debug1|Any CPU.ActiveCfg = Debug|Any CPU
+ {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Debug1|x64.ActiveCfg = Debug|Any CPU
+ {65302D6E-9918-4E4C-92B4-75C8830C6BA7}.Release|Any CPU.ActiveCfg = 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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug1|x64.ActiveCfg = Debug1|x64
+ {B50C1309-495C-4ADF-8A3D-6F6A06CCC4CC}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {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}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug1|x64.ActiveCfg = Debug1|x64
+ {112009F0-7902-454B-9A6C-A3AFC8FA8FFF}.Debug1|x64.Build.0 = Debug1|x64
+ {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
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug|Any CPU.Build.0 = Debug|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}.Debug1|Any CPU.ActiveCfg = Debug|Any CPU
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug1|Any CPU.Build.0 = Debug|Any CPU
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug1|x64.ActiveCfg = Debug|x64
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Debug1|x64.Build.0 = Debug|x64
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|Any CPU.Build.0 = Release|Any CPU
{CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|x64.ActiveCfg = Release|x64
{CD0809C4-6E03-4F04-8806-59C29A4C54CE}.Release|x64.Build.0 = Release|x64
+ {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|x64
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug|x64.Build.0 = Debug|x64
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug1|x64.ActiveCfg = Debug1|x64
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Debug1|x64.Build.0 = Debug1|x64
+ {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|x64
+ {AD645C48-5811-4B1E-B81F-D35D5E6B577F}.Release|x64.Build.0 = Release|x64
+ {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|x64
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug|x64.Build.0 = Debug|x64
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug1|Any CPU.ActiveCfg = Debug1|Any CPU
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug1|Any CPU.Build.0 = Debug1|Any CPU
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug1|x64.ActiveCfg = Debug1|x64
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Debug1|x64.Build.0 = Debug1|x64
+ {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|x64
+ {230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/Bro.Common.Device/DeviceBase/MotionCardBase.cs b/src/Bro.Common.Device/DeviceBase/MotionCardBase.cs
index e826d28..a6d2849 100644
--- a/src/Bro.Common.Device/DeviceBase/MotionCardBase.cs
+++ b/src/Bro.Common.Device/DeviceBase/MotionCardBase.cs
@@ -26,6 +26,50 @@
public abstract ResponseMessage MoveToPoint(IOperationConfig opConfig);
public abstract void ResetAlarm();
public abstract ResponseMessage Run(IOperationConfig config);
+ /// <summary>
+ /// 娓呴櫎鐘舵��
+ /// </summary>
+ /// <param name="startAxisIndex">璧峰杞村彿</param>
+ /// <param name="count">鏁伴噺</param>
+ /// <returns></returns>
+ public abstract bool ClearStatus(int startAxisIndex, int count);
+
+ /// <summary>
+ /// 璇诲彇杞寸姸鎬�
+ /// </summary>
+ /// <param name="axisNum">杞村彿</param>
+ /// <returns></returns>
+ public abstract int GetAxisStatus(int axisNum);
+
+ /// <summary>
+ /// 浣嶇疆娓呴浂
+ /// </summary>
+ /// <param name="startAxisIndex">璧峰杞村彿</param>
+ /// <param name="count">鏁伴噺</param>
+ /// <returns></returns>
+ public abstract bool PositionReset(int startAxisIndex, int count);
+
+ public abstract bool AllAxisOn();
+
+ public abstract bool AllAxisOff();
+
+ public abstract Task<bool> AxisOnAsync(int axisNum);
+
+ public abstract Task<bool> AxisOffAsync(int axisNum);
+
+ /// <summary>
+ /// 鍗曚釜杞� 杩愬姩(鐐瑰埌鐐� jog 鍥為浂...锛�
+ /// </summary>
+ /// <param name="optionPara">杩愬姩鍙傛暟瀵硅薄</param>
+ public abstract Task<bool> SingleAxisMoving(MovingOption optionPara);
+
+ /// <summary>
+ /// 鏌愪釜杞磋繍鍔ㄥ仠姝�
+ /// </summary>
+ /// <param name="axisNum">杞村彿</param>
+ /// <param name="option">0琛ㄧず骞虫粦鍋滄锛�1琛ㄧず绱ф�ュ仠姝�</param>
+ /// <returns></returns>
+ public abstract Task<bool> MoveStop(int axisNum, int option);
public virtual void ExcuteMonitorInvoke(DateTime dateTime, string invokeDevice, IDevice device, IMonitorSet monitorSet)
{
@@ -57,7 +101,7 @@
/// </summary>
public List<AxisMovingStatus> AxisMovingOptionValues { get; set; } = new List<AxisMovingStatus>();
- public abstract void WriteOutput(short index, IOValue value);
+ public abstract void WriteOutput(short index, IOValue value);
}
public class MotionCardInitialConfigBase : InitialConfigBase, IMonitorConfig
@@ -156,7 +200,7 @@
}
[Device("MotionOperationSet", "杩愬姩鎿嶄綔閰嶇疆鍩虹被", EnumHelper.DeviceAttributeType.OperationConfig)]
- public class MotionCardOperationSet : IComplexDisplay
+ public class MotionCardOperationSet : IComplexDisplay
{
[Category("IO鎿嶄綔閰嶇疆")]
[DisplayName("IO棰勬鏌ュ畾涔夐泦鍚�")]
@@ -196,7 +240,7 @@
[DisplayName("杩愬姩閰嶇疆闆嗗悎")]
[Description("MovingOps锛氳繍鍔ㄩ厤缃泦鍚�")]
[TypeConverter(typeof(ComplexObjectConvert))]
- [Editor(typeof(PropertyObjectEditor),typeof(UITypeEditor))]
+ [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))]
public MotionOperationCollection MotionOperationCollection { get; set; } = new MotionOperationCollection();
diff --git a/src/Bro.Common.Model/Model/MotionCardRelated.cs b/src/Bro.Common.Model/Model/MotionCardRelated.cs
index 757cb42..6342b0a 100644
--- a/src/Bro.Common.Model/Model/MotionCardRelated.cs
+++ b/src/Bro.Common.Model/Model/MotionCardRelated.cs
@@ -84,10 +84,10 @@
//[Description("IsUseWarning锛氭槸鍚﹀惎鐢ㄦ姤璀�")]
//public bool IsUseWarning { get; set; } = false;
- //[Category("鏆傚仠閰嶇疆")]
- //[DisplayName("鏄惁鍚敤绔嬪嵆鏆傚仠")]
- //[Description("IsImmediatePause锛氭槸鍚﹀惎鐢ㄧ珛鍗虫殏鍋�")]
- //public bool IsImmediatePause { get; set; } = false;
+ [Category("鏆傚仠閰嶇疆")]
+ [DisplayName("鏄惁鍚敤绔嬪嵆鏆傚仠")]
+ [Description("IsImmediatePause锛氭槸鍚﹀惎鐢ㄧ珛鍗虫殏鍋�")]
+ public bool IsImmediatePause { get; set; } = false;
//[Category("鏆傚仠閰嶇疆")]
//[DisplayName("杞翠綅缃浜庡尯闂村唴鏃堕�傜敤鐨勬殏鍋滄搷浣�")]
@@ -208,11 +208,6 @@
public string AxisName { get; set; }
/// <summary>
- /// 杩愬姩妯″紡
- /// </summary>
- public MotionMode MoveMode { get; set; }
-
- /// <summary>
/// 褰撳墠浣嶇疆
/// </summary>
public int CurPosition { get; set; }
@@ -225,16 +220,21 @@
/// <summary>
/// 褰撳墠閫熷害鍙傛暟
/// </summary>
- public VelocityPara CurVelocityPara { get; set; }
+ public double CurVelocity { get; set; }
/// <summary>
/// 瑙勫垝閫熷害鍙傛暟
/// </summary>
- public VelocityPara VelocityPara { get; set; }
+ public double PrfVelocity { get; set; }
+
+ /// <summary>
+ /// 杞寸姸鎬�
+ /// </summary>
+ public int AxisStatus { get; set; }
public string GetDisplayText()
{
- return $"杞磠AxisIndex}:{AxisName}-{MoveMode.ToString()}-褰撳墠锛歿CurPosition}-瑙勫垝锛歿Destination}";
+ return $"杞磠AxisIndex}:{AxisName}-褰撳墠锛歿CurPosition}-瑙勫垝锛歿Destination}";
}
}
diff --git a/src/Bro.Device.GTSCard/GTSCardDriver.cs b/src/Bro.Device.GTSCard/GTSCardDriver.cs
index adba5c9..918ed22 100644
--- a/src/Bro.Device.GTSCard/GTSCardDriver.cs
+++ b/src/Bro.Device.GTSCard/GTSCardDriver.cs
@@ -37,6 +37,13 @@
/// </summary>
bool _isResetting = false;
+ /// <summary>
+ /// 杩愬姩杞寸珛鍗虫殏鍋�
+ /// </summary>
+ Dictionary<int, ManualResetEvent> axisImmediatePauseHandleDict = new Dictionary<int, ManualResetEvent>();
+
+ Dictionary<int, CancellationTokenSource> axisMoveCancelDict = new Dictionary<int, CancellationTokenSource>();
+
public void SetResetFlag(bool isReset)
{
_isResetting = isReset;
@@ -44,7 +51,17 @@
public override List<AxisInfo> GetCurrentAxisInfo(params string[] axisName)
{
- throw new NotImplementedException();
+ List<AxisInfo> axisInfos = new List<AxisInfo>();
+ IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled).ForEach(axisSetting =>
+ {
+ AxisInfo axisInfo = new AxisInfo();
+ axisInfo.AxisName = axisSetting.AxisName;
+ var axisMovingStatus = AxisMovingOptionValues.FirstOrDefault(u => u.AxisIndex == axisSetting.AxisIndex);
+ axisInfo.AxisLocation = axisMovingStatus == null ? 0 : Convert.ToDouble(axisMovingStatus.CurPosition);
+
+ axisInfos.Add(axisInfo);
+ });
+ return axisInfos;
}
#region DeviceBase
@@ -52,16 +69,23 @@
protected override void Init()
{
InitialMotionCard();
+ axisImmediatePauseHandleDict = IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled).ToDictionary(a => a.AxisIndex, a => new ManualResetEvent(true));
+ axisMoveCancelDict = IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled).ToDictionary(a => a.AxisIndex, a => new CancellationTokenSource());
+
+ axisMoveCancelDict.Values.ToList().ForEach(c =>
+ {
+ c = new CancellationTokenSource();
+ });
}
protected override void Pause()
{
- throw new NotImplementedException();
+
}
protected override void Resume()
{
- throw new NotImplementedException();
+
}
protected override void Start()
@@ -83,13 +107,15 @@
public override ResponseMessage Run(IOperationConfig config)
{
ResponseMessage responseMessage = new ResponseMessage();
- var motionCardOperationConfig = config as MotionCardOperationConfigBase;
- foreach (var operationSet in motionCardOperationConfig.OperationCollection)
+ if (config is MotionCardOperationConfigBase motionCardOperationConfig)
{
- responseMessage = RunOperationSet(operationSet);
- if (!responseMessage.Result)
+ foreach (var operationSet in motionCardOperationConfig.OperationCollection)
{
- return responseMessage;
+ responseMessage = RunOperationSet(operationSet);
+ if (!responseMessage.Result)
+ {
+ return responseMessage;
+ }
}
}
return responseMessage;
@@ -185,6 +211,43 @@
}
#endregion
+ #region ImmediatePause
+ /// <summary>
+ /// 鍚姩绔嬪嵆鏆傚仠
+ /// </summary>
+ public void SetImmediatePause()
+ {
+ if (!_isResetting)
+ {
+ var immediatePauseAxis = IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled && a.IsImmediatePause).Select(u => u.AxisIndex).ToList();
+
+ immediatePauseAxis.ForEach(async axisIndex =>
+ {
+ axisImmediatePauseHandleDict[axisIndex].Reset();
+
+ axisMoveCancelDict[axisIndex].Cancel();
+
+ await MoveStop(axisIndex, 0);
+ });
+ }
+ }
+
+ /// <summary>
+ /// 鎭㈠绔嬪嵆鏆傚仠
+ /// </summary>
+ public void ResetImmediatePause()
+ {
+ var immediatePauseAxis = IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled && a.IsImmediatePause).Select(u => u.AxisIndex).ToList();
+
+ immediatePauseAxis.ForEach(axisIndex =>
+ {
+ axisMoveCancelDict[axisIndex] = new CancellationTokenSource();
+
+ axisImmediatePauseHandleDict[axisIndex].Set();
+ });
+ }
+ #endregion
+
#region GTSCard
/// <summary>
@@ -196,7 +259,7 @@
{
var res = GTSCardAPI.GT_Open((short)IConfig.CardNum, 0, 1); //鎵撳紑杩愬姩鎺у埗鍣ㄣ�傚弬鏁板繀椤讳负锛�0,1锛夛紝涓嶈兘淇敼銆�
res += GTSCardAPI.GT_LoadConfig((short)IConfig.CardNum, IConfig.InitialConfigFilePath);
- res += GTSCardAPI.GT_ClrSts(0, 1, 8);
+ ClearStatus(1, IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled).Count);
if (res != (short)GTSRetCode.GRCRunOK)
{
throw new Exception("鏉垮崱杞藉叆閰嶇疆鏂囦欢寮傚父锛岄敊璇爜锛�" + res);
@@ -204,13 +267,13 @@
}
- public bool AllAxisOn()
+ public override bool AllAxisOn()
{
List<Task<bool>> taskList = new List<Task<bool>>(); ;
// 濡傛灉鏄涓酱鐨勮繍鍔� 绛夋瘡涓酱寮�鍚�
- IConfig.AxisSettings.Where(a => a.IsAxisEnabled).ToList().ForEach(axisNum =>
+ IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled).ForEach(axisNum =>
{
- var task = AxisOnAsync((short)IConfig.CardNum, (short)axisNum.AxisIndex);
+ var task = AxisOnAsync(axisNum.AxisIndex);
taskList.Add(task);
});
Task.WaitAll(taskList.ToArray());
@@ -218,13 +281,13 @@
return resultOK;
}
- public bool AllAxisOff()
+ public override bool AllAxisOff()
{
List<Task<bool>> taskList = new List<Task<bool>>(); ;
// 濡傛灉鏄涓酱鐨勮繍鍔� 绛夋瘡涓酱鍏抽棴
- IConfig.AxisSettings.Where(a => a.IsAxisEnabled).ToList().ForEach(axisNum =>
+ IConfig.AxisSettings.FindAll(a => a.IsAxisEnabled).ForEach(axisNum =>
{
- var task = AxisOffAsync((short)IConfig.CardNum, (short)axisNum.AxisIndex);
+ var task = AxisOffAsync(axisNum.AxisIndex);
taskList.Add(task);
});
Task.WaitAll(taskList.ToArray());
@@ -236,11 +299,11 @@
/// 鍗曚釜杞村紑鍚�
/// </summary>
/// <returns></returns>
- public async Task<bool> AxisOnAsync(short cardNum, short axisNum)
+ public override async Task<bool> AxisOnAsync(int axisNum)
{
return await Task.Run(() =>
{
- var ret = GTSCardAPI.GT_AxisOn(cardNum, axisNum);
+ var ret = GTSCardAPI.GT_AxisOn((short)IConfig.CardNum, (short)axisNum);
return ret == (short)GTSRetCode.GRCRunOK;
});
}
@@ -249,11 +312,11 @@
/// 鍗曚釜杞村叧闂�
/// </summary>
/// <returns></returns>
- public async Task<bool> AxisOffAsync(short cardNum, short axisNum)
+ public override async Task<bool> AxisOffAsync(int axisNum)
{
return await Task.Run(() =>
{
- var ret = GTSCardAPI.GT_AxisOff(cardNum, axisNum);
+ var ret = GTSCardAPI.GT_AxisOff((short)IConfig.CardNum, (short)axisNum);
return ret == (short)GTSRetCode.GRCRunOK;
});
}
@@ -266,19 +329,21 @@
public override ResponseMessage MoveToPoint(IOperationConfig opConfig)
{
ResponseMessage responseMessage = new ResponseMessage();
- var gtsOperationCollection = opConfig as MotionOperationCollection;
- List<Task<bool>> taskList = new List<Task<bool>>();
- foreach (var movingOp in gtsOperationCollection.MovingOps)
+ if (opConfig is MotionOperationCollection gtsOperationCollection)
{
- var task = SingleAxisMoving(movingOp);
- taskList.Add(task);
- }
+ List<Task<bool>> taskList = new List<Task<bool>>();
+ foreach (var movingOp in gtsOperationCollection.MovingOps)
+ {
+ var task = SingleAxisMoving(movingOp);
+ taskList.Add(task);
+ }
- Task.WaitAll(taskList.ToArray());
- responseMessage.Result = taskList.All(u => u.GetAwaiter().GetResult());
- if (!responseMessage.Result)
- {
- responseMessage.Message = $"鐐逛綅杩愬姩寮傚父";
+ Task.WaitAll(taskList.ToArray());
+ responseMessage.Result = taskList.All(u => u.GetAwaiter().GetResult());
+ if (!responseMessage.Result)
+ {
+ responseMessage.Message = $"鐐逛綅杩愬姩寮傚父";
+ }
}
return responseMessage;
}
@@ -313,7 +378,7 @@
/// 鍗曚釜杞� 杩愬姩(鐐瑰埌鐐� jog 鍥為浂...锛�
/// </summary>
/// <param name="optionPara">杩愬姩鍙傛暟瀵硅薄</param>
- public async Task<bool> SingleAxisMoving(MovingOption optionPara)
+ public override async Task<bool> SingleAxisMoving(MovingOption optionPara)
{
return await Task.Run(() =>
{
@@ -322,6 +387,8 @@
{
if (IConfig.AxisSettings.FirstOrDefault(a => a.AxisIndex == optionPara.AxisIndex)?.IsAxisEnabled ?? false)
{
+ axisImmediatePauseHandleDict[optionPara.AxisIndex].WaitOne();
+
string _position = "";
string motionType = optionPara.MoveMode == EnumHelper.MotionMode.Normal ? (optionPara.IsAbsolute ? "Abs" : "Rel") : optionPara.MoveMode.ToString();
@@ -413,6 +480,41 @@
}
/// <summary>
+ /// 鑾峰彇瑙勫垝閫熷害
+ /// </summary>
+ /// <param name="axisNum">Axis number</param>
+ /// <returns></returns>
+ public double GetPrfVelocity(int axisNum)
+ {
+ double prfVel = 0;
+ uint pclock = 0;
+ var ret = GTSCardAPI.GT_GetPrfVel((short)IConfig.CardNum, (short)axisNum, out prfVel, 1, out pclock);
+ if (ret != (short)GTSRetCode.GRCRunOK)
+ {
+ throw new Exception("杞�" + axisNum + "鑾峰彇瑙勫垝閫熷害寮傚父锛岄敊璇爜锛�" + ret);
+ }
+ prfVel = prfVel / IConfig.AxisVelocityRatio;
+ return prfVel;
+ }
+
+ /// <summary>
+ /// 鑾峰彇褰撳墠閫熷害
+ /// </summary>
+ /// <param name="axisNum">Axis number</param>
+ /// <returns></returns>
+ public double GetVelocity(int axisNum)
+ {
+ double vel = 0;
+ var ret = GTSCardAPI.GT_GetVel((short)IConfig.CardNum, (short)axisNum, out vel);
+ if (ret != (short)GTSRetCode.GRCRunOK)
+ {
+ throw new Exception("杞�" + axisNum + "鑾峰彇褰撳墠閫熷害寮傚父锛岄敊璇爜锛�" + ret);
+ }
+ vel = vel / IConfig.AxisVelocityRatio;
+ return vel;
+ }
+
+ /// <summary>
/// Set Single Axis Do Jog Move
/// </summary>
/// <param name="axisNum">AxisNo</param>
@@ -437,7 +539,7 @@
if (ret != (short)GTSRetCode.GRCRunOK)
{
- LogAsync(DateTime.Now, "杞�" + optionPara.AxisIndex + "APS_absolute_move寮傚父", "閿欒鐮侊細" + ret + ";" + "閲嶈瘯娆℃暟锛�" + repeatTime);
+ LogAsync(DateTime.Now, "杞�" + optionPara.AxisIndex + "JogMove寮傚父", "閿欒鐮侊細" + ret + ";" + "閲嶈瘯娆℃暟锛�" + repeatTime);
Thread.Sleep(10);
}
repeatTime--;
@@ -450,29 +552,6 @@
OnExceptionRaised?.Invoke(ex);
return false;
}
-
- }
-
- /// <summary>
- /// Set Single Axis Do stop Jog Move
- /// </summary>
- /// <param name="axisNum">AxisNo</param>
- /// <returns></returns>
- public bool StopJog(int axisNum)
- {
- //鍋滄杩愬姩
- MoveStop(axisNum, 0);
- //杩愬姩寮�濮嬪悗 妫�鏌ヨ繍鍔ㄦ槸鍚﹀仠姝�
- bool isStop = false;
- int repeatTime = 1000;
- do
- {
- isStop = IsStop((short)IConfig.CardNum, (short)axisNum);
- Thread.Sleep(50);
- repeatTime--;
- } while (!isStop && repeatTime > 0);
-
- return isStop;
}
/// <summary>
@@ -540,7 +619,7 @@
repeatTime = 1000;
do
{
- isStop = IsStop((short)IConfig.CardNum, (short)optionPara.AxisIndex);
+ isStop = IsStop((short)optionPara.AxisIndex);
Thread.Sleep(50);
repeatTime--;
} while (!isStop && repeatTime > 0);
@@ -563,6 +642,8 @@
{
try
{
+ axisImmediatePauseHandleDict[optionPara.AxisIndex].WaitOne();
+
if (_isResetting)
{
LogAsync(DateTime.Now, "澶嶄綅杩囩▼寮傚父", "杞�" + optionPara.AxisIndex + "璇曞浘鍦ㄥ浣嶈繃绋嬩腑杩愬姩");
@@ -612,7 +693,7 @@
repeatTime = 1000;
do
{
- isStop = IsStop((short)IConfig.CardNum, (short)optionPara.AxisIndex);
+ isStop = IsStop((short)optionPara.AxisIndex);
Thread.Sleep(50);
repeatTime--;
} while (!isStop && repeatTime > 0);
@@ -633,7 +714,7 @@
/// <param name="axisNum">axisNo</param>
/// <param name="option">0琛ㄧず骞虫粦鍋滄锛�1琛ㄧず绱ф�ュ仠姝�</param>
/// <returns></returns>
- public async Task<bool> MoveStop(int axisNum, int option)
+ public override async Task<bool> MoveStop(int axisNum, int option)
{
return await Task.Run(() =>
{
@@ -655,7 +736,7 @@
int repeatTime = 100;
do
{
- isStop = IsStop((short)IConfig.CardNum, (short)axisNum);
+ isStop = IsStop((short)axisNum);
Thread.Sleep(10);
repeatTime--;
} while (!isStop && repeatTime > 0);
@@ -787,23 +868,65 @@
/// <param name="cardNum">鏉垮崱鍙�</param>
/// <param name="axisNum">杞村彿</param>
/// <returns></returns>
- public bool IsStop(short cardNum, short axisNum)
+ public bool IsStop(short axisNum)
+ {
+ int sts = GetAxisStatus(axisNum);
+ if ((sts & 0x400) == 0) return true;//鍋滄杩斿洖true
+ else return false; //杩愯涓繑鍥瀎alse
+ }
+
+ /// <summary>
+ /// 璇诲彇杞寸姸鎬�
+ /// </summary>
+ /// <param name="axisNum">杞村彿</param>
+ /// <returns></returns>
+ public override int GetAxisStatus(int axisNum)
{
lock (moveLock)
{
int sts = 0;
uint pclock = 0;
- GTSCardAPI.GT_GetSts(cardNum, axisNum, out sts, 1, out pclock);
- if ((sts & 0x400) == 0) return true;//鍋滄杩斿洖true
- else return false; //杩愯涓繑鍥瀎alse
+ GTSCardAPI.GT_GetSts((short)IConfig.CardNum, (short)axisNum, out sts, 1, out pclock);
+ return sts;
}
+ }
+
+ public override bool ClearStatus(int startAxisIndex, int count)
+ {
+ var rtn = GTSCardAPI.GT_ClrSts((short)IConfig.CardNum, (short)startAxisIndex, (short)count);
+ return rtn == (short)GTSRetCode.GRCRunOK;
+ }
+
+ public override bool PositionReset(int startAxisIndex, int count)
+ {
+ var rtn = GTSCardAPI.GT_ZeroPos((short)IConfig.CardNum, (short)startAxisIndex, (short)count);
+ return rtn == (short)GTSRetCode.GRCRunOK;
}
#endregion
#region IMonitor
- //public List<IOItem> MonitorValues { get; set; } = new List<IOItem>();
+ public List<AxisMovingStatus> GetAxisMovingStatus()
+ {
+ List<AxisMovingStatus> axisMovingStatusesList = new List<AxisMovingStatus>();
+ foreach (var axisConfig in IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled))
+ {
+ AxisMovingStatus axisMovingStatus = new AxisMovingStatus();
+ axisMovingStatus.AxisIndex = axisConfig.AxisIndex;
+ axisMovingStatus.AxisName = axisConfig.AxisName;
+ axisMovingStatus.CurPosition = Convert.ToInt32(GetPosition(axisMovingStatus.AxisIndex));
+ axisMovingStatus.Destination = Convert.ToInt32(GetPrfPosition(axisMovingStatus.AxisIndex));
+ axisMovingStatus.CurVelocity = GetVelocity(axisMovingStatus.AxisIndex);
+ axisMovingStatus.PrfVelocity = GetPrfVelocity(axisMovingStatus.AxisIndex);
+ axisMovingStatus.AxisStatus = GetAxisStatus(axisMovingStatus.AxisIndex);
+
+ axisMovingStatusesList.Add(axisMovingStatus);
+
+ }
+
+ return axisMovingStatusesList;
+ }
public List<IOItem> GetMonitorValues()
@@ -849,7 +972,8 @@
if (!IConfig.IsEnableMonitor)
return;
var newValues = GetMonitorValues();
- if (newValues == null || newValues.Count == 0)
+ var newAxisMovingStatus = GetAxisMovingStatus();
+ if (newValues == null || newValues.Count == 0 || newAxisMovingStatus == null || newAxisMovingStatus.Count == 0)
continue;
Stopwatch sw = new Stopwatch();
@@ -860,6 +984,8 @@
var tempOld = MonitorValues.DeepSerializeClone();
MonitorCheckAndInvoke(tempNew, tempOld);
}
+
+ AxisMovingOptionValues = new List<AxisMovingStatus>(newAxisMovingStatus);
MonitorValues = new List<IOItem>(newValues);
sw.Stop();
@@ -965,12 +1091,11 @@
public override void ResetAlarm()
{
int axis_sts;
- uint clk;
var axisSettings = IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled);
- GTSCardAPI.GT_ClrSts((short)IConfig.CardNum, 1, (short)axisSettings.Count);
+ ClearStatus(1, axisSettings.Count);
foreach (var axisSetting in axisSettings)
{
- GTSCardAPI.GT_GetSts((short)IConfig.CardNum, (short)axisSetting.AxisIndex, out axis_sts, 1, out clk);
+ axis_sts = GetAxisStatus((short)axisSetting.AxisIndex);
if ((axis_sts & 0x200) == 0)
{
var rst = GTSCardAPI.GT_AxisOn((short)IConfig.CardNum, (short)axisSetting.AxisIndex);
@@ -1001,7 +1126,7 @@
}
// 娓呴櫎鐘舵��
- GTSCardAPI.GT_ClrSts((short)IConfig.CardNum, 1, (short)IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled).Count);
+ ClearStatus(1, axisSettings.Count);
}
object _alarmLock = new object();
diff --git a/src/Bro.M071.Process.DBManager/App.config b/src/Bro.M071.DBManager/App.config
similarity index 100%
rename from src/Bro.M071.Process.DBManager/App.config
rename to src/Bro.M071.DBManager/App.config
diff --git a/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj b/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
similarity index 91%
rename from src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj
rename to src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
index 92dae28..3ab26b5 100644
--- a/src/Bro.M071.Process.DBManager/Bro.M071.DBManager.csproj
+++ b/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
@@ -8,8 +8,8 @@
<ProjectGuid>{230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Bro.Process.DBManager</RootNamespace>
- <AssemblyName>Bro.Process.DBManager</AssemblyName>
+ <RootNamespace>Bro.M071.DBManager</RootNamespace>
+ <AssemblyName>Bro.M071.DBManager</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
@@ -45,7 +45,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
@@ -80,6 +80,10 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
+ <Reference Include="EPPlus, Version=5.2.0.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EPPlus.5.2.0\lib\net45\EPPlus.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationCore" />
<Reference Include="SQLite.CodeFirst, Version=1.5.3.29, Culture=neutral, PublicKeyToken=eb96ba0a78d831a7, processorArchitecture=MSIL">
<HintPath>..\..\packages\SQLite.CodeFirst.1.5.3.29\lib\net45\SQLite.CodeFirst.dll</HintPath>
</Reference>
@@ -99,6 +103,9 @@
<Reference Include="System.Data.SQLite.Linq, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.112.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Security" />
+ <Reference Include="System.Threading.Tasks" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -107,6 +114,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="ExcelExportHelper.cs" />
<Compile Include="KeyUnitDataManager.cs" />
<Compile Include="MeasurementAndKeyDataRelationManager.cs" />
<Compile Include="ModelManager.cs" />
@@ -124,8 +132,8 @@
<Project>{987308DD-8BAA-463A-94E2-77D62E01A5BF}</Project>
<Name>Bro.Common.Device</Name>
</ProjectReference>
- <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Model.csproj">
- <Project>{AD645C48-5811-4B1E-B81F-D35D5E6B577F}</Project>
+ <ProjectReference Include="..\Bro.M071.Model\Bro.M071.Model.csproj">
+ <Project>{ad645c48-5811-4b1e-b81f-d35d5e6b577f}</Project>
<Name>Bro.M071.Model</Name>
</ProjectReference>
</ItemGroup>
diff --git a/src/Bro.M071.DBManager/ExcelExportHelper.cs b/src/Bro.M071.DBManager/ExcelExportHelper.cs
new file mode 100644
index 0000000..b894e68
--- /dev/null
+++ b/src/Bro.M071.DBManager/ExcelExportHelper.cs
@@ -0,0 +1,143 @@
+锘縰sing OfficeOpenXml;
+using OfficeOpenXml.Style;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Linq;
+
+namespace Bro.M071.DBManager
+{
+ /// <summary>
+ /// Excel瀵煎嚭甯姪绫�
+ /// </summary>
+ public class ExcelExportHelper
+ {
+ public static string ExcelContentType => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ /// <summary>
+ /// List杞珼ataTable
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ public static DataTable ListToDataTable<T>(List<T> data)
+ {
+ PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(typeof(T));
+ DataTable dataTable = new DataTable();
+ for (int i = 0; i < properties.Count; i++)
+ {
+ PropertyDescriptor property = properties[i];
+ dataTable.Columns.Add(property.Name, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType);
+ }
+ object[] values = new object[properties.Count];
+ foreach (T item in data)
+ {
+ for (int i = 0; i < values.Length; i++)
+ {
+ values[i] = properties[i].GetValue(item);
+ }
+ dataTable.Rows.Add(values);
+ }
+ return dataTable;
+ }
+
+ /// <summary>
+ /// 瀵煎嚭Excel
+ /// </summary>
+ /// <param name="dataTable">鏁版嵁婧�</param>
+ /// <param name="heading">宸ヤ綔绨縒orksheet</param>
+ /// <param name="showSrNo">//鏄惁鏄剧ず琛岀紪鍙�</param>
+ /// <param name="columnsToTake">瑕佸鍑虹殑鍒�</param>
+ /// <returns></returns>
+ public static byte[] ExportExcel(DataTable dataTable, string heading = "", bool showSrNo = false, params string[] columnsToTake)
+ {
+ byte[] result;
+ using (ExcelPackage package = new ExcelPackage())
+ {
+ ExcelWorksheet workSheet = package.Workbook.Worksheets.Add($"{heading}Data");
+ int startRowFrom = string.IsNullOrEmpty(heading) ? 1 : 3; //寮�濮嬬殑琛�
+ //鏄惁鏄剧ず琛岀紪鍙�
+ if (showSrNo)
+ {
+ DataColumn dataColumn = dataTable.Columns.Add("#", typeof(int));
+ dataColumn.SetOrdinal(0);
+ int index = 1;
+ foreach (DataRow item in dataTable.Rows)
+ {
+ item[0] = index;
+ index++;
+ }
+ }
+ //Add Content Into the Excel File
+ workSheet.Cells["A" + startRowFrom].LoadFromDataTable(dataTable, true);
+ // autofit width of cells with small content
+ int columnIndex = 1;
+ foreach (DataColumn item in dataTable.Columns)
+ {
+ ExcelRange columnCells = workSheet.Cells[workSheet.Dimension.Start.Row, columnIndex, workSheet.Dimension.End.Row, columnIndex];
+ int maxLength = columnCells.Max(cell => cell.Value.ToString().Count());
+ if (maxLength < 150)
+ {
+ workSheet.Column(columnIndex).AutoFit();
+ }
+ columnIndex++;
+ }
+ // format header - bold, yellow on black
+ using (ExcelRange r = workSheet.Cells[startRowFrom, 1, startRowFrom, dataTable.Columns.Count])
+ {
+ r.Style.Font.Color.SetColor(System.Drawing.Color.White);
+ r.Style.Font.Bold = true;
+ r.Style.Fill.PatternType = ExcelFillStyle.Solid;
+ r.Style.Fill.BackgroundColor.SetColor(System.Drawing.ColorTranslator.FromHtml("#1fb5ad"));
+ }
+ // format cells - add borders
+ using (ExcelRange r = workSheet.Cells[startRowFrom + 1, 1, startRowFrom + dataTable.Rows.Count, dataTable.Columns.Count])
+ {
+ r.Style.Border.Top.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Bottom.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Left.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Right.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Top.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Bottom.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Left.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Right.Color.SetColor(System.Drawing.Color.Black);
+ }
+ // removed ignored columns
+ for (int i = dataTable.Columns.Count - 1; i >= 0; i--)
+ {
+ if (i == 0 && showSrNo)
+ {
+ continue;
+ }
+ if (!columnsToTake.Contains(dataTable.Columns[i].ColumnName))
+ {
+ workSheet.DeleteColumn(i + 1);
+ }
+ }
+ if (!string.IsNullOrEmpty(heading))
+ {
+ workSheet.Cells["A1"].Value = heading;
+ workSheet.Cells["A1"].Style.Font.Size = 20;
+ workSheet.InsertColumn(1, 1);
+ workSheet.InsertRow(1, 1);
+ workSheet.Column(1).Width = 5;
+ }
+ result = package.GetAsByteArray();
+ }
+ return result;
+ }
+ /// <summary>
+ /// 瀵煎嚭Excel
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="data"></param>
+ /// <param name="heading"></param>
+ /// <param name="isShowSlNo"></param>
+ /// <param name="columnsToTake"></param>
+ /// <returns></returns>
+ public static byte[] ExportExcel<T>(List<T> data, string heading = "", bool isShowSlNo = false, params string[] columnsToTake)
+ {
+ return ExportExcel(ListToDataTable(data), heading, isShowSlNo, columnsToTake);
+ }
+ }
+}
diff --git a/src/Bro.M071.Process.DBManager/KeyUnitDataManager.cs b/src/Bro.M071.DBManager/KeyUnitDataManager.cs
similarity index 100%
rename from src/Bro.M071.Process.DBManager/KeyUnitDataManager.cs
rename to src/Bro.M071.DBManager/KeyUnitDataManager.cs
diff --git a/src/Bro.M071.Process.DBManager/MeasurementAndKeyDataRelationManager.cs b/src/Bro.M071.DBManager/MeasurementAndKeyDataRelationManager.cs
similarity index 100%
rename from src/Bro.M071.Process.DBManager/MeasurementAndKeyDataRelationManager.cs
rename to src/Bro.M071.DBManager/MeasurementAndKeyDataRelationManager.cs
diff --git a/src/Bro.M071.Process.DBManager/MeasurementUnitResultManager.cs b/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
similarity index 60%
rename from src/Bro.M071.Process.DBManager/MeasurementUnitResultManager.cs
rename to src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
index 6e7a08e..346af64 100644
--- a/src/Bro.M071.Process.DBManager/MeasurementUnitResultManager.cs
+++ b/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
@@ -29,23 +29,56 @@
{
}
- public List<MeasurementUnitResult> GetMeasurementUnitResult()
+ public List<MeasurementUnitResult_DTO> GetMeasurementUnitResult(MeasurementUnitResultRequest request)
{
using (DBModel context = new DBModel())
{
- var list = context.MeasurementUnitResult.Where(u => u.IS_DELETED == 0);
+ var mList = context.MeasurementUnitResult.Where(u => u.IS_DELETED == 0);
+ var pList = context.ProductionMeasurementRecords.Where(u => u.IS_DELETED == 0);
- //if (!string.IsNullOrWhiteSpace(productionBatchNO))
- //{
- // list = list.Where(u => u.ProductionBatchNO.Contains(productionBatchNO));
- //}
- //if (!string.IsNullOrWhiteSpace(pid))
- //{
- // list = list.Where(u => u.PId.Contains(pid));
- //}
+ if (!string.IsNullOrWhiteSpace(request.ProductionBarcode))
+ {
+ pList = pList.Where(u => u.ProductionBarcode.Contains(request.ProductionBarcode));
+ }
+ if (!string.IsNullOrWhiteSpace(request.ProductionCode))
+ {
+ pList = pList.Where(u => u.ProductionCode.Contains(request.ProductionCode));
+ }
+ if (request.StartTime != null)
+ {
+ pList = pList.Where(u => u.OperationStartTime >= request.StartTime);
+ }
+ if (request.EndTime != null)
+ {
+ pList = pList.Where(u => u.OperationStartTime <= request.EndTime);
+ }
+ //mList
+ if (!string.IsNullOrWhiteSpace(request.MeasurementName))
+ {
+ mList = mList.Where(u => u.MeasurementName.Contains(request.MeasurementName));
+ }
+ if (!string.IsNullOrWhiteSpace(request.MeasurementResult))
+ {
+ mList = mList.Where(u => u.MeasurementResult==request.MeasurementResult);
+ }
+ if (!string.IsNullOrWhiteSpace(request.MeasurementType))
+ {
+ mList = mList.Where(u => u.MeasurementType == request.MeasurementType);
+ }
- var resultList = list.ToList();
- return resultList;
+ var query = from productionMeasurementRecords in pList
+ join measurementUnitResult in mList
+ on productionMeasurementRecords.ID equals measurementUnitResult.ProductionMeasurementRecordsId
+ //into pmList
+ select new MeasurementUnitResult_DTO
+ {
+ ProductionMeasurementRecord= productionMeasurementRecords,
+ MeasurementUnitResult= measurementUnitResult
+
+ };
+ var pageList = query.OrderBy(u => u.ProductionMeasurementRecord.OperationStartTime).ToPagedList(request);
+ request.TotalNum = mList.Count();
+ return pageList;
}
}
diff --git a/src/Bro.M071.Process.DBManager/ModelManager.cs b/src/Bro.M071.DBManager/ModelManager.cs
similarity index 100%
rename from src/Bro.M071.Process.DBManager/ModelManager.cs
rename to src/Bro.M071.DBManager/ModelManager.cs
diff --git a/src/Bro.M071.Process.DBManager/ProductionMeasurementRecordsManager.cs b/src/Bro.M071.DBManager/ProductionMeasurementRecordsManager.cs
similarity index 78%
rename from src/Bro.M071.Process.DBManager/ProductionMeasurementRecordsManager.cs
rename to src/Bro.M071.DBManager/ProductionMeasurementRecordsManager.cs
index 0551fda..1526b59 100644
--- a/src/Bro.M071.Process.DBManager/ProductionMeasurementRecordsManager.cs
+++ b/src/Bro.M071.DBManager/ProductionMeasurementRecordsManager.cs
@@ -29,23 +29,31 @@
{
}
- public List<ProductionMeasurementRecords> GetProductionMeasurementRecords()
+ public List<ProductionMeasurementRecords> GetProductionMeasurementRecords(ProductionMeasurementRecordsRequest request)
{
using (DBModel context = new DBModel())
{
- var list = context.ProductionMeasurementRecords.Where(u => u.IS_DELETED == 0);
+ var pList = context.ProductionMeasurementRecords.Where(u => u.IS_DELETED == 0);
+ if (!string.IsNullOrWhiteSpace(request.ProductionBarcode))
+ {
+ pList = pList.Where(u => u.ProductionBarcode.Contains(request.ProductionBarcode));
+ }
+ if (!string.IsNullOrWhiteSpace(request.ProductionCode))
+ {
+ pList = pList.Where(u => u.ProductionCode.Contains(request.ProductionCode));
+ }
+ if (request.StartTime != null)
+ {
+ pList = pList.Where(u => u.OperationStartTime >= request.StartTime);
+ }
+ if (request.EndTime != null)
+ {
+ pList = pList.Where(u => u.OperationStartTime <= request.EndTime);
+ }
- //if (!string.IsNullOrWhiteSpace(productionBatchNO))
- //{
- // list = list.Where(u => u.ProductionBatchNO.Contains(productionBatchNO));
- //}
- //if (!string.IsNullOrWhiteSpace(pid))
- //{
- // list = list.Where(u => u.PId.Contains(pid));
- //}
-
- var resultList = list.ToList();
- return resultList;
+ var pageList = pList.OrderBy(u => u.OperationStartTime).ToPagedList(request);
+ request.TotalNum = pList.Count();
+ return pageList;
}
}
diff --git a/src/Bro.M071.Process.DBManager/Properties/AssemblyInfo.cs b/src/Bro.M071.DBManager/Properties/AssemblyInfo.cs
similarity index 91%
rename from src/Bro.M071.Process.DBManager/Properties/AssemblyInfo.cs
rename to src/Bro.M071.DBManager/Properties/AssemblyInfo.cs
index 8895ef9..c0d909d 100644
--- a/src/Bro.M071.Process.DBManager/Properties/AssemblyInfo.cs
+++ b/src/Bro.M071.DBManager/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@
// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
-[assembly: AssemblyTitle("Bro.Process.DBManager")]
+[assembly: AssemblyTitle("Bro.M071.DBManager")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Bro.Process.DBManager")]
+[assembly: AssemblyProduct("Bro.M071.DBManager")]
[assembly: AssemblyCopyright("Copyright 漏 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/src/Bro.M071.Process.DBManager/SQLiteHelper.cs b/src/Bro.M071.DBManager/SQLiteHelper.cs
similarity index 99%
rename from src/Bro.M071.Process.DBManager/SQLiteHelper.cs
rename to src/Bro.M071.DBManager/SQLiteHelper.cs
index 6da6230..f341b4e 100644
--- a/src/Bro.M071.Process.DBManager/SQLiteHelper.cs
+++ b/src/Bro.M071.DBManager/SQLiteHelper.cs
@@ -7,7 +7,7 @@
using System.Data.SQLite;
using System.Configuration;
-namespace Bro.Process.DataBase
+namespace Bro.M071.DBManager
{
public class SQLiteHelper
{
diff --git a/src/Bro.M071.Process.DBManager/packages.config b/src/Bro.M071.DBManager/packages.config
similarity index 90%
rename from src/Bro.M071.Process.DBManager/packages.config
rename to src/Bro.M071.DBManager/packages.config
index 455fb3e..60bc1ae 100644
--- a/src/Bro.M071.Process.DBManager/packages.config
+++ b/src/Bro.M071.DBManager/packages.config
@@ -1,6 +1,7 @@
锘�<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.0" targetFramework="net452" />
+ <package id="EPPlus" version="5.2.0" targetFramework="net452" />
<package id="SQLite.CodeFirst" version="1.5.3.29" targetFramework="net452" />
<package id="System.Data.SQLite" version="1.0.112.0" targetFramework="net452" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net452" />
diff --git a/src/Bro.M071.Process.Model/App.config b/src/Bro.M071.Model/App.config
similarity index 99%
rename from src/Bro.M071.Process.Model/App.config
rename to src/Bro.M071.Model/App.config
index 274ca45..2dba76c 100644
--- a/src/Bro.M071.Process.Model/App.config
+++ b/src/Bro.M071.Model/App.config
@@ -38,6 +38,6 @@
</assemblyBinding>
</runtime>
<startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
\ No newline at end of file
diff --git a/src/Bro.M071.Process.Model/BaseModel.cs b/src/Bro.M071.Model/BaseModel.cs
similarity index 100%
rename from src/Bro.M071.Process.Model/BaseModel.cs
rename to src/Bro.M071.Model/BaseModel.cs
diff --git a/src/Bro.M071.Process.Model/Bro.M071.Model.csproj b/src/Bro.M071.Model/Bro.M071.Model.csproj
similarity index 81%
rename from src/Bro.M071.Process.Model/Bro.M071.Model.csproj
rename to src/Bro.M071.Model/Bro.M071.Model.csproj
index f867809..acde90c 100644
--- a/src/Bro.M071.Process.Model/Bro.M071.Model.csproj
+++ b/src/Bro.M071.Model/Bro.M071.Model.csproj
@@ -8,8 +8,8 @@
<ProjectGuid>{AD645C48-5811-4B1E-B81F-D35D5E6B577F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Bro.Process.Model</RootNamespace>
- <AssemblyName>Bro.Process.Model</AssemblyName>
+ <RootNamespace>Bro.M071.Model</RootNamespace>
+ <AssemblyName>Bro.M071.Model</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
@@ -46,7 +46,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
@@ -108,6 +108,10 @@
<ItemGroup>
<Compile Include="BaseModel.cs" />
<Compile Include="DBModel.cs" />
+ <Compile Include="Migrations\202007070851439_initDB.cs" />
+ <Compile Include="Migrations\202007070851439_initDB.designer.cs">
+ <DependentUpon>202007070851439_initDB.cs</DependentUpon>
+ </Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Model\KeyUnitData.cs" />
<Compile Include="Model\MeasurementUnitResult.cs" />
@@ -120,7 +124,6 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bro.Common.Model\Bro.Common.Model.csproj">
@@ -128,14 +131,10 @@
<Name>Bro.Common.Model</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Migrations\202007070851439_initDB.resx">
+ <DependentUpon>202007070851439_initDB.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
- <PropertyGroup>
- </PropertyGroup>
- <Error Condition="!Exists('..\..\packages\EntityFramework.6.4.0\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.4.0\build\EntityFramework.props'))" />
- <Error Condition="!Exists('..\..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.4.0\build\EntityFramework.targets'))" />
- <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.112.0\build\net451\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.112.0\build\net451\System.Data.SQLite.Core.targets'))" />
- </Target>
- <Import Project="..\..\packages\EntityFramework.6.4.0\build\EntityFramework.targets" Condition="Exists('..\..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" />
- <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.112.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.112.0\build\net451\System.Data.SQLite.Core.targets')" />
</Project>
\ No newline at end of file
diff --git a/src/Bro.M071.Process.Model/DBModel.cs b/src/Bro.M071.Model/DBModel.cs
similarity index 100%
rename from src/Bro.M071.Process.Model/DBModel.cs
rename to src/Bro.M071.Model/DBModel.cs
diff --git a/src/Bro.M071.Model/Migrations/202007070851439_initDB.Designer.cs b/src/Bro.M071.Model/Migrations/202007070851439_initDB.Designer.cs
new file mode 100644
index 0000000..779cd8c
--- /dev/null
+++ b/src/Bro.M071.Model/Migrations/202007070851439_initDB.Designer.cs
@@ -0,0 +1,29 @@
+锘�// <auto-generated />
+namespace Bro.M071.Model.Migrations
+{
+ using System.CodeDom.Compiler;
+ using System.Data.Entity.Migrations;
+ using System.Data.Entity.Migrations.Infrastructure;
+ using System.Resources;
+
+ [GeneratedCode("EntityFramework.Migrations", "6.4.0")]
+ public sealed partial class initDB : IMigrationMetadata
+ {
+ private readonly ResourceManager Resources = new ResourceManager(typeof(initDB));
+
+ string IMigrationMetadata.Id
+ {
+ get { return "202007070851439_initDB"; }
+ }
+
+ string IMigrationMetadata.Source
+ {
+ get { return null; }
+ }
+
+ string IMigrationMetadata.Target
+ {
+ get { return Resources.GetString("Target"); }
+ }
+ }
+}
diff --git a/src/Bro.M071.Model/Migrations/202007070851439_initDB.cs b/src/Bro.M071.Model/Migrations/202007070851439_initDB.cs
new file mode 100644
index 0000000..01e4879
--- /dev/null
+++ b/src/Bro.M071.Model/Migrations/202007070851439_initDB.cs
@@ -0,0 +1,92 @@
+锘縩amespace Bro.M071.Model.Migrations
+{
+ using System;
+ using System.Data.Entity.Migrations;
+
+ public partial class initDB : DbMigration
+ {
+ public override void Up()
+ {
+ CreateTable(
+ "dbo.KeyUnitData",
+ c => new
+ {
+ ID = c.String(nullable: false, maxLength: 64),
+ ProductionMeasurementRecordsId = c.String(maxLength: 64),
+ Key = c.String(maxLength: 64),
+ MeasurementItem = c.String(maxLength: 64),
+ ItemValue = c.String(maxLength: 64),
+ IS_DISABLED = c.Int(nullable: false),
+ IS_DELETED = c.Int(nullable: false),
+ CREATE_USER = c.String(maxLength: 64),
+ CREATE_TIME = c.DateTime(nullable: false),
+ UPDATE_USER = c.String(maxLength: 64),
+ UPDATE_TIME = c.DateTime(),
+ })
+ .PrimaryKey(t => t.ID);
+
+ CreateTable(
+ "dbo.MeasurementAndKeyDataRelation",
+ c => new
+ {
+ ID = c.String(nullable: false, maxLength: 64),
+ KeyUnitDataId = c.String(maxLength: 64),
+ MeasurementUnitResultId = c.String(maxLength: 64),
+ IS_DISABLED = c.Int(nullable: false),
+ IS_DELETED = c.Int(nullable: false),
+ CREATE_USER = c.String(maxLength: 64),
+ CREATE_TIME = c.DateTime(nullable: false),
+ UPDATE_USER = c.String(maxLength: 64),
+ UPDATE_TIME = c.DateTime(),
+ })
+ .PrimaryKey(t => t.ID);
+
+ CreateTable(
+ "dbo.MeasurementUnitResult",
+ c => new
+ {
+ ID = c.String(nullable: false, maxLength: 64),
+ ProductionMeasurementRecordsId = c.String(maxLength: 64),
+ MeasurementName = c.String(maxLength: 64),
+ MeasurementType = c.String(maxLength: 64),
+ MeasurementValue = c.String(maxLength: 64),
+ MeasurementResult = c.String(maxLength: 64),
+ IS_DISABLED = c.Int(nullable: false),
+ IS_DELETED = c.Int(nullable: false),
+ CREATE_USER = c.String(maxLength: 64),
+ CREATE_TIME = c.DateTime(nullable: false),
+ UPDATE_USER = c.String(maxLength: 64),
+ UPDATE_TIME = c.DateTime(),
+ })
+ .PrimaryKey(t => t.ID);
+
+ CreateTable(
+ "dbo.ProductionMeasurementRecords",
+ c => new
+ {
+ ID = c.String(nullable: false, maxLength: 64),
+ ProductionCode = c.String(maxLength: 64),
+ ProductionBarcode = c.String(maxLength: 64),
+ ProductionResult = c.String(maxLength: 64),
+ OperationStartTime = c.DateTime(nullable: false),
+ OperationEndTime = c.DateTime(nullable: false),
+ IS_DISABLED = c.Int(nullable: false),
+ IS_DELETED = c.Int(nullable: false),
+ CREATE_USER = c.String(maxLength: 64),
+ CREATE_TIME = c.DateTime(nullable: false),
+ UPDATE_USER = c.String(maxLength: 64),
+ UPDATE_TIME = c.DateTime(),
+ })
+ .PrimaryKey(t => t.ID);
+
+ }
+
+ public override void Down()
+ {
+ DropTable("dbo.ProductionMeasurementRecords");
+ DropTable("dbo.MeasurementUnitResult");
+ DropTable("dbo.MeasurementAndKeyDataRelation");
+ DropTable("dbo.KeyUnitData");
+ }
+ }
+}
diff --git a/src/Bro.M071.Model/Migrations/202007070851439_initDB.resx b/src/Bro.M071.Model/Migrations/202007070851439_initDB.resx
new file mode 100644
index 0000000..6b09195
--- /dev/null
+++ b/src/Bro.M071.Model/Migrations/202007070851439_initDB.resx
@@ -0,0 +1,126 @@
+锘�<?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>
+ <data name="Target" xml:space="preserve">
+ <value>H4sIAAAAAAAEAO1c227bOBB9X2D/QdBzaiXpYi9Zu0V8SeFu3GQtu08FCloaO8JKlCFSQfxt+7CftL+wpK7U1ZIsuZcVAjQVZ3hmSHEOqeEg//79z/Dti2VKz+AQw8Yj+WpwKUuANVs38G4ku3T76lf57ZsffxjOdOtF+hjqveZ6rCcmI/mJ0v2NohDtCSxEBpahOTaxt3Sg2ZaCdFu5vrz8Tbm6UoBByAxLkoZLF1PDAu+BPU5srMGeushc2DqYJGhnEtVDlT4gC8geaTCSx449WFz+cjXwVGXp1jQQ80IFcytLCGObIsp8vFkTUKlj4526Zw3IXB32wPS2yCQQ+H4Tq1cdxuU1H4YSdwyhNJdQ26oJePU6mBcl3b3R7MrRvLGZm7EZpgc+am/2RvIfcFhjg04RRbKUtnczMR2um57f4F+h74WU1LiIVgVbPPznQpq4JnUdGGFwqYOYxqO7MQ2NgazsvwCPsGuaoq/MWyZLNLCmR8feg0MPS9gGI5hPZUlJ9lPSHaNuQh9/YGw1sEUtSwv0cg94R59G8s8/ydKd8QJ62BCsDjZWFgKsD3Vc9viB+Ys2JkRypdQke9Rdjc/qAhBhE2EBpkvQbEcnc/10d8qtswnp2oQwrDkFq2tz3MZHZHLFjg2pn6dz9XZ8P4sWzRzT19e1VwAHmt3PVqfiTJaz29Xs81qdLbsee2BqNV/MQlMs2mHFWLq22+vH6bncDkzluy12HSoxIZbSpLC4b7HOoomT3hLMgJZrEmcpWk+lFcgs3He6Z07hXXGjSyBs8rs327NOzzr5a+8UtolRepb5ug9sgk3ecEZz3NAZzZ3lDJd4g34Q9fTd03fH9F3GILVZvAysJ/PqZD5hIF0vpdjaGDnaWQ2eh94e2IO3aFWKHOqHyImRHkHOsN4KYE/B/1cKntiYIgODE8BOx0FWOEO5awIB65LAw6R/Pp4KNC9bGrvgJ5oHCalSjnQkoZDBPqJf3Zr4IVFmRdQ7gl6+z2WMlKvnvebohcZXAIp/BxDeFSgFlwXDBdrv2VoVLg+CFkn1bw4mr9T6aXXLx1A0kpNdj7yNLFHbQTtISZlp5umd4RBvxWwQD5eJbmXUwuVb8BJCK9kVmt694zcR9uH/9/ulzhwlMPEU3rFR8XfnDRAih0qd8PqrGjKRk3MqmNima+Gik0VZ72NfayLyMd3qVr20ugjtNVTvn8mZi1gZYXVcITmemNK4uQaWuI8m0ERBPbxwO03Dhe3V0RKbqgiXENTG87egHDxfUB0vsXuKeAlBbbysfwlBFm+opII2TQ5Khh1Sp/o04VSio/Jt6wSCqgVcgbJq4nVDYqnEdopYRFEjiknmrwuoJqnU00RPE0l51zQhnDvboYdiwHq0UIbzPZ1pMpnnAqLwhY1w/RRzAa4vbISbc+TJShshh19CBdD5H0qlK6Ony54um9Jl6Rf0CaxZB7cCedaD65pD/cRvPmf6siaoUYI3HzgSN8HOI52stDpyXtZWxM6TN0CPEri52JG058qeK5PyE7gykylMq0TWo4xhKjM4DLJ0x2uNM2k7X0WW2EQ9GzpP2akHQsEacIWB+ue9QSGWLhA2tkCof+8m60xHIrbrMOjpzafH5cP72WSlfuK0/IkDjJkF72mgb34fGxg5h3fr+XR05yfYE5XOX0/VsUKIblYvPT77zSN+Zsz8hJzMJUYnVSIVrNWs4m0JsaBotyX0TI1uW7jZqz0D0xYu9pqg5FzrtTTMnFs8xhZAW7rFa8nLnEu7PC+zUC0V336z1JFbxtp+XOdVrfZx2MfhSXFYlAz7luLvrFt3QT1n++hi+Wb76F3s5oXFmT1L9SxVn6WqZ52+TbISCxhbeimF9Yqt43cS4MXViI0DoKgasTFgT0LfPwml6w6z9V0F2f361YV+yom5vbHZCHx3v2D5YZ47X7Ri8YhDX6q4Mc+tTsohs8nMoSL+eYXhFIixiyH4H1vA4HkRg4Y6c7y1wwhiEyN6FKpkjnQU8cTmrUONLdIoE2tAiFc07B0hR/LM2oA+xw8u3bv0lhCwNmaidm6olNv3aj6TPg8f9vyJtDEE5qbBSeEBj13D1CO/77LUVQTB4/8d4GhzYr9hd4iQPti4IlAwfVPYA9b5GR+sPYsjIA9YRc/QxLc1gXvYIe0QpqWLQY6/iOS0D6cG2jnIIgFG3J89sjWsWy9v/gNA/V6hZUQAAA==</value>
+ </data>
+ <data name="DefaultSchema" xml:space="preserve">
+ <value>dbo</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/Bro.M071.Process.Model/Migrations/Configuration.cs b/src/Bro.M071.Model/Migrations/Configuration.cs
similarity index 100%
rename from src/Bro.M071.Process.Model/Migrations/Configuration.cs
rename to src/Bro.M071.Model/Migrations/Configuration.cs
diff --git a/src/Bro.M071.Process.Model/Model/KeyUnitData.cs b/src/Bro.M071.Model/Model/KeyUnitData.cs
similarity index 100%
rename from src/Bro.M071.Process.Model/Model/KeyUnitData.cs
rename to src/Bro.M071.Model/Model/KeyUnitData.cs
diff --git a/src/Bro.M071.Process.Model/Model/MeasurementAndKeyDataRelation.cs b/src/Bro.M071.Model/Model/MeasurementAndKeyDataRelation.cs
similarity index 100%
rename from src/Bro.M071.Process.Model/Model/MeasurementAndKeyDataRelation.cs
rename to src/Bro.M071.Model/Model/MeasurementAndKeyDataRelation.cs
diff --git a/src/Bro.M071.Process.Model/Model/MeasurementUnitResult.cs b/src/Bro.M071.Model/Model/MeasurementUnitResult.cs
similarity index 61%
rename from src/Bro.M071.Process.Model/Model/MeasurementUnitResult.cs
rename to src/Bro.M071.Model/Model/MeasurementUnitResult.cs
index 955f8a0..3d39b4c 100644
--- a/src/Bro.M071.Process.Model/Model/MeasurementUnitResult.cs
+++ b/src/Bro.M071.Model/Model/MeasurementUnitResult.cs
@@ -24,7 +24,7 @@
/// <summary>
/// 妫�娴嬬粨鏋滅被鍨� (Slant Alignment... )
/// </summary>
- [StringLength(64)]
+ [StringLength(64)]
public string MeasurementType { get; set; }
/// <summary>
@@ -43,6 +43,16 @@
public class MeasurementUnitResultRequest : BaseRequest
{
/// <summary>
+ /// 浜у搧缂栫爜
+ /// </summary>
+ public string ProductionCode { get; set; }
+
+ /// <summary>
+ /// 浜у搧鏉$爜
+ /// </summary>
+ public string ProductionBarcode { get; set; }
+
+ /// <summary>
/// 妫�娴嬪悕绉�
/// </summary>
public string MeasurementName { get; set; }
@@ -50,7 +60,26 @@
/// <summary>
/// 妫�娴嬪拰鏍囧噯绫诲瀷
/// </summary>
- public string MeasureType { get; set; }
+ public string MeasurementType { get; set; }
+
+ /// <summary>
+ /// 妫�娴嬬粨鏋� ok ng
+ /// </summary>
+ public string MeasurementResult { get; set; }
+ }
+
+ public class MeasurementUnitResult_DTO
+ {
+ /// <summary>
+ /// 浜у搧璁板綍
+ /// </summary>
+ public ProductionMeasurementRecords ProductionMeasurementRecord { get; set; }
+
+ /// <summary>
+ /// 妫�娴嬬粨鏋�
+ /// </summary>
+ public MeasurementUnitResult MeasurementUnitResult { get; set; }
+
}
}
diff --git a/src/Bro.M071.Process.Model/Model/ProductionMeasurementRecords.cs b/src/Bro.M071.Model/Model/ProductionMeasurementRecords.cs
similarity index 95%
rename from src/Bro.M071.Process.Model/Model/ProductionMeasurementRecords.cs
rename to src/Bro.M071.Model/Model/ProductionMeasurementRecords.cs
index ab65e8b..d8b9251 100644
--- a/src/Bro.M071.Process.Model/Model/ProductionMeasurementRecords.cs
+++ b/src/Bro.M071.Model/Model/ProductionMeasurementRecords.cs
@@ -55,7 +55,7 @@
/// <summary>
/// 浜у搧缁撴灉
/// </summary>
- public OutputResult ProductionResult { get; set; }
+ public string ProductionResult { get; set; }
}
}
diff --git a/src/Bro.M071.Process.Model/Properties/AssemblyInfo.cs b/src/Bro.M071.Model/Properties/AssemblyInfo.cs
similarity index 92%
rename from src/Bro.M071.Process.Model/Properties/AssemblyInfo.cs
rename to src/Bro.M071.Model/Properties/AssemblyInfo.cs
index 719162e..7764d88 100644
--- a/src/Bro.M071.Process.Model/Properties/AssemblyInfo.cs
+++ b/src/Bro.M071.Model/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@
// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
-[assembly: AssemblyTitle("Bro.Process.Model")]
+[assembly: AssemblyTitle("Bro.M071.Model")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Bro.Process.Model")]
+[assembly: AssemblyProduct("Bro.M071.Model")]
[assembly: AssemblyCopyright("Copyright 漏 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/src/Bro.M071.Process.Model/packages.config b/src/Bro.M071.Process.Model/packages.config
deleted file mode 100644
index 455fb3e..0000000
--- a/src/Bro.M071.Process.Model/packages.config
+++ /dev/null
@@ -1,10 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="EntityFramework" version="6.4.0" targetFramework="net452" />
- <package id="SQLite.CodeFirst" version="1.5.3.29" targetFramework="net452" />
- <package id="System.Data.SQLite" version="1.0.112.0" targetFramework="net452" />
- <package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net452" />
- <package id="System.Data.SQLite.EF6" version="1.0.112.0" targetFramework="net452" />
- <package id="System.Data.SQLite.EF6.Migrations" version="1.0.106" targetFramework="net452" />
- <package id="System.Data.SQLite.Linq" version="1.0.112.0" targetFramework="net452" />
-</packages>
\ No newline at end of file
diff --git a/src/Bro.M071.Process/Bro.M071.Process.csproj b/src/Bro.M071.Process/Bro.M071.Process.csproj
index cecc833..c81ab99 100644
--- a/src/Bro.M071.Process/Bro.M071.Process.csproj
+++ b/src/Bro.M071.Process/Bro.M071.Process.csproj
@@ -119,6 +119,12 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\KeyIndicator.cs" />
<Compile Include="UI\M071Node.cs" />
+ <Compile Include="UI\M071_DataForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="UI\M071_DataForm.Designer.cs">
+ <DependentUpon>M071_DataForm.cs</DependentUpon>
+ </Compile>
<Compile Include="UI\M071_MainForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -140,6 +146,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
+ <EmbeddedResource Include="UI\M071_DataForm.resx">
+ <DependentUpon>M071_DataForm.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="UI\M071_MainForm.resx">
<DependentUpon>M071_MainForm.cs</DependentUpon>
</EmbeddedResource>
@@ -167,7 +176,7 @@
<Project>{1A3CBFE7-3F78-42C3-95C5-10360450DBEA}</Project>
<Name>Bro.Common.Model</Name>
</ProjectReference>
- <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Model.csproj">
+ <ProjectReference Include="..\Bro.M071.Model\Bro.M071.Model.csproj">
<Project>{AD645C48-5811-4B1E-B81F-D35D5E6B577F}</Project>
<Name>Bro.M071.Model</Name>
</ProjectReference>
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
new file mode 100644
index 0000000..b475e6a
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
@@ -0,0 +1,413 @@
+锘縩amespace Bro.M071.Process.UI
+{
+ partial class M071_DataForm
+ {
+ /// <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.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.dataGridView1 = new System.Windows.Forms.DataGridView();
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.button7 = new System.Windows.Forms.Button();
+ this.button8 = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.dataGridView2 = new System.Windows.Forms.DataGridView();
+ this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
+ this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
+ this.tabPage2.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.panel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+ this.tableLayoutPanel3.SuspendLayout();
+ this.panel2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
+ this.SuspendLayout();
+ //
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPage1);
+ this.tabControl1.Controls.Add(this.tabPage2);
+ this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl1.Location = new System.Drawing.Point(0, 0);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(1024, 717);
+ this.tabControl1.TabIndex = 0;
+ //
+ // tabPage1
+ //
+ this.tabPage1.Controls.Add(this.tableLayoutPanel1);
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(1016, 691);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "浜у搧鐢熶骇璁板綍";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // tabPage2
+ //
+ this.tabPage2.Controls.Add(this.tableLayoutPanel3);
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(1016, 691);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "娴嬮噺缁撴灉鏁版嵁";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel1.Controls.Add(this.groupBox1, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 3;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(1010, 685);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(760, 3);
+ this.groupBox1.Name = "groupBox1";
+ this.tableLayoutPanel1.SetRowSpan(this.groupBox1, 3);
+ this.groupBox1.Size = new System.Drawing.Size(247, 679);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "鏄庣粏";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.textBox1);
+ this.panel1.Controls.Add(this.button4);
+ this.panel1.Controls.Add(this.button3);
+ this.panel1.Controls.Add(this.button2);
+ this.panel1.Controls.Add(this.button1);
+ this.panel1.Controls.Add(this.label1);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(3, 658);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(751, 24);
+ this.panel1.TabIndex = 1;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.label1.Location = new System.Drawing.Point(3, 3);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(42, 17);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(416, 1);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(55, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "绗竴椤�";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(477, 1);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(55, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "鍓嶄竴椤�";
+ this.button2.UseVisualStyleBackColor = true;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(632, 1);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(55, 23);
+ this.button3.TabIndex = 1;
+ this.button3.Text = "鍚庝竴椤�";
+ this.button3.UseVisualStyleBackColor = true;
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(693, 0);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(55, 23);
+ this.button4.TabIndex = 1;
+ this.button4.Text = "鏈�鍚庨〉";
+ this.button4.UseVisualStyleBackColor = true;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(542, 2);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(80, 21);
+ this.textBox1.TabIndex = 2;
+ //
+ // dataGridView1
+ //
+ this.dataGridView1.AllowUserToAddRows = false;
+ this.dataGridView1.AllowUserToDeleteRows = false;
+ this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.MenuBar;
+ this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridView1.Location = new System.Drawing.Point(3, 73);
+ this.dataGridView1.Name = "dataGridView1";
+ this.dataGridView1.ReadOnly = true;
+ this.dataGridView1.RowTemplate.Height = 23;
+ this.dataGridView1.Size = new System.Drawing.Size(751, 579);
+ this.dataGridView1.TabIndex = 2;
+ //
+ // tableLayoutPanel2
+ //
+ this.tableLayoutPanel2.ColumnCount = 8;
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ this.tableLayoutPanel2.RowCount = 2;
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(751, 64);
+ this.tableLayoutPanel2.TabIndex = 3;
+ //
+ // tableLayoutPanel3
+ //
+ this.tableLayoutPanel3.ColumnCount = 2;
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.Controls.Add(this.groupBox2, 1, 0);
+ this.tableLayoutPanel3.Controls.Add(this.panel2, 0, 2);
+ this.tableLayoutPanel3.Controls.Add(this.dataGridView2, 0, 1);
+ this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 0, 0);
+ this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+ this.tableLayoutPanel3.RowCount = 3;
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(1010, 685);
+ this.tableLayoutPanel3.TabIndex = 1;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox2.Location = new System.Drawing.Point(760, 3);
+ this.groupBox2.Name = "groupBox2";
+ this.tableLayoutPanel3.SetRowSpan(this.groupBox2, 3);
+ this.groupBox2.Size = new System.Drawing.Size(247, 679);
+ this.groupBox2.TabIndex = 0;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "鏄庣粏";
+ //
+ // panel2
+ //
+ this.panel2.Controls.Add(this.textBox2);
+ this.panel2.Controls.Add(this.button5);
+ this.panel2.Controls.Add(this.button6);
+ this.panel2.Controls.Add(this.button7);
+ this.panel2.Controls.Add(this.button8);
+ this.panel2.Controls.Add(this.label2);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel2.Location = new System.Drawing.Point(3, 658);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(751, 24);
+ this.panel2.TabIndex = 1;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(542, 2);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(80, 21);
+ this.textBox2.TabIndex = 2;
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(693, 0);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(55, 23);
+ this.button5.TabIndex = 1;
+ this.button5.Text = "鏈�鍚庨〉";
+ this.button5.UseVisualStyleBackColor = true;
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(632, 1);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(55, 23);
+ this.button6.TabIndex = 1;
+ this.button6.Text = "鍚庝竴椤�";
+ this.button6.UseVisualStyleBackColor = true;
+ //
+ // button7
+ //
+ this.button7.Location = new System.Drawing.Point(477, 1);
+ this.button7.Name = "button7";
+ this.button7.Size = new System.Drawing.Size(55, 23);
+ this.button7.TabIndex = 1;
+ this.button7.Text = "鍓嶄竴椤�";
+ this.button7.UseVisualStyleBackColor = true;
+ //
+ // button8
+ //
+ this.button8.Location = new System.Drawing.Point(416, 1);
+ this.button8.Name = "button8";
+ this.button8.Size = new System.Drawing.Size(55, 23);
+ this.button8.TabIndex = 1;
+ this.button8.Text = "绗竴椤�";
+ this.button8.UseVisualStyleBackColor = true;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.label2.Location = new System.Drawing.Point(3, 3);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(42, 17);
+ this.label2.TabIndex = 0;
+ this.label2.Text = "label2";
+ //
+ // dataGridView2
+ //
+ this.dataGridView2.AllowUserToAddRows = false;
+ this.dataGridView2.AllowUserToDeleteRows = false;
+ this.dataGridView2.BackgroundColor = System.Drawing.SystemColors.MenuBar;
+ this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridView2.Location = new System.Drawing.Point(3, 73);
+ this.dataGridView2.Name = "dataGridView2";
+ this.dataGridView2.ReadOnly = true;
+ this.dataGridView2.RowTemplate.Height = 23;
+ this.dataGridView2.Size = new System.Drawing.Size(751, 579);
+ this.dataGridView2.TabIndex = 2;
+ //
+ // tableLayoutPanel4
+ //
+ this.tableLayoutPanel4.ColumnCount = 8;
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel4.Name = "tableLayoutPanel4";
+ this.tableLayoutPanel4.RowCount = 2;
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(751, 64);
+ this.tableLayoutPanel4.TabIndex = 3;
+ //
+ // M071_DataForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1024, 717);
+ this.Controls.Add(this.tabControl1);
+ this.Name = "M071_DataForm";
+ this.Text = "M071_DataFrm";
+ this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
+ this.tabPage2.ResumeLayout(false);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.panel1.ResumeLayout(false);
+ this.panel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+ this.tableLayoutPanel3.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
+ this.panel2.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.DataGridView dataGridView1;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button button6;
+ private System.Windows.Forms.Button button7;
+ private System.Windows.Forms.Button button8;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.DataGridView dataGridView2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
+ }
+}
\ No newline at end of file
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.cs b/src/Bro.M071.Process/UI/M071_DataForm.cs
new file mode 100644
index 0000000..af0c8eb
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.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_DataForm", "鏁版嵁鏌ヨ鐣岄潰", 1, "M071Node", true)]
+ public partial class M071_DataForm : MenuFrmBase
+ {
+ public M071_DataForm()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.resx b/src/Bro.M071.Process/UI/M071_DataForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.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/Bro.UI.Config/App.config b/src/Bro.UI.Config/App.config
index 208a5c1..b5c8db5 100644
--- a/src/Bro.UI.Config/App.config
+++ b/src/Bro.UI.Config/App.config
@@ -1,5 +1,39 @@
锘�<?xml version="1.0" encoding="utf-8"?>
<configuration>
+ <configSections>
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+ <providers>
+ <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ <!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
+ </providers>
+ </entityFramework>
+ <connectionStrings>
+ <add name="DataBase" connectionString="data source=D:\PROJECTS\M071\DataBase\M071.db;BinaryGUID=False" providerName="System.Data.SQLite" />
+ </connectionStrings>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" />
+ <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+ </DbProviderFactories>
+ </system.data>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.0.112.0" newVersion="1.0.112.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.0.112.0" newVersion="1.0.112.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs
index 7b55454..1bbcd47 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs
@@ -28,46 +28,46 @@
/// </summary>
private void InitializeComponent()
{
- this.groupBoxAxisStatus = new System.Windows.Forms.GroupBox();
+ this.groupBoxAxisOperration = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.panel1 = new System.Windows.Forms.Panel();
- this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
+ this.buttonStop = new System.Windows.Forms.Button();
+ this.buttonStart = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.buttonClearStatus = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.label5 = new System.Windows.Forms.Label();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBoxP2PVel = new System.Windows.Forms.TextBox();
+ this.textBoxP2PPrfPosition = new System.Windows.Forms.TextBox();
+ this.textBoxP2PDec = new System.Windows.Forms.TextBox();
+ this.textBoxP2PAcc = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
- this.textBox5 = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.textBox6 = new System.Windows.Forms.TextBox();
+ this.label6 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
- this.textBox7 = new System.Windows.Forms.TextBox();
- this.button2 = new System.Windows.Forms.Button();
- this.button3 = new System.Windows.Forms.Button();
- this.groupBoxAxisStatus.SuspendLayout();
+ this.label8 = new System.Windows.Forms.Label();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.buttonNegative = new System.Windows.Forms.Button();
+ this.textBoxJogDec = new System.Windows.Forms.TextBox();
+ this.buttonPositive = new System.Windows.Forms.Button();
+ this.textBoxJogAcc = new System.Windows.Forms.TextBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.textBoxJogVel = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.groupBoxAxisOperration.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
- this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
+ this.panel1.SuspendLayout();
this.SuspendLayout();
//
- // groupBoxAxisStatus
+ // groupBoxAxisOperration
//
- this.groupBoxAxisStatus.Controls.Add(this.tableLayoutPanel1);
- this.groupBoxAxisStatus.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBoxAxisStatus.Location = new System.Drawing.Point(0, 0);
- this.groupBoxAxisStatus.Name = "groupBoxAxisStatus";
- this.groupBoxAxisStatus.Size = new System.Drawing.Size(547, 148);
- this.groupBoxAxisStatus.TabIndex = 5;
- this.groupBoxAxisStatus.TabStop = false;
- this.groupBoxAxisStatus.Text = "杞存搷浣�";
+ this.groupBoxAxisOperration.Controls.Add(this.tableLayoutPanel1);
+ this.groupBoxAxisOperration.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBoxAxisOperration.Location = new System.Drawing.Point(0, 0);
+ this.groupBoxAxisOperration.Name = "groupBoxAxisOperration";
+ this.groupBoxAxisOperration.Size = new System.Drawing.Size(547, 148);
+ this.groupBoxAxisOperration.TabIndex = 5;
+ this.groupBoxAxisOperration.TabStop = false;
+ this.groupBoxAxisOperration.Text = "杞存搷浣�";
//
// tableLayoutPanel1
//
@@ -86,45 +86,15 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(541, 128);
this.tableLayoutPanel1.TabIndex = 0;
//
- // panel1
- //
- this.panel1.Controls.Add(this.button1);
- this.panel1.Controls.Add(this.textBox3);
- this.panel1.Controls.Add(this.buttonClearStatus);
- this.panel1.Controls.Add(this.textBox2);
- this.panel1.Controls.Add(this.label5);
- this.panel1.Controls.Add(this.textBox1);
- this.panel1.Controls.Add(this.label4);
- this.panel1.Controls.Add(this.label3);
- this.panel1.Controls.Add(this.label2);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(3, 3);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(535, 58);
- this.panel1.TabIndex = 2;
- //
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("瀹嬩綋", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label2.Location = new System.Drawing.Point(0, 21);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(77, 19);
- this.label2.TabIndex = 2;
- this.label2.Text = "Jog妯″紡";
- this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
// panel2
//
- this.panel2.Controls.Add(this.button3);
- this.panel2.Controls.Add(this.button2);
+ this.panel2.Controls.Add(this.buttonStop);
+ this.panel2.Controls.Add(this.buttonStart);
this.panel2.Controls.Add(this.label1);
- this.panel2.Controls.Add(this.textBox5);
- this.panel2.Controls.Add(this.textBox4);
- this.panel2.Controls.Add(this.textBox7);
- this.panel2.Controls.Add(this.textBox6);
+ this.panel2.Controls.Add(this.textBoxP2PVel);
+ this.panel2.Controls.Add(this.textBoxP2PPrfPosition);
+ this.panel2.Controls.Add(this.textBoxP2PDec);
+ this.panel2.Controls.Add(this.textBoxP2PAcc);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.label9);
@@ -134,6 +104,26 @@
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(535, 58);
this.panel2.TabIndex = 3;
+ //
+ // buttonStop
+ //
+ this.buttonStop.Location = new System.Drawing.Point(462, 31);
+ this.buttonStop.Name = "buttonStop";
+ this.buttonStop.Size = new System.Drawing.Size(70, 25);
+ this.buttonStop.TabIndex = 6;
+ this.buttonStop.Text = "鍋滄";
+ this.buttonStop.UseVisualStyleBackColor = true;
+ this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click);
+ //
+ // buttonStart
+ //
+ this.buttonStart.Location = new System.Drawing.Point(462, 3);
+ this.buttonStart.Name = "buttonStart";
+ this.buttonStart.Size = new System.Drawing.Size(70, 25);
+ this.buttonStart.TabIndex = 6;
+ this.buttonStart.Text = "寮�濮�";
+ this.buttonStart.UseVisualStyleBackColor = true;
+ this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click);
//
// label1
//
@@ -148,87 +138,33 @@
this.label1.Text = "P2P妯″紡";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
- // textBox1
+ // textBoxP2PVel
//
- this.textBox1.Location = new System.Drawing.Point(154, 4);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(116, 21);
- this.textBox1.TabIndex = 5;
+ this.textBoxP2PVel.Location = new System.Drawing.Point(154, 34);
+ this.textBoxP2PVel.Name = "textBoxP2PVel";
+ this.textBoxP2PVel.Size = new System.Drawing.Size(116, 21);
+ this.textBoxP2PVel.TabIndex = 5;
//
- // label3
+ // textBoxP2PPrfPosition
//
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(92, 7);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(41, 12);
- this.label3.TabIndex = 4;
- this.label3.Text = "閫熷害锛�";
+ this.textBoxP2PPrfPosition.Location = new System.Drawing.Point(154, 4);
+ this.textBoxP2PPrfPosition.Name = "textBoxP2PPrfPosition";
+ this.textBoxP2PPrfPosition.Size = new System.Drawing.Size(116, 21);
+ this.textBoxP2PPrfPosition.TabIndex = 5;
//
- // label4
+ // textBoxP2PDec
//
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(92, 38);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(53, 12);
- this.label4.TabIndex = 4;
- this.label4.Text = "鍔犻�熷害锛�";
+ this.textBoxP2PDec.Location = new System.Drawing.Point(340, 34);
+ this.textBoxP2PDec.Name = "textBoxP2PDec";
+ this.textBoxP2PDec.Size = new System.Drawing.Size(116, 21);
+ this.textBoxP2PDec.TabIndex = 5;
//
- // textBox2
+ // textBoxP2PAcc
//
- this.textBox2.Location = new System.Drawing.Point(154, 35);
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(116, 21);
- this.textBox2.TabIndex = 5;
- //
- // buttonClearStatus
- //
- this.buttonClearStatus.Location = new System.Drawing.Point(462, 3);
- this.buttonClearStatus.Name = "buttonClearStatus";
- this.buttonClearStatus.Size = new System.Drawing.Size(70, 25);
- this.buttonClearStatus.TabIndex = 6;
- this.buttonClearStatus.Text = "姝e悜";
- this.buttonClearStatus.UseVisualStyleBackColor = true;
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(462, 33);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(70, 25);
- this.button1.TabIndex = 6;
- this.button1.Text = "璐熷悜";
- this.button1.UseVisualStyleBackColor = true;
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(278, 7);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(53, 12);
- this.label5.TabIndex = 4;
- this.label5.Text = "鍑忛�熷害锛�";
- //
- // textBox3
- //
- this.textBox3.Location = new System.Drawing.Point(340, 4);
- this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(116, 21);
- this.textBox3.TabIndex = 5;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(92, 7);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(65, 12);
- this.label6.TabIndex = 4;
- this.label6.Text = "瑙勫垝浣嶇疆锛�";
- //
- // textBox4
- //
- this.textBox4.Location = new System.Drawing.Point(154, 4);
- this.textBox4.Name = "textBox4";
- this.textBox4.Size = new System.Drawing.Size(116, 21);
- this.textBox4.TabIndex = 5;
+ this.textBoxP2PAcc.Location = new System.Drawing.Point(340, 4);
+ this.textBoxP2PAcc.Name = "textBoxP2PAcc";
+ this.textBoxP2PAcc.Size = new System.Drawing.Size(116, 21);
+ this.textBoxP2PAcc.TabIndex = 5;
//
// label7
//
@@ -239,28 +175,14 @@
this.label7.TabIndex = 4;
this.label7.Text = "閫熷害锛�";
//
- // textBox5
+ // label6
//
- this.textBox5.Location = new System.Drawing.Point(154, 34);
- this.textBox5.Name = "textBox5";
- this.textBox5.Size = new System.Drawing.Size(116, 21);
- this.textBox5.TabIndex = 5;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(278, 7);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(53, 12);
- this.label8.TabIndex = 4;
- this.label8.Text = "鍔犻�熷害锛�";
- //
- // textBox6
- //
- this.textBox6.Location = new System.Drawing.Point(340, 4);
- this.textBox6.Name = "textBox6";
- this.textBox6.Size = new System.Drawing.Size(116, 21);
- this.textBox6.TabIndex = 5;
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(92, 7);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(65, 12);
+ this.label6.TabIndex = 4;
+ this.label6.Text = "瑙勫垝浣嶇疆锛�";
//
// label9
//
@@ -271,70 +193,152 @@
this.label9.TabIndex = 4;
this.label9.Text = "鍑忛�熷害锛�";
//
- // textBox7
+ // label8
//
- this.textBox7.Location = new System.Drawing.Point(340, 34);
- this.textBox7.Name = "textBox7";
- this.textBox7.Size = new System.Drawing.Size(116, 21);
- this.textBox7.TabIndex = 5;
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(278, 7);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(53, 12);
+ this.label8.TabIndex = 4;
+ this.label8.Text = "鍔犻�熷害锛�";
//
- // button2
+ // panel1
//
- this.button2.Location = new System.Drawing.Point(462, 3);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(70, 25);
- this.button2.TabIndex = 6;
- this.button2.Text = "寮�濮�";
- this.button2.UseVisualStyleBackColor = true;
+ this.panel1.Controls.Add(this.buttonNegative);
+ this.panel1.Controls.Add(this.textBoxJogDec);
+ this.panel1.Controls.Add(this.buttonPositive);
+ this.panel1.Controls.Add(this.textBoxJogAcc);
+ this.panel1.Controls.Add(this.label5);
+ this.panel1.Controls.Add(this.textBoxJogVel);
+ this.panel1.Controls.Add(this.label4);
+ this.panel1.Controls.Add(this.label3);
+ this.panel1.Controls.Add(this.label2);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(3, 3);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(535, 58);
+ this.panel1.TabIndex = 2;
//
- // button3
+ // buttonNegative
//
- this.button3.Location = new System.Drawing.Point(462, 31);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(70, 25);
- this.button3.TabIndex = 6;
- this.button3.Text = "鍋滄";
- this.button3.UseVisualStyleBackColor = true;
+ this.buttonNegative.Location = new System.Drawing.Point(462, 33);
+ this.buttonNegative.Name = "buttonNegative";
+ this.buttonNegative.Size = new System.Drawing.Size(70, 25);
+ this.buttonNegative.TabIndex = 6;
+ this.buttonNegative.Text = "璐熷悜";
+ this.buttonNegative.UseVisualStyleBackColor = true;
+ this.buttonNegative.Click += new System.EventHandler(this.buttonNegative_Click);
+ //
+ // textBoxJogDec
+ //
+ this.textBoxJogDec.Location = new System.Drawing.Point(340, 4);
+ this.textBoxJogDec.Name = "textBoxJogDec";
+ this.textBoxJogDec.Size = new System.Drawing.Size(116, 21);
+ this.textBoxJogDec.TabIndex = 5;
+ //
+ // buttonPositive
+ //
+ this.buttonPositive.Location = new System.Drawing.Point(462, 3);
+ this.buttonPositive.Name = "buttonPositive";
+ this.buttonPositive.Size = new System.Drawing.Size(70, 25);
+ this.buttonPositive.TabIndex = 6;
+ this.buttonPositive.Text = "姝e悜";
+ this.buttonPositive.UseVisualStyleBackColor = true;
+ this.buttonPositive.Click += new System.EventHandler(this.buttonPositive_Click);
+ //
+ // textBoxJogAcc
+ //
+ this.textBoxJogAcc.Location = new System.Drawing.Point(154, 35);
+ this.textBoxJogAcc.Name = "textBoxJogAcc";
+ this.textBoxJogAcc.Size = new System.Drawing.Size(116, 21);
+ this.textBoxJogAcc.TabIndex = 5;
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(278, 7);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(53, 12);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "鍑忛�熷害锛�";
+ //
+ // textBoxJogVel
+ //
+ this.textBoxJogVel.Location = new System.Drawing.Point(154, 4);
+ this.textBoxJogVel.Name = "textBoxJogVel";
+ this.textBoxJogVel.Size = new System.Drawing.Size(116, 21);
+ this.textBoxJogVel.TabIndex = 5;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(92, 38);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(53, 12);
+ this.label4.TabIndex = 4;
+ this.label4.Text = "鍔犻�熷害锛�";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(92, 7);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(41, 12);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "閫熷害锛�";
+ //
+ // label2
+ //
+ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("瀹嬩綋", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label2.Location = new System.Drawing.Point(0, 21);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(77, 19);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "Jog妯″紡";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CtrlMotionCardAxisOperation
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.groupBoxAxisStatus);
+ this.Controls.Add(this.groupBoxAxisOperration);
this.Name = "CtrlMotionCardAxisOperation";
this.Size = new System.Drawing.Size(547, 148);
- this.groupBoxAxisStatus.ResumeLayout(false);
+ this.groupBoxAxisOperration.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
- this.panel1.ResumeLayout(false);
- this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
+ this.panel1.ResumeLayout(false);
+ this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
- private System.Windows.Forms.GroupBox groupBoxAxisStatus;
+ private System.Windows.Forms.GroupBox groupBoxAxisOperration;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
- private System.Windows.Forms.TextBox textBox2;
- private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBoxJogAcc;
+ private System.Windows.Forms.TextBox textBoxJogVel;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Button buttonClearStatus;
- private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Button buttonNegative;
+ private System.Windows.Forms.Button buttonPositive;
+ private System.Windows.Forms.TextBox textBoxJogDec;
private System.Windows.Forms.Label label5;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.TextBox textBox5;
- private System.Windows.Forms.TextBox textBox4;
- private System.Windows.Forms.TextBox textBox7;
- private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.Button buttonStop;
+ private System.Windows.Forms.Button buttonStart;
+ private System.Windows.Forms.TextBox textBoxP2PVel;
+ private System.Windows.Forms.TextBox textBoxP2PPrfPosition;
+ private System.Windows.Forms.TextBox textBoxP2PDec;
+ private System.Windows.Forms.TextBox textBoxP2PAcc;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label9;
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs
index ec86ef0..488561c 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs
@@ -7,6 +7,10 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using Bro.Common.Interface;
+using Bro.Common.Base;
+using Bro.Common.Model;
+using static Bro.Common.Helper.EnumHelper;
namespace Bro.UI.Device.Winform
{
@@ -17,5 +21,68 @@
InitializeComponent();
}
+ private IDevice Device { get; set; }
+ private int _axisIndex { get; set; }
+
+ protected MotionCardBase MotionCard
+ {
+ get => Device as MotionCardBase;
+ }
+
+ public CtrlMotionCardAxisOperation(IDevice device, int axisIndex, string axisName)
+ {
+ InitializeComponent();
+ Device = device;
+ _axisIndex = axisIndex;
+ groupBoxAxisOperration.Text = $"杩愬姩杞达細{axisIndex}-{axisName}";
+ }
+
+ private void buttonPositive_Click(object sender, EventArgs e)
+ {
+ var opConfig = new MotionOperationCollection();
+ MovingOption movingOption = new MovingOption();
+ movingOption.AxisIndex = _axisIndex;
+ movingOption.MoveMode = MotionMode.Jog;
+ movingOption.VelocityPara.Acc = Convert.ToDouble(textBoxJogAcc.Text);
+ movingOption.VelocityPara.Dec = Convert.ToDouble(textBoxJogDec.Text);
+ movingOption.VelocityPara.Velocity= Convert.ToDouble(textBoxJogVel.Text);
+
+ opConfig.MovingOps.Add(movingOption);
+ MotionCard.MoveToPoint(opConfig);
+ }
+
+ private void buttonNegative_Click(object sender, EventArgs e)
+ {
+ var opConfig = new MotionOperationCollection();
+ MovingOption movingOption = new MovingOption();
+ movingOption.AxisIndex = _axisIndex;
+ movingOption.MoveMode = MotionMode.Jog;
+ movingOption.VelocityPara.Acc = Convert.ToDouble(textBoxJogAcc.Text);
+ movingOption.VelocityPara.Dec = Convert.ToDouble(textBoxJogDec.Text);
+ movingOption.VelocityPara.Velocity = Convert.ToDouble(textBoxJogVel.Text);
+
+ opConfig.MovingOps.Add(movingOption);
+ MotionCard.MoveToPoint(opConfig);
+ }
+
+ private void buttonStart_Click(object sender, EventArgs e)
+ {
+ var opConfig = new MotionOperationCollection();
+ MovingOption movingOption = new MovingOption();
+ movingOption.AxisIndex = _axisIndex;
+ movingOption.Destination = Convert.ToInt32(textBoxP2PPrfPosition.Text);
+ movingOption.MoveMode = MotionMode.Normal;
+ movingOption.VelocityPara.Acc = Convert.ToDouble(textBoxP2PAcc.Text);
+ movingOption.VelocityPara.Dec = Convert.ToDouble(textBoxP2PDec.Text);
+ movingOption.VelocityPara.Velocity = Convert.ToDouble(textBoxP2PVel.Text);
+
+ opConfig.MovingOps.Add(movingOption);
+ MotionCard.MoveToPoint(opConfig);
+ }
+
+ private void buttonStop_Click(object sender, EventArgs e)
+ {
+ MotionCard.StateChange(DeviceState.DSPause);
+ }
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs
index 697d1ee..e35b793 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.groupBoxAxisStatus = new System.Windows.Forms.GroupBox();
this.ioIndicatorCtrl2 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
this.ioIndicatorCtrl10 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
@@ -35,14 +36,15 @@
this.ioIndicatorCtrl8 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
this.ioIndicatorCtrl6 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
this.ioIndicatorCtrl1 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.textBox4 = new System.Windows.Forms.TextBox();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBoxCurVel = new System.Windows.Forms.TextBox();
+ this.textBoxPrfVel = new System.Windows.Forms.TextBox();
+ this.textBoxCurPosition = new System.Windows.Forms.TextBox();
+ this.textBoxPrfPositon = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBoxAxisStatus.SuspendLayout();
this.SuspendLayout();
//
@@ -54,10 +56,10 @@
this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl8);
this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl6);
this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl1);
- this.groupBoxAxisStatus.Controls.Add(this.textBox4);
- this.groupBoxAxisStatus.Controls.Add(this.textBox3);
- this.groupBoxAxisStatus.Controls.Add(this.textBox2);
- this.groupBoxAxisStatus.Controls.Add(this.textBox1);
+ this.groupBoxAxisStatus.Controls.Add(this.textBoxCurVel);
+ this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfVel);
+ this.groupBoxAxisStatus.Controls.Add(this.textBoxCurPosition);
+ this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfPositon);
this.groupBoxAxisStatus.Controls.Add(this.label5);
this.groupBoxAxisStatus.Controls.Add(this.label4);
this.groupBoxAxisStatus.Controls.Add(this.label3);
@@ -81,7 +83,7 @@
//
// ioIndicatorCtrl10
//
- this.ioIndicatorCtrl10.Desc = "鍥為浂鐘舵��";
+ this.ioIndicatorCtrl10.Desc = "杩愬姩鍑洪敊";
this.ioIndicatorCtrl10.IsOn = null;
this.ioIndicatorCtrl10.Location = new System.Drawing.Point(328, 77);
this.ioIndicatorCtrl10.Name = "ioIndicatorCtrl10";
@@ -124,42 +126,42 @@
this.ioIndicatorCtrl1.Size = new System.Drawing.Size(90, 24);
this.ioIndicatorCtrl1.TabIndex = 4;
//
- // textBox4
+ // textBoxCurVel
//
- this.textBox4.Location = new System.Drawing.Point(85, 114);
- this.textBox4.Name = "textBox4";
- this.textBox4.ReadOnly = true;
- this.textBox4.Size = new System.Drawing.Size(116, 21);
- this.textBox4.TabIndex = 3;
+ this.textBoxCurVel.Location = new System.Drawing.Point(85, 113);
+ this.textBoxCurVel.Name = "textBoxCurVel";
+ this.textBoxCurVel.ReadOnly = true;
+ this.textBoxCurVel.Size = new System.Drawing.Size(116, 21);
+ this.textBoxCurVel.TabIndex = 3;
//
- // textBox3
+ // textBoxPrfVel
//
- this.textBox3.Location = new System.Drawing.Point(85, 53);
- this.textBox3.Name = "textBox3";
- this.textBox3.ReadOnly = true;
- this.textBox3.Size = new System.Drawing.Size(116, 21);
- this.textBox3.TabIndex = 3;
+ this.textBoxPrfVel.Location = new System.Drawing.Point(85, 84);
+ this.textBoxPrfVel.Name = "textBoxPrfVel";
+ this.textBoxPrfVel.ReadOnly = true;
+ this.textBoxPrfVel.Size = new System.Drawing.Size(116, 21);
+ this.textBoxPrfVel.TabIndex = 3;
//
- // textBox2
+ // textBoxCurPosition
//
- this.textBox2.Location = new System.Drawing.Point(85, 83);
- this.textBox2.Name = "textBox2";
- this.textBox2.ReadOnly = true;
- this.textBox2.Size = new System.Drawing.Size(116, 21);
- this.textBox2.TabIndex = 3;
+ this.textBoxCurPosition.Location = new System.Drawing.Point(85, 55);
+ this.textBoxCurPosition.Name = "textBoxCurPosition";
+ this.textBoxCurPosition.ReadOnly = true;
+ this.textBoxCurPosition.Size = new System.Drawing.Size(116, 21);
+ this.textBoxCurPosition.TabIndex = 3;
//
- // textBox1
+ // textBoxPrfPositon
//
- this.textBox1.Location = new System.Drawing.Point(85, 22);
- this.textBox1.Name = "textBox1";
- this.textBox1.ReadOnly = true;
- this.textBox1.Size = new System.Drawing.Size(116, 21);
- this.textBox1.TabIndex = 3;
+ this.textBoxPrfPositon.Location = new System.Drawing.Point(85, 23);
+ this.textBoxPrfPositon.Name = "textBoxPrfPositon";
+ this.textBoxPrfPositon.ReadOnly = true;
+ this.textBoxPrfPositon.Size = new System.Drawing.Size(116, 21);
+ this.textBoxPrfPositon.TabIndex = 3;
//
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(23, 117);
+ this.label5.Location = new System.Drawing.Point(23, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 2;
@@ -168,7 +170,7 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(23, 56);
+ this.label4.Location = new System.Drawing.Point(23, 87);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(65, 12);
this.label4.TabIndex = 2;
@@ -177,7 +179,7 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(23, 86);
+ this.label3.Location = new System.Drawing.Point(23, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 2;
@@ -186,11 +188,15 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(23, 25);
+ this.label2.Location = new System.Drawing.Point(23, 26);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 2;
this.label2.Text = "瑙勫垝浣嶇疆锛�";
+ //
+ // timer1
+ //
+ this.timer1.Tick += new System.EventHandler(this.RefreshStatus);
//
// CtrlMotionCardAxisStatus
//
@@ -214,13 +220,14 @@
private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl8;
private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl6;
private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl1;
- private System.Windows.Forms.TextBox textBox4;
- private System.Windows.Forms.TextBox textBox3;
- private System.Windows.Forms.TextBox textBox2;
- private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBoxCurVel;
+ private System.Windows.Forms.TextBox textBoxPrfVel;
+ private System.Windows.Forms.TextBox textBoxCurPosition;
+ private System.Windows.Forms.TextBox textBoxPrfPositon;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs
index 4ac84c7..d7df378 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs
@@ -1,11 +1,5 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+锘縰sing Bro.Common.Model;
+using System;
using System.Windows.Forms;
namespace Bro.UI.Device.Winform
@@ -16,5 +10,30 @@
{
InitializeComponent();
}
+
+ public AxisMovingStatus _axisMovingStatus = new AxisMovingStatus();
+ public CtrlMotionCardAxisStatus(AxisMovingStatus axisMovingStatus)
+ {
+ InitializeComponent();
+ _axisMovingStatus = axisMovingStatus;
+ groupBoxAxisStatus.Text = $"杩愬姩杞达細{_axisMovingStatus.AxisIndex}-{_axisMovingStatus.AxisName}";
+ }
+
+ private void RefreshStatus(object sender, EventArgs e)
+ {
+ textBoxPrfPositon.Text = _axisMovingStatus.Destination.ToString();
+ textBoxCurPosition.Text = _axisMovingStatus.CurPosition.ToString();
+ textBoxPrfVel.Text = _axisMovingStatus.PrfVelocity.ToString();
+ textBoxCurVel.Text = _axisMovingStatus.CurVelocity.ToString();
+ int axis_sts = _axisMovingStatus.AxisStatus;
+
+ ioIndicatorCtrl1.IsOn = (axis_sts & 0x2) == 0;//椹卞姩鎶ヨ
+ ioIndicatorCtrl2.IsOn = (axis_sts & 0x200) == 0;//浼烘湇浣胯兘
+ ioIndicatorCtrl6.IsOn = (axis_sts & 0x20) == 0;//姝i檺浣�
+ ioIndicatorCtrl8.IsOn = (axis_sts & 0x40) == 0;//璐熼檺浣�
+ ioIndicatorCtrl9.IsOn =(axis_sts & 0x400) == 0;//杩愬姩鐘舵��
+ ioIndicatorCtrl10.IsOn = (axis_sts & 0x10) == 0;//杩愬姩鍑洪敊
+
+ }
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx
index 1af7de1..1f666f2 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx
@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
</root>
\ No newline at end of file
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs
index 6f48556..f89c6b7 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs
@@ -28,52 +28,54 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.ioIndicatorCtrl14 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl13 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl12 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl26 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl25 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl24 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl17 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl16 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl20 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl19 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl23 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl22 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl21 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl18 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl15 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl11 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.ioIndicatorCtrl27 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl28 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl29 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl30 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl31 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl32 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl33 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl34 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl35 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl36 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl37 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl38 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl39 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl40 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl41 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
- this.ioIndicatorCtrl42 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.groupBoxIOOut = new System.Windows.Forms.GroupBox();
+ this.ioOut4 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut3 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut2 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut16 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut15 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut14 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut13 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut9 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut8 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut7 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut12 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut11 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut10 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut6 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut5 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioOut1 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.groupBoxIOIn = new System.Windows.Forms.GroupBox();
+ this.ioIn4 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn3 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn2 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn16 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn15 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn14 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn13 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn9 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn8 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn7 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn12 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn11 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn10 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn6 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn5 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.ioIn1 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.groupBox6.SuspendLayout();
+ this.groupBoxIOOut.SuspendLayout();
+ this.groupBoxIOIn.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel1.Controls.Add(this.groupBox6, 0, 1);
- this.tableLayoutPanel1.Controls.Add(this.groupBox5, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.groupBoxIOOut, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.groupBoxIOIn, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
@@ -83,345 +85,351 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(580, 288);
this.tableLayoutPanel1.TabIndex = 0;
//
- // groupBox5
+ // groupBoxIOOut
//
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl14);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl13);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl12);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl26);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl25);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl24);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl17);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl16);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl20);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl19);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl23);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl22);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl21);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl18);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl15);
- this.groupBox5.Controls.Add(this.ioIndicatorCtrl11);
- this.groupBox5.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBox5.Location = new System.Drawing.Point(3, 3);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(574, 138);
- this.groupBox5.TabIndex = 7;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "鏁板瓧閲忚緭鍏�";
+ this.groupBoxIOOut.Controls.Add(this.ioOut4);
+ this.groupBoxIOOut.Controls.Add(this.ioOut3);
+ this.groupBoxIOOut.Controls.Add(this.ioOut2);
+ this.groupBoxIOOut.Controls.Add(this.ioOut16);
+ this.groupBoxIOOut.Controls.Add(this.ioOut15);
+ this.groupBoxIOOut.Controls.Add(this.ioOut14);
+ this.groupBoxIOOut.Controls.Add(this.ioOut13);
+ this.groupBoxIOOut.Controls.Add(this.ioOut9);
+ this.groupBoxIOOut.Controls.Add(this.ioOut8);
+ this.groupBoxIOOut.Controls.Add(this.ioOut7);
+ this.groupBoxIOOut.Controls.Add(this.ioOut12);
+ this.groupBoxIOOut.Controls.Add(this.ioOut11);
+ this.groupBoxIOOut.Controls.Add(this.ioOut10);
+ this.groupBoxIOOut.Controls.Add(this.ioOut6);
+ this.groupBoxIOOut.Controls.Add(this.ioOut5);
+ this.groupBoxIOOut.Controls.Add(this.ioOut1);
+ this.groupBoxIOOut.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBoxIOOut.Location = new System.Drawing.Point(3, 147);
+ this.groupBoxIOOut.Name = "groupBoxIOOut";
+ this.groupBoxIOOut.Size = new System.Drawing.Size(574, 138);
+ this.groupBoxIOOut.TabIndex = 8;
+ this.groupBoxIOOut.TabStop = false;
+ this.groupBoxIOOut.Text = "鏁板瓧閲忚緭鍑�";
//
- // ioIndicatorCtrl14
+ // ioOut4
//
- this.ioIndicatorCtrl14.Desc = "IN 4";
- this.ioIndicatorCtrl14.IsOn = null;
- this.ioIndicatorCtrl14.Location = new System.Drawing.Point(477, 18);
- this.ioIndicatorCtrl14.Name = "ioIndicatorCtrl14";
- this.ioIndicatorCtrl14.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl14.TabIndex = 4;
+ this.ioOut4.Desc = "OUT 4";
+ this.ioOut4.IsOn = null;
+ this.ioOut4.Location = new System.Drawing.Point(477, 18);
+ this.ioOut4.Name = "ioOut4";
+ this.ioOut4.Size = new System.Drawing.Size(90, 24);
+ this.ioOut4.TabIndex = 4;
//
- // ioIndicatorCtrl13
+ // ioOut3
//
- this.ioIndicatorCtrl13.Desc = "IN 3";
- this.ioIndicatorCtrl13.IsOn = null;
- this.ioIndicatorCtrl13.Location = new System.Drawing.Point(306, 18);
- this.ioIndicatorCtrl13.Name = "ioIndicatorCtrl13";
- this.ioIndicatorCtrl13.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl13.TabIndex = 4;
+ this.ioOut3.Desc = "OUT 3";
+ this.ioOut3.IsOn = null;
+ this.ioOut3.Location = new System.Drawing.Point(306, 18);
+ this.ioOut3.Name = "ioOut3";
+ this.ioOut3.Size = new System.Drawing.Size(90, 24);
+ this.ioOut3.TabIndex = 4;
//
- // ioIndicatorCtrl12
+ // ioOut2
//
- this.ioIndicatorCtrl12.Desc = "IN 2";
- this.ioIndicatorCtrl12.IsOn = null;
- this.ioIndicatorCtrl12.Location = new System.Drawing.Point(145, 18);
- this.ioIndicatorCtrl12.Name = "ioIndicatorCtrl12";
- this.ioIndicatorCtrl12.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl12.TabIndex = 4;
+ this.ioOut2.Desc = "OUT 2";
+ this.ioOut2.IsOn = null;
+ this.ioOut2.Location = new System.Drawing.Point(145, 18);
+ this.ioOut2.Name = "ioOut2";
+ this.ioOut2.Size = new System.Drawing.Size(90, 24);
+ this.ioOut2.TabIndex = 4;
//
- // ioIndicatorCtrl26
+ // ioOut16
//
- this.ioIndicatorCtrl26.Desc = "IN 16";
- this.ioIndicatorCtrl26.IsOn = null;
- this.ioIndicatorCtrl26.Location = new System.Drawing.Point(477, 107);
- this.ioIndicatorCtrl26.Name = "ioIndicatorCtrl26";
- this.ioIndicatorCtrl26.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl26.TabIndex = 4;
+ this.ioOut16.Desc = "OUT 16";
+ this.ioOut16.IsOn = null;
+ this.ioOut16.Location = new System.Drawing.Point(477, 107);
+ this.ioOut16.Name = "ioOut16";
+ this.ioOut16.Size = new System.Drawing.Size(90, 24);
+ this.ioOut16.TabIndex = 4;
//
- // ioIndicatorCtrl25
+ // ioOut15
//
- this.ioIndicatorCtrl25.Desc = "IN 15";
- this.ioIndicatorCtrl25.IsOn = null;
- this.ioIndicatorCtrl25.Location = new System.Drawing.Point(306, 107);
- this.ioIndicatorCtrl25.Name = "ioIndicatorCtrl25";
- this.ioIndicatorCtrl25.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl25.TabIndex = 4;
+ this.ioOut15.Desc = "OUT 15";
+ this.ioOut15.IsOn = null;
+ this.ioOut15.Location = new System.Drawing.Point(306, 107);
+ this.ioOut15.Name = "ioOut15";
+ this.ioOut15.Size = new System.Drawing.Size(90, 24);
+ this.ioOut15.TabIndex = 4;
//
- // ioIndicatorCtrl24
+ // ioOut14
//
- this.ioIndicatorCtrl24.Desc = "IN 14";
- this.ioIndicatorCtrl24.IsOn = null;
- this.ioIndicatorCtrl24.Location = new System.Drawing.Point(145, 107);
- this.ioIndicatorCtrl24.Name = "ioIndicatorCtrl24";
- this.ioIndicatorCtrl24.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl24.TabIndex = 4;
+ this.ioOut14.Desc = "OUT 14";
+ this.ioOut14.IsOn = null;
+ this.ioOut14.Location = new System.Drawing.Point(145, 107);
+ this.ioOut14.Name = "ioOut14";
+ this.ioOut14.Size = new System.Drawing.Size(90, 24);
+ this.ioOut14.TabIndex = 4;
//
- // ioIndicatorCtrl17
+ // ioOut13
//
- this.ioIndicatorCtrl17.Desc = "IN 13";
- this.ioIndicatorCtrl17.IsOn = null;
- this.ioIndicatorCtrl17.Location = new System.Drawing.Point(9, 106);
- this.ioIndicatorCtrl17.Name = "ioIndicatorCtrl17";
- this.ioIndicatorCtrl17.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl17.TabIndex = 4;
+ this.ioOut13.Desc = "OUT 13";
+ this.ioOut13.IsOn = null;
+ this.ioOut13.Location = new System.Drawing.Point(9, 106);
+ this.ioOut13.Name = "ioOut13";
+ this.ioOut13.Size = new System.Drawing.Size(90, 24);
+ this.ioOut13.TabIndex = 4;
//
- // ioIndicatorCtrl16
+ // ioOut9
//
- this.ioIndicatorCtrl16.Desc = "IN 9";
- this.ioIndicatorCtrl16.IsOn = null;
- this.ioIndicatorCtrl16.Location = new System.Drawing.Point(9, 77);
- this.ioIndicatorCtrl16.Name = "ioIndicatorCtrl16";
- this.ioIndicatorCtrl16.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl16.TabIndex = 4;
+ this.ioOut9.Desc = "OUT 9";
+ this.ioOut9.IsOn = null;
+ this.ioOut9.Location = new System.Drawing.Point(9, 77);
+ this.ioOut9.Name = "ioOut9";
+ this.ioOut9.Size = new System.Drawing.Size(90, 24);
+ this.ioOut9.TabIndex = 4;
//
- // ioIndicatorCtrl20
+ // ioOut8
//
- this.ioIndicatorCtrl20.Desc = "IN 8";
- this.ioIndicatorCtrl20.IsOn = null;
- this.ioIndicatorCtrl20.Location = new System.Drawing.Point(477, 48);
- this.ioIndicatorCtrl20.Name = "ioIndicatorCtrl20";
- this.ioIndicatorCtrl20.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl20.TabIndex = 4;
+ this.ioOut8.Desc = "OUT 8";
+ this.ioOut8.IsOn = null;
+ this.ioOut8.Location = new System.Drawing.Point(477, 48);
+ this.ioOut8.Name = "ioOut8";
+ this.ioOut8.Size = new System.Drawing.Size(90, 24);
+ this.ioOut8.TabIndex = 4;
//
- // ioIndicatorCtrl19
+ // ioOut7
//
- this.ioIndicatorCtrl19.Desc = "IN 7";
- this.ioIndicatorCtrl19.IsOn = null;
- this.ioIndicatorCtrl19.Location = new System.Drawing.Point(306, 48);
- this.ioIndicatorCtrl19.Name = "ioIndicatorCtrl19";
- this.ioIndicatorCtrl19.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl19.TabIndex = 4;
+ this.ioOut7.Desc = "OUT 7";
+ this.ioOut7.IsOn = null;
+ this.ioOut7.Location = new System.Drawing.Point(306, 48);
+ this.ioOut7.Name = "ioOut7";
+ this.ioOut7.Size = new System.Drawing.Size(90, 24);
+ this.ioOut7.TabIndex = 4;
//
- // ioIndicatorCtrl23
+ // ioOut12
//
- this.ioIndicatorCtrl23.Desc = "IN 12";
- this.ioIndicatorCtrl23.IsOn = null;
- this.ioIndicatorCtrl23.Location = new System.Drawing.Point(477, 77);
- this.ioIndicatorCtrl23.Name = "ioIndicatorCtrl23";
- this.ioIndicatorCtrl23.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl23.TabIndex = 4;
+ this.ioOut12.Desc = "OUT 12";
+ this.ioOut12.IsOn = null;
+ this.ioOut12.Location = new System.Drawing.Point(477, 77);
+ this.ioOut12.Name = "ioOut12";
+ this.ioOut12.Size = new System.Drawing.Size(90, 24);
+ this.ioOut12.TabIndex = 4;
//
- // ioIndicatorCtrl22
+ // ioOut11
//
- this.ioIndicatorCtrl22.Desc = "IN 11";
- this.ioIndicatorCtrl22.IsOn = null;
- this.ioIndicatorCtrl22.Location = new System.Drawing.Point(306, 77);
- this.ioIndicatorCtrl22.Name = "ioIndicatorCtrl22";
- this.ioIndicatorCtrl22.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl22.TabIndex = 4;
+ this.ioOut11.Desc = "OUT 11";
+ this.ioOut11.IsOn = null;
+ this.ioOut11.Location = new System.Drawing.Point(306, 77);
+ this.ioOut11.Name = "ioOut11";
+ this.ioOut11.Size = new System.Drawing.Size(90, 24);
+ this.ioOut11.TabIndex = 4;
//
- // ioIndicatorCtrl21
+ // ioOut10
//
- this.ioIndicatorCtrl21.Desc = "IN 10";
- this.ioIndicatorCtrl21.IsOn = null;
- this.ioIndicatorCtrl21.Location = new System.Drawing.Point(145, 77);
- this.ioIndicatorCtrl21.Name = "ioIndicatorCtrl21";
- this.ioIndicatorCtrl21.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl21.TabIndex = 4;
+ this.ioOut10.Desc = "OUT 10";
+ this.ioOut10.IsOn = null;
+ this.ioOut10.Location = new System.Drawing.Point(145, 77);
+ this.ioOut10.Name = "ioOut10";
+ this.ioOut10.Size = new System.Drawing.Size(90, 24);
+ this.ioOut10.TabIndex = 4;
//
- // ioIndicatorCtrl18
+ // ioOut6
//
- this.ioIndicatorCtrl18.Desc = "IN 6";
- this.ioIndicatorCtrl18.IsOn = null;
- this.ioIndicatorCtrl18.Location = new System.Drawing.Point(145, 48);
- this.ioIndicatorCtrl18.Name = "ioIndicatorCtrl18";
- this.ioIndicatorCtrl18.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl18.TabIndex = 4;
+ this.ioOut6.Desc = "OUT 6";
+ this.ioOut6.IsOn = null;
+ this.ioOut6.Location = new System.Drawing.Point(145, 48);
+ this.ioOut6.Name = "ioOut6";
+ this.ioOut6.Size = new System.Drawing.Size(90, 24);
+ this.ioOut6.TabIndex = 4;
//
- // ioIndicatorCtrl15
+ // ioOut5
//
- this.ioIndicatorCtrl15.Desc = "IN 5";
- this.ioIndicatorCtrl15.IsOn = null;
- this.ioIndicatorCtrl15.Location = new System.Drawing.Point(9, 48);
- this.ioIndicatorCtrl15.Name = "ioIndicatorCtrl15";
- this.ioIndicatorCtrl15.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl15.TabIndex = 4;
+ this.ioOut5.Desc = "OUT 5";
+ this.ioOut5.IsOn = null;
+ this.ioOut5.Location = new System.Drawing.Point(9, 48);
+ this.ioOut5.Name = "ioOut5";
+ this.ioOut5.Size = new System.Drawing.Size(90, 24);
+ this.ioOut5.TabIndex = 4;
//
- // ioIndicatorCtrl11
+ // ioOut1
//
- this.ioIndicatorCtrl11.Desc = "IN 1";
- this.ioIndicatorCtrl11.IsOn = null;
- this.ioIndicatorCtrl11.Location = new System.Drawing.Point(9, 18);
- this.ioIndicatorCtrl11.Name = "ioIndicatorCtrl11";
- this.ioIndicatorCtrl11.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl11.TabIndex = 4;
+ this.ioOut1.Desc = "OUT 1";
+ this.ioOut1.IsOn = null;
+ this.ioOut1.Location = new System.Drawing.Point(9, 18);
+ this.ioOut1.Name = "ioOut1";
+ this.ioOut1.Size = new System.Drawing.Size(90, 24);
+ this.ioOut1.TabIndex = 4;
+ //
+ // groupBoxIOIn
+ //
+ this.groupBoxIOIn.Controls.Add(this.ioIn4);
+ this.groupBoxIOIn.Controls.Add(this.ioIn3);
+ this.groupBoxIOIn.Controls.Add(this.ioIn2);
+ this.groupBoxIOIn.Controls.Add(this.ioIn16);
+ this.groupBoxIOIn.Controls.Add(this.ioIn15);
+ this.groupBoxIOIn.Controls.Add(this.ioIn14);
+ this.groupBoxIOIn.Controls.Add(this.ioIn13);
+ this.groupBoxIOIn.Controls.Add(this.ioIn9);
+ this.groupBoxIOIn.Controls.Add(this.ioIn8);
+ this.groupBoxIOIn.Controls.Add(this.ioIn7);
+ this.groupBoxIOIn.Controls.Add(this.ioIn12);
+ this.groupBoxIOIn.Controls.Add(this.ioIn11);
+ this.groupBoxIOIn.Controls.Add(this.ioIn10);
+ this.groupBoxIOIn.Controls.Add(this.ioIn6);
+ this.groupBoxIOIn.Controls.Add(this.ioIn5);
+ this.groupBoxIOIn.Controls.Add(this.ioIn1);
+ this.groupBoxIOIn.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBoxIOIn.Location = new System.Drawing.Point(3, 3);
+ this.groupBoxIOIn.Name = "groupBoxIOIn";
+ this.groupBoxIOIn.Size = new System.Drawing.Size(574, 138);
+ this.groupBoxIOIn.TabIndex = 7;
+ this.groupBoxIOIn.TabStop = false;
+ this.groupBoxIOIn.Text = "鏁板瓧閲忚緭鍏�";
//
- // groupBox6
+ // ioIn4
//
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl27);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl28);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl29);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl30);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl31);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl32);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl33);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl34);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl35);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl36);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl37);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl38);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl39);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl40);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl41);
- this.groupBox6.Controls.Add(this.ioIndicatorCtrl42);
- this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBox6.Location = new System.Drawing.Point(3, 147);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(574, 138);
- this.groupBox6.TabIndex = 8;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "鏁板瓧閲忚緭鍑�";
+ this.ioIn4.Desc = "IN 4";
+ this.ioIn4.IsOn = null;
+ this.ioIn4.Location = new System.Drawing.Point(477, 18);
+ this.ioIn4.Name = "ioIn4";
+ this.ioIn4.Size = new System.Drawing.Size(90, 24);
+ this.ioIn4.TabIndex = 4;
//
- // ioIndicatorCtrl27
+ // ioIn3
//
- this.ioIndicatorCtrl27.Desc = "OUT 4";
- this.ioIndicatorCtrl27.IsOn = null;
- this.ioIndicatorCtrl27.Location = new System.Drawing.Point(477, 18);
- this.ioIndicatorCtrl27.Name = "ioIndicatorCtrl27";
- this.ioIndicatorCtrl27.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl27.TabIndex = 4;
+ this.ioIn3.Desc = "IN 3";
+ this.ioIn3.IsOn = null;
+ this.ioIn3.Location = new System.Drawing.Point(306, 18);
+ this.ioIn3.Name = "ioIn3";
+ this.ioIn3.Size = new System.Drawing.Size(90, 24);
+ this.ioIn3.TabIndex = 4;
//
- // ioIndicatorCtrl28
+ // ioIn2
//
- this.ioIndicatorCtrl28.Desc = "OUT 3";
- this.ioIndicatorCtrl28.IsOn = null;
- this.ioIndicatorCtrl28.Location = new System.Drawing.Point(306, 18);
- this.ioIndicatorCtrl28.Name = "ioIndicatorCtrl28";
- this.ioIndicatorCtrl28.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl28.TabIndex = 4;
+ this.ioIn2.Desc = "IN 2";
+ this.ioIn2.IsOn = null;
+ this.ioIn2.Location = new System.Drawing.Point(145, 18);
+ this.ioIn2.Name = "ioIn2";
+ this.ioIn2.Size = new System.Drawing.Size(90, 24);
+ this.ioIn2.TabIndex = 4;
//
- // ioIndicatorCtrl29
+ // ioIn16
//
- this.ioIndicatorCtrl29.Desc = "OUT 2";
- this.ioIndicatorCtrl29.IsOn = null;
- this.ioIndicatorCtrl29.Location = new System.Drawing.Point(145, 18);
- this.ioIndicatorCtrl29.Name = "ioIndicatorCtrl29";
- this.ioIndicatorCtrl29.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl29.TabIndex = 4;
+ this.ioIn16.Desc = "IN 16";
+ this.ioIn16.IsOn = null;
+ this.ioIn16.Location = new System.Drawing.Point(477, 107);
+ this.ioIn16.Name = "ioIn16";
+ this.ioIn16.Size = new System.Drawing.Size(90, 24);
+ this.ioIn16.TabIndex = 4;
//
- // ioIndicatorCtrl30
+ // ioIn15
//
- this.ioIndicatorCtrl30.Desc = "OUT 16";
- this.ioIndicatorCtrl30.IsOn = null;
- this.ioIndicatorCtrl30.Location = new System.Drawing.Point(477, 107);
- this.ioIndicatorCtrl30.Name = "ioIndicatorCtrl30";
- this.ioIndicatorCtrl30.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl30.TabIndex = 4;
+ this.ioIn15.Desc = "IN 15";
+ this.ioIn15.IsOn = null;
+ this.ioIn15.Location = new System.Drawing.Point(306, 107);
+ this.ioIn15.Name = "ioIn15";
+ this.ioIn15.Size = new System.Drawing.Size(90, 24);
+ this.ioIn15.TabIndex = 4;
//
- // ioIndicatorCtrl31
+ // ioIn14
//
- this.ioIndicatorCtrl31.Desc = "OUT 15";
- this.ioIndicatorCtrl31.IsOn = null;
- this.ioIndicatorCtrl31.Location = new System.Drawing.Point(306, 107);
- this.ioIndicatorCtrl31.Name = "ioIndicatorCtrl31";
- this.ioIndicatorCtrl31.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl31.TabIndex = 4;
+ this.ioIn14.Desc = "IN 14";
+ this.ioIn14.IsOn = null;
+ this.ioIn14.Location = new System.Drawing.Point(145, 107);
+ this.ioIn14.Name = "ioIn14";
+ this.ioIn14.Size = new System.Drawing.Size(90, 24);
+ this.ioIn14.TabIndex = 4;
//
- // ioIndicatorCtrl32
+ // ioIn13
//
- this.ioIndicatorCtrl32.Desc = "OUT 14";
- this.ioIndicatorCtrl32.IsOn = null;
- this.ioIndicatorCtrl32.Location = new System.Drawing.Point(145, 107);
- this.ioIndicatorCtrl32.Name = "ioIndicatorCtrl32";
- this.ioIndicatorCtrl32.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl32.TabIndex = 4;
+ this.ioIn13.Desc = "IN 13";
+ this.ioIn13.IsOn = null;
+ this.ioIn13.Location = new System.Drawing.Point(9, 106);
+ this.ioIn13.Name = "ioIn13";
+ this.ioIn13.Size = new System.Drawing.Size(90, 24);
+ this.ioIn13.TabIndex = 4;
//
- // ioIndicatorCtrl33
+ // ioIn9
//
- this.ioIndicatorCtrl33.Desc = "OUT 13";
- this.ioIndicatorCtrl33.IsOn = null;
- this.ioIndicatorCtrl33.Location = new System.Drawing.Point(9, 106);
- this.ioIndicatorCtrl33.Name = "ioIndicatorCtrl33";
- this.ioIndicatorCtrl33.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl33.TabIndex = 4;
+ this.ioIn9.Desc = "IN 9";
+ this.ioIn9.IsOn = null;
+ this.ioIn9.Location = new System.Drawing.Point(9, 77);
+ this.ioIn9.Name = "ioIn9";
+ this.ioIn9.Size = new System.Drawing.Size(90, 24);
+ this.ioIn9.TabIndex = 4;
//
- // ioIndicatorCtrl34
+ // ioIn8
//
- this.ioIndicatorCtrl34.Desc = "OUT 9";
- this.ioIndicatorCtrl34.IsOn = null;
- this.ioIndicatorCtrl34.Location = new System.Drawing.Point(9, 77);
- this.ioIndicatorCtrl34.Name = "ioIndicatorCtrl34";
- this.ioIndicatorCtrl34.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl34.TabIndex = 4;
+ this.ioIn8.Desc = "IN 8";
+ this.ioIn8.IsOn = null;
+ this.ioIn8.Location = new System.Drawing.Point(477, 48);
+ this.ioIn8.Name = "ioIn8";
+ this.ioIn8.Size = new System.Drawing.Size(90, 24);
+ this.ioIn8.TabIndex = 4;
//
- // ioIndicatorCtrl35
+ // ioIn7
//
- this.ioIndicatorCtrl35.Desc = "OUT 8";
- this.ioIndicatorCtrl35.IsOn = null;
- this.ioIndicatorCtrl35.Location = new System.Drawing.Point(477, 48);
- this.ioIndicatorCtrl35.Name = "ioIndicatorCtrl35";
- this.ioIndicatorCtrl35.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl35.TabIndex = 4;
+ this.ioIn7.Desc = "IN 7";
+ this.ioIn7.IsOn = null;
+ this.ioIn7.Location = new System.Drawing.Point(306, 48);
+ this.ioIn7.Name = "ioIn7";
+ this.ioIn7.Size = new System.Drawing.Size(90, 24);
+ this.ioIn7.TabIndex = 4;
//
- // ioIndicatorCtrl36
+ // ioIn12
//
- this.ioIndicatorCtrl36.Desc = "OUT 7";
- this.ioIndicatorCtrl36.IsOn = null;
- this.ioIndicatorCtrl36.Location = new System.Drawing.Point(306, 48);
- this.ioIndicatorCtrl36.Name = "ioIndicatorCtrl36";
- this.ioIndicatorCtrl36.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl36.TabIndex = 4;
+ this.ioIn12.Desc = "IN 12";
+ this.ioIn12.IsOn = null;
+ this.ioIn12.Location = new System.Drawing.Point(477, 77);
+ this.ioIn12.Name = "ioIn12";
+ this.ioIn12.Size = new System.Drawing.Size(90, 24);
+ this.ioIn12.TabIndex = 4;
//
- // ioIndicatorCtrl37
+ // ioIn11
//
- this.ioIndicatorCtrl37.Desc = "OUT 12";
- this.ioIndicatorCtrl37.IsOn = null;
- this.ioIndicatorCtrl37.Location = new System.Drawing.Point(477, 77);
- this.ioIndicatorCtrl37.Name = "ioIndicatorCtrl37";
- this.ioIndicatorCtrl37.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl37.TabIndex = 4;
+ this.ioIn11.Desc = "IN 11";
+ this.ioIn11.IsOn = null;
+ this.ioIn11.Location = new System.Drawing.Point(306, 77);
+ this.ioIn11.Name = "ioIn11";
+ this.ioIn11.Size = new System.Drawing.Size(90, 24);
+ this.ioIn11.TabIndex = 4;
//
- // ioIndicatorCtrl38
+ // ioIn10
//
- this.ioIndicatorCtrl38.Desc = "OUT 11";
- this.ioIndicatorCtrl38.IsOn = null;
- this.ioIndicatorCtrl38.Location = new System.Drawing.Point(306, 77);
- this.ioIndicatorCtrl38.Name = "ioIndicatorCtrl38";
- this.ioIndicatorCtrl38.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl38.TabIndex = 4;
+ this.ioIn10.Desc = "IN 10";
+ this.ioIn10.IsOn = null;
+ this.ioIn10.Location = new System.Drawing.Point(145, 77);
+ this.ioIn10.Name = "ioIn10";
+ this.ioIn10.Size = new System.Drawing.Size(90, 24);
+ this.ioIn10.TabIndex = 4;
//
- // ioIndicatorCtrl39
+ // ioIn6
//
- this.ioIndicatorCtrl39.Desc = "OUT 10";
- this.ioIndicatorCtrl39.IsOn = null;
- this.ioIndicatorCtrl39.Location = new System.Drawing.Point(145, 77);
- this.ioIndicatorCtrl39.Name = "ioIndicatorCtrl39";
- this.ioIndicatorCtrl39.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl39.TabIndex = 4;
+ this.ioIn6.Desc = "IN 6";
+ this.ioIn6.IsOn = null;
+ this.ioIn6.Location = new System.Drawing.Point(145, 48);
+ this.ioIn6.Name = "ioIn6";
+ this.ioIn6.Size = new System.Drawing.Size(90, 24);
+ this.ioIn6.TabIndex = 4;
//
- // ioIndicatorCtrl40
+ // ioIn5
//
- this.ioIndicatorCtrl40.Desc = "OUT 6";
- this.ioIndicatorCtrl40.IsOn = null;
- this.ioIndicatorCtrl40.Location = new System.Drawing.Point(145, 48);
- this.ioIndicatorCtrl40.Name = "ioIndicatorCtrl40";
- this.ioIndicatorCtrl40.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl40.TabIndex = 4;
+ this.ioIn5.Desc = "IN 5";
+ this.ioIn5.IsOn = null;
+ this.ioIn5.Location = new System.Drawing.Point(9, 48);
+ this.ioIn5.Name = "ioIn5";
+ this.ioIn5.Size = new System.Drawing.Size(90, 24);
+ this.ioIn5.TabIndex = 4;
//
- // ioIndicatorCtrl41
+ // ioIn1
//
- this.ioIndicatorCtrl41.Desc = "OUT 5";
- this.ioIndicatorCtrl41.IsOn = null;
- this.ioIndicatorCtrl41.Location = new System.Drawing.Point(9, 48);
- this.ioIndicatorCtrl41.Name = "ioIndicatorCtrl41";
- this.ioIndicatorCtrl41.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl41.TabIndex = 4;
+ this.ioIn1.Desc = "IN 1";
+ this.ioIn1.IsOn = null;
+ this.ioIn1.Location = new System.Drawing.Point(9, 18);
+ this.ioIn1.Name = "ioIn1";
+ this.ioIn1.Size = new System.Drawing.Size(90, 24);
+ this.ioIn1.TabIndex = 4;
//
- // ioIndicatorCtrl42
+ // timer1
//
- this.ioIndicatorCtrl42.Desc = "OUT 1";
- this.ioIndicatorCtrl42.IsOn = null;
- this.ioIndicatorCtrl42.Location = new System.Drawing.Point(9, 18);
- this.ioIndicatorCtrl42.Name = "ioIndicatorCtrl42";
- this.ioIndicatorCtrl42.Size = new System.Drawing.Size(90, 24);
- this.ioIndicatorCtrl42.TabIndex = 4;
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 200;
+ this.timer1.Tick += new System.EventHandler(this.RefreshIOStatus);
//
// CtrlMotionCardIOStatus
//
@@ -431,8 +439,8 @@
this.Name = "CtrlMotionCardIOStatus";
this.Size = new System.Drawing.Size(580, 288);
this.tableLayoutPanel1.ResumeLayout(false);
- this.groupBox5.ResumeLayout(false);
- this.groupBox6.ResumeLayout(false);
+ this.groupBoxIOOut.ResumeLayout(false);
+ this.groupBoxIOIn.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -440,39 +448,40 @@
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
- private System.Windows.Forms.GroupBox groupBox5;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl14;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl13;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl12;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl26;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl25;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl24;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl17;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl16;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl20;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl19;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl23;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl22;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl21;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl18;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl15;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl11;
- private System.Windows.Forms.GroupBox groupBox6;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl27;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl28;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl29;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl30;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl31;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl32;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl33;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl34;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl35;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl36;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl37;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl38;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl39;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl40;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl41;
- private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl42;
+ private System.Windows.Forms.GroupBox groupBoxIOIn;
+ private Model.Winform.IOIndicatorCtrl ioIn4;
+ private Model.Winform.IOIndicatorCtrl ioIn3;
+ private Model.Winform.IOIndicatorCtrl ioIn2;
+ private Model.Winform.IOIndicatorCtrl ioIn16;
+ private Model.Winform.IOIndicatorCtrl ioIn15;
+ private Model.Winform.IOIndicatorCtrl ioIn14;
+ private Model.Winform.IOIndicatorCtrl ioIn13;
+ private Model.Winform.IOIndicatorCtrl ioIn9;
+ private Model.Winform.IOIndicatorCtrl ioIn8;
+ private Model.Winform.IOIndicatorCtrl ioIn7;
+ private Model.Winform.IOIndicatorCtrl ioIn12;
+ private Model.Winform.IOIndicatorCtrl ioIn11;
+ private Model.Winform.IOIndicatorCtrl ioIn10;
+ private Model.Winform.IOIndicatorCtrl ioIn6;
+ private Model.Winform.IOIndicatorCtrl ioIn5;
+ private Model.Winform.IOIndicatorCtrl ioIn1;
+ private System.Windows.Forms.GroupBox groupBoxIOOut;
+ private Model.Winform.IOIndicatorCtrl ioOut4;
+ private Model.Winform.IOIndicatorCtrl ioOut3;
+ private Model.Winform.IOIndicatorCtrl ioOut2;
+ private Model.Winform.IOIndicatorCtrl ioOut16;
+ private Model.Winform.IOIndicatorCtrl ioOut15;
+ private Model.Winform.IOIndicatorCtrl ioOut14;
+ private Model.Winform.IOIndicatorCtrl ioOut13;
+ private Model.Winform.IOIndicatorCtrl ioOut9;
+ private Model.Winform.IOIndicatorCtrl ioOut8;
+ private Model.Winform.IOIndicatorCtrl ioOut7;
+ private Model.Winform.IOIndicatorCtrl ioOut12;
+ private Model.Winform.IOIndicatorCtrl ioOut11;
+ private Model.Winform.IOIndicatorCtrl ioOut10;
+ private Model.Winform.IOIndicatorCtrl ioOut6;
+ private Model.Winform.IOIndicatorCtrl ioOut5;
+ private Model.Winform.IOIndicatorCtrl ioOut1;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs
index b136bdc..13762cf 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs
@@ -7,14 +7,51 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using Bro.Common.Model;
+using Bro.UI.Model.Winform;
+using static Bro.Common.Helper.EnumHelper;
namespace Bro.UI.Device.Winform
{
public partial class CtrlMotionCardIOStatus : UserControl
{
+ public List<IOItem> _monitorValues { get; set; }
+
public CtrlMotionCardIOStatus()
{
InitializeComponent();
}
+
+
+ public CtrlMotionCardIOStatus(List<IOItem> monitorValues)
+ {
+ InitializeComponent();
+ _monitorValues = monitorValues;
+ }
+
+ private void RefreshIOStatus(object sender, EventArgs e)
+ {
+ foreach (var ioItem in _monitorValues)
+ {
+ if (ioItem.IOType == Common.Helper.EnumHelper.IOType.INPUT)
+ {
+ var ioInArray = groupBoxIOIn.Controls.Find("ioIn" + ioItem.IONum, false);
+ if (ioInArray != null && ioInArray.Length == 1)
+ {
+ var ioIn = ioInArray[0] as IOIndicatorCtrl;
+ ioIn.IsOn = ioItem.Value == IOValue.TRUE;
+ }
+ }
+ else
+ {
+ var ioOutArray = groupBoxIOOut.Controls.Find("ioOut" + ioItem.IONum, false);
+ if (ioOutArray != null && ioOutArray.Length == 1)
+ {
+ var ioOut = ioOutArray[0] as IOIndicatorCtrl;
+ ioOut.IsOn = ioItem.Value == IOValue.TRUE;
+ }
+ }
+ }
+ }
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx
index 1af7de1..1f666f2 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx
@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
</root>
\ No newline at end of file
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs
index dc93c7a..17368a9 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs
@@ -33,6 +33,7 @@
this.listBoxMsg = new System.Windows.Forms.ListBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.buttonMotionCardOperation = new System.Windows.Forms.Button();
+ this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
@@ -44,6 +45,7 @@
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.buttonMotionCardOperation, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
@@ -52,6 +54,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 110F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(615, 587);
this.tableLayoutPanel1.TabIndex = 5;
//
@@ -95,6 +98,14 @@
this.buttonMotionCardOperation.UseVisualStyleBackColor = true;
this.buttonMotionCardOperation.Click += new System.EventHandler(this.buttonMotionCardOperation_Click);
//
+ // flowLayoutPanel2
+ //
+ this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 256);
+ this.flowLayoutPanel2.Name = "flowLayoutPanel2";
+ this.flowLayoutPanel2.Size = new System.Drawing.Size(609, 217);
+ this.flowLayoutPanel2.TabIndex = 13;
+ //
// CtrlMotionCardRunBase
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -114,5 +125,6 @@
private System.Windows.Forms.ListBox listBoxMsg;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button buttonMotionCardOperation;
+ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs
index 0499bf4..1583630 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs
@@ -25,18 +25,6 @@
Device = device;
InitialLayout();
-
- MotionCard.OnMonitorInvoke += MotionCard_OnMonitorInvoke;
- //CvImage = new Canvas();
- //CvImage.IsShowElementList = false;
- //CvImage.IsShowROITool = false;
- //CvImage.Dock = DockStyle.Fill;
- //Controls.Add(CvImage);
- //Camera.OnImageUpdated += Camera_UpdateShowImage;
- //Camera.OnElementsUpdated += Camera_OnElementsUpdated;
- //Camera.OnCameraOpModeChanged += Camera_OnCameraOpModeChanged;
-
- //InitialToolBarVisible();
}
private void MotionCard_OnMonitorInvoke(DateTime arg1, string arg2, IDevice arg3, IMonitorSet arg4)
@@ -46,7 +34,19 @@
private void InitialLayout()
{
+ foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled))
+ {
+ var axisMovingStatus = MotionCard.AxisMovingOptionValues.FirstOrDefault(u=>u.AxisIndex== axisConfig.AxisIndex);
+ if (axisMovingStatus!=null)
+ {
+ CtrlMotionCardAxisStatus ctrlMotionCardAxisStatus = new CtrlMotionCardAxisStatus(axisMovingStatus);
+ ctrlMotionCardAxisStatus.Dock = DockStyle.Fill;
+ flowLayoutPanel1.Controls.Add(ctrlMotionCardAxisStatus);
+ }
+ }
+ CtrlMotionCardIOStatus ctrlMotionCardIOStatus = new CtrlMotionCardIOStatus();
+ flowLayoutPanel2.Controls.Add(ctrlMotionCardIOStatus);
}
public IDevice Device { get; set; }
@@ -61,5 +61,6 @@
FrmMotionCardOperationBase motionCardOperationBase = new FrmMotionCardOperationBase(Device);
motionCardOperationBase.Show();
}
+
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs
index fd5bb86..ce4360e 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs
@@ -32,6 +32,7 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.groupBoxPara = new System.Windows.Forms.GroupBox();
@@ -45,6 +46,7 @@
this.buttonPositionReset = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.groupBoxPara.SuspendLayout();
@@ -77,6 +79,7 @@
//
// tabPage1
//
+ this.tabPage1.Controls.Add(this.flowLayoutPanel1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
@@ -84,6 +87,14 @@
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "蹇嵎鎿嶄綔";
this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // flowLayoutPanel1
+ //
+ this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
+ this.flowLayoutPanel1.Name = "flowLayoutPanel1";
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(464, 643);
+ this.flowLayoutPanel1.TabIndex = 0;
//
// tabPage2
//
@@ -163,6 +174,7 @@
this.btnStart.Text = " 鍚� 鍔�";
this.btnStart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnStart.UseVisualStyleBackColor = true;
+ this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// buttonClearStatus
//
@@ -172,6 +184,7 @@
this.buttonClearStatus.TabIndex = 4;
this.buttonClearStatus.Text = "娓呴櫎鐘舵��";
this.buttonClearStatus.UseVisualStyleBackColor = true;
+ this.buttonClearStatus.Click += new System.EventHandler(this.buttonClearStatus_Click);
//
// buttonEmergencyStop
//
@@ -181,6 +194,7 @@
this.buttonEmergencyStop.TabIndex = 4;
this.buttonEmergencyStop.Text = "绱ф�ュ仠姝�";
this.buttonEmergencyStop.UseVisualStyleBackColor = true;
+ this.buttonEmergencyStop.Click += new System.EventHandler(this.buttonEmergencyStop_Click);
//
// buttonServoEnable
//
@@ -190,6 +204,7 @@
this.buttonServoEnable.TabIndex = 4;
this.buttonServoEnable.Text = "浼烘湇浣胯兘";
this.buttonServoEnable.UseVisualStyleBackColor = true;
+ this.buttonServoEnable.Click += new System.EventHandler(this.buttonServoEnable_Click);
//
// buttonSmoothStop
//
@@ -199,6 +214,7 @@
this.buttonSmoothStop.TabIndex = 4;
this.buttonSmoothStop.Text = "骞虫粦鍋滄";
this.buttonSmoothStop.UseVisualStyleBackColor = true;
+ this.buttonSmoothStop.Click += new System.EventHandler(this.buttonSmoothStop_Click);
//
// buttonPositionReset
//
@@ -208,6 +224,7 @@
this.buttonPositionReset.TabIndex = 4;
this.buttonPositionReset.Text = "浣嶇疆娓呴浂";
this.buttonPositionReset.UseVisualStyleBackColor = true;
+ this.buttonPositionReset.Click += new System.EventHandler(this.buttonPositionReset_Click);
//
// FrmMotionCardOperationBase
//
@@ -218,6 +235,7 @@
this.Name = "FrmMotionCardOperationBase";
this.tableLayoutPanel1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
this.groupBoxPara.ResumeLayout(false);
@@ -243,5 +261,6 @@
private System.Windows.Forms.Button buttonPositionReset;
private System.Windows.Forms.GroupBox groupBoxPara;
private System.Windows.Forms.PropertyGrid propGrid;
+ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}
diff --git a/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs b/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs
index cfe0328..6118331 100644
--- a/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs
+++ b/src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs
@@ -3,6 +3,7 @@
using Bro.Common.Interface;
using Bro.Common.Model;
using System;
+using System.Linq;
using System.Windows.Forms;
namespace Bro.UI.Device.Winform
@@ -16,7 +17,7 @@
public IDevice Device { get; set; }
- public MotionCardOperationConfigBase MotionCardOperationConfig { get; set; }
+ public MovingOption MotionCardMovingOption { get; set; } = new MovingOption();
/// <summary>
/// 褰撳墠鏉垮崱瀹炰緥
@@ -32,68 +33,59 @@
InitializeComponent();
Device = device;
- MotionCardOperationConfig = new MotionCardOperationConfigBase();
-
+ InitialLayout();
}
-
- MovingOption movingConfig = null;
-
- #region ILogoutput
- public Action<LogMsg> OnLogMsgOutput { get; set; }
-
- public void LogDisplay(LogMsg msg)
+ private void InitialLayout()
{
- }
- #endregion
+ foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled))
+ {
+ CtrlMotionCardAxisOperation axisOperation = new CtrlMotionCardAxisOperation(Device, axisConfig.AxisIndex, axisConfig.AxisName);
+ axisOperation.Dock = DockStyle.Fill;
+ flowLayoutPanel1.Controls.Add(axisOperation);
+ }
- private void RadioButton_CheckedChanged(object sender, EventArgs e)
- {
- //鍔犺浇瀵瑰簲杩愬姩鐨� movingConfig
- //if (radioP2P.Checked)
- //{
- // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Normal);
- //}
- //else if (radioJog.Checked)
- //{
- // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Jog);
- //}
- //else if (radioGoHome.Checked)
- //{
- // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.FindOri);
- //}
-
- propGrid.SelectedObject = movingConfig;
+ propGrid.SelectedObject = MotionCardMovingOption;
}
private void buttonClearStatus_Click(object sender, EventArgs e)
{
-
+ MotionCard.ClearStatus(1, MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled).Count);
}
private void buttonServoEnable_Click(object sender, EventArgs e)
{
-
+ int sts = MotionCard.GetAxisStatus(MotionCardMovingOption.AxisIndex);
+ if ((sts & 0x200) == 0)//鍏抽棴鐘舵��
+ {
+ MotionCard.AxisOnAsync(MotionCardMovingOption.AxisIndex).GetAwaiter().GetResult();
+ buttonServoEnable.Text = "浼烘湇宸插紑鍚�";
+ }
+ else
+ {
+ MotionCard.AxisOffAsync(MotionCardMovingOption.AxisIndex).GetAwaiter().GetResult();
+ buttonServoEnable.Text = "浼烘湇宸插叧闂�";
+ }
}
private void buttonPositionReset_Click(object sender, EventArgs e)
{
-
+ var res = MotionCard.PositionReset(MotionCardMovingOption.AxisIndex, 1);
}
private void btnStart_Click(object sender, EventArgs e)
{
-
+ MotionCard.SingleAxisMoving(MotionCardMovingOption).GetAwaiter().GetResult();
}
private void buttonSmoothStop_Click(object sender, EventArgs e)
{
-
+ MotionCard.MoveStop(MotionCardMovingOption.AxisIndex, 0).GetAwaiter().GetResult();
}
private void buttonEmergencyStop_Click(object sender, EventArgs e)
{
-
+ MotionCard.MoveStop(MotionCardMovingOption.AxisIndex, 1).GetAwaiter().GetResult();
}
}
--
Gitblit v1.8.0