25103101 配置为4个串口扫码枪

This commit is contained in:
moxiliang
2025-10-31 11:56:23 +08:00
parent 5d98792d3e
commit deecfd3acb
24 changed files with 931 additions and 263 deletions

Binary file not shown.

View File

@@ -2,17 +2,25 @@
"Version": 1,
"WorkspaceRootPath": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|d:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1Dll-28\\huabei4tongdao\\slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\activationmanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\activationmanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\activationmanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\activationmanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{00000000-0000-0000-0000-000000000000}|\u003CSolution\u003E|SLC1-N||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
@@ -41,14 +49,6 @@
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_plcconnect.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_plcconnect.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_saomaset.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\slc1-n\\form_activate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{F7F71589-095A-45C2-975C-739BE2D1CE15}|SLC1-N\\SLC1-N.csproj|solutionrelative:slc1-n\\form_activate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@@ -177,11 +177,15 @@
"DocumentGroups": [
{
"DockedWidth": 152,
"SelectedChildIndex": 11,
"SelectedChildIndex": 12,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{5a4e9529-b6a0-46b5-be4f-0f0b239bc0eb}"
},
{
"$type": "Document",
"DocumentIndex": 8,
"DocumentIndex": 10,
"Title": "Form_PLCconnect.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_PLCconnect.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_PLCconnect.cs",
@@ -194,7 +198,7 @@
},
{
"$type": "Document",
"DocumentIndex": 9,
"DocumentIndex": 11,
"Title": "Form_PLCconnect.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_PLCconnect.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_PLCconnect.cs",
@@ -206,15 +210,16 @@
},
{
"$type": "Document",
"DocumentIndex": 10,
"DocumentIndex": 3,
"Title": "Form_SaomaSet.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_SaomaSet.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u8015\u5FB7\\LL-28_sitongdao\\SLC1-N\\Form_SaomaSet.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "..\\..\\..\\\u8015\u5FB7\\LL-28_sitongdao\\SLC1-N\\Form_SaomaSet.cs [\u8BBE\u8BA1]",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "SLC1-N\\Form_SaomaSet.cs [\u8BBE\u8BA1]",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T07:59:43.205Z",
"IsPinned": true
"IsPinned": true,
"EditorCaption": " [\u8BBE\u8BA1]"
},
{
"$type": "Bookmark",
@@ -244,48 +249,34 @@
"$type": "Bookmark",
"Name": "ST:254354193:0:{71f361cc-493f-47c0-923f-f2570b6f8618}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{5a4e9529-b6a0-46b5-be4f-0f0b239bc0eb}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 1,
"Title": "Form1.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form1.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form1.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form1.cs",
"RelativeToolTip": "SLC1-N\\Form1.cs",
"ViewState": "AQIAAJwAAAAAAAAAAAAAALUAAAANAAAA",
"ViewState": "AQIAAN0PAAAAAAAAAADwv+MPAAANAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-18T01:41:29.412Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "Electricity.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Electricity.cs",
"RelativeDocumentMoniker": "SLC1-N\\Electricity.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\LL-28_sitongdao\\SLC1-N\\Electricity.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "..\\LL-28_sitongdao\\SLC1-N\\Electricity.cs [\u8BBE\u8BA1]",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-18T01:03:21.678Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 0,
"Title": "Form1.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form1.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form1.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\LL-28\\SLC1-N\\Form1.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "LL-28\\SLC1-N\\Form1.cs [\u8BBE\u8BA1]",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form1.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "SLC1-N\\Form1.cs [\u8BBE\u8BA1]",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-18T02:52:28.347Z"
"WhenOpened": "2025-08-18T02:52:28.347Z",
"EditorCaption": " [\u8BBE\u8BA1]"
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 5,
"Title": "SLC1-N",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\SLC1-N.csproj",
"RelativeDocumentMoniker": "SLC1-N\\SLC1-N.csproj",
@@ -296,7 +287,31 @@
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 2,
"Title": "Form_SaomaSet.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_SaomaSet.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs",
"RelativeToolTip": "SLC1-N\\Form_SaomaSet.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAH0BAAAsAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T07:59:44.649Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "Electricity.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Electricity.cs",
"RelativeDocumentMoniker": "SLC1-N\\Electricity.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\LL-28_sitongdao\\SLC1-N\\Electricity.cs [\u8BBE\u8BA1]",
"RelativeToolTip": "..\\LL-28_sitongdao\\SLC1-N\\Electricity.cs [\u8BBE\u8BA1]",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-18T01:03:21.678Z"
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "ActivationManager.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\ActivationManager.cs",
"RelativeDocumentMoniker": "SLC1-N\\ActivationManager.cs",
@@ -308,7 +323,7 @@
},
{
"$type": "Document",
"DocumentIndex": 6,
"DocumentIndex": 8,
"Title": "Form_hbMESset.cs [\u8BBE\u8BA1]",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_hbMESset.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_hbMESset.cs",
@@ -319,7 +334,7 @@
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 6,
"Title": "Electricity.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Electricity.cs",
"RelativeDocumentMoniker": "SLC1-N\\Electricity.cs",
@@ -331,7 +346,7 @@
},
{
"$type": "Document",
"DocumentIndex": 7,
"DocumentIndex": 9,
"Title": "mxlLog.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\mxlLog.cs",
"RelativeDocumentMoniker": "SLC1-N\\mxlLog.cs",
@@ -341,18 +356,6 @@
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T03:42:34.958Z"
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "Form_SaomaSet.cs",
"DocumentMoniker": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs",
"RelativeDocumentMoniker": "SLC1-N\\Form_SaomaSet.cs",
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form_SaomaSet.cs",
"RelativeToolTip": "SLC1-N\\Form_SaomaSet.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABQAAAAXAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T07:59:44.649Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
@@ -375,8 +378,7 @@
"RelativeToolTip": "SLC1-N\\ModbusTCP_28.cs",
"ViewState": "AQIAAOsAAAAAAAAAAAAzwAIBAAA9AAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-18T03:38:22.768Z",
"EditorCaption": ""
"WhenOpened": "2025-08-18T03:38:22.768Z"
},
{
"$type": "Document",
@@ -458,7 +460,8 @@
"RelativeToolTip": "SLC1-N\\Form1.resx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001005|",
"WhenOpened": "2025-12-06T07:26:27.479Z"
"WhenOpened": "2025-12-06T07:26:27.479Z",
"EditorCaption": ""
},
{
"$type": "Document",
@@ -482,7 +485,8 @@
"RelativeToolTip": "SLC1-N\\Form1.Designer.cs",
"ViewState": "AQIAAOcJAAAAAAAAAAAnwPUJAAAzAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T01:41:25.114Z"
"WhenOpened": "2025-08-19T01:41:25.114Z",
"EditorCaption": ""
},
{
"$type": "Document",
@@ -678,7 +682,8 @@
"RelativeToolTip": "SLC1-N\\Form_SaomaSet.Designer.cs",
"ViewState": "AQIAABMAAAAAAAAAAABXwBYAAAAIAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-19T09:03:05.271Z"
"WhenOpened": "2025-08-19T09:03:05.271Z",
"EditorCaption": ""
},
{
"$type": "Document",
@@ -689,7 +694,8 @@
"ToolTip": "D:\\\u684C\u9762\\\u83AB\u79A7\u4EAE\\\u534E\u52E4\\\u534E\u8D1DLL-28\\huabei4tongdao\\SLC1-N\\Form1.resx",
"RelativeToolTip": "SLC1-N\\Form1.resx",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001005|",
"WhenOpened": "2025-08-20T01:30:09.83Z"
"WhenOpened": "2025-08-20T01:30:09.83Z",
"EditorCaption": ""
},
{
"$type": "Document",

View File

@@ -273,6 +273,8 @@
this.pictureBox11 = new System.Windows.Forms.PictureBox();
this.label25 = new System.Windows.Forms.Label();
this.pictureBox12 = new System.Windows.Forms.PictureBox();
this.SerialPort_CH3Saoma = new System.IO.Ports.SerialPort(this.components);
this.SerialPort_CH4Saoma = new System.IO.Ports.SerialPort(this.components);
this.uiGroupBox5.SuspendLayout();
this.nb_MainMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_MESswitch)).BeginInit();
@@ -2593,6 +2595,14 @@
this.pictureBox12.TabIndex = 440;
this.pictureBox12.TabStop = false;
//
// SerialPort_CH3Saoma
//
this.SerialPort_CH3Saoma.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.SerialPort_CH3Saoma_DataReceived);
//
// SerialPort_CH4Saoma
//
this.SerialPort_CH4Saoma.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.SerialPort_CH4Saoma_DataReceived);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -2613,7 +2623,7 @@
this.Controls.Add(this.uiGroupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = " LL28_V25102401";
this.Text = " LL28-C_V25103101";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.uiGroupBox5.ResumeLayout(false);
@@ -2833,6 +2843,8 @@
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label lb_Total;
private System.Windows.Forms.Label label1;
public System.IO.Ports.SerialPort SerialPort_CH3Saoma;
public System.IO.Ports.SerialPort SerialPort_CH4Saoma;
}
}

View File

@@ -457,6 +457,11 @@ namespace SLC1_N
int SerialPort_CH2BaudRate = jsconfig.GetValue<int>("SerialPort_CH2BaudRate", 9600);
string SerialPort_CH2PortName = jsconfig.GetValue<string>("SerialPort_CH2PortName", "COM11");
int SerialPort_CH3BaudRate = jsconfig.GetValue<int>("SerialPort_CH3BaudRate", 9600);
string SerialPort_CH3PortName = jsconfig.GetValue<string>("SerialPort_CH3PortName", "COM11");
int SerialPort_CH4BaudRate = jsconfig.GetValue<int>("SerialPort_CH4BaudRate", 9600);
string SerialPort_CH4PortName = jsconfig.GetValue<string>("SerialPort_CH4PortName", "COM11");
//设置端口的参数,包括波特率等
// 扫码枪1
SerialPort_CH1Saoma.BaudRate = SerialPort_CH1BaudRate;
@@ -475,22 +480,56 @@ namespace SLC1_N
SetUITextBox(tb_CH1MainMessage, $"CH1串口扫码枪打开失败");
}
//// 扫码枪2
//SerialPort_CH2Saoma.BaudRate = SerialPort_CH2BaudRate;
//SerialPort_CH2Saoma.PortName = SerialPort_CH2PortName;
//SerialPort_CH2Saoma.DataBits = 8;
//SerialPort_CH2Saoma.StopBits = System.IO.Ports.StopBits.One;
//SerialPort_CH2Saoma.Parity = System.IO.Ports.Parity.None;
//SerialPort_CH2Saoma.Open();
//if (SerialPort_CH2Saoma.IsOpen)
//{
// Console.WriteLine($"SerialPort_CH2Saoma: T");
//}
//else
//{
// Console.WriteLine($"SerialPort_CH2Saoma: F");
// SetUITextBox(tb_CH2MainMessage, $"CH2串口扫码枪打开失败");
//}
// 扫码枪2
SerialPort_CH2Saoma.BaudRate = SerialPort_CH2BaudRate;
SerialPort_CH2Saoma.PortName = SerialPort_CH2PortName;
SerialPort_CH2Saoma.DataBits = 8;
SerialPort_CH2Saoma.StopBits = System.IO.Ports.StopBits.One;
SerialPort_CH2Saoma.Parity = System.IO.Ports.Parity.None;
SerialPort_CH2Saoma.Open();
if (SerialPort_CH2Saoma.IsOpen)
{
Console.WriteLine($"SerialPort_CH2Saoma: T");
}
else
{
Console.WriteLine($"SerialPort_CH2Saoma: F");
SetUITextBox(tb_CH2MainMessage, $"CH2串口扫码枪打开失败");
}
// 扫码枪3
SerialPort_CH3Saoma.BaudRate = SerialPort_CH3BaudRate;
SerialPort_CH3Saoma.PortName = SerialPort_CH3PortName;
SerialPort_CH3Saoma.DataBits = 8;
SerialPort_CH3Saoma.StopBits = System.IO.Ports.StopBits.One;
SerialPort_CH3Saoma.Parity = System.IO.Ports.Parity.None;
SerialPort_CH3Saoma.Open();
if (SerialPort_CH3Saoma.IsOpen)
{
Console.WriteLine($"SerialPort_CH3Saoma: T");
}
else
{
Console.WriteLine($"SerialPort_CH3Saoma: F");
SetUITextBox(tb_CH1MainMessage, $"CH3串口扫码枪打开失败");
}
// 扫码枪4
SerialPort_CH4Saoma.BaudRate = SerialPort_CH4BaudRate;
SerialPort_CH4Saoma.PortName = SerialPort_CH4PortName;
SerialPort_CH4Saoma.DataBits = 8;
SerialPort_CH4Saoma.StopBits = System.IO.Ports.StopBits.One;
SerialPort_CH4Saoma.Parity = System.IO.Ports.Parity.None;
SerialPort_CH4Saoma.Open();
if (SerialPort_CH4Saoma.IsOpen)
{
Console.WriteLine($"SerialPort_CH4Saoma: T");
}
else
{
Console.WriteLine($"SerialPort_CH4Saoma: F");
SetUITextBox(tb_CH2MainMessage, $"CH4串口扫码枪打开失败");
}
}
catch (Exception ex)
{
@@ -618,6 +657,26 @@ namespace SLC1_N
if (tcpSaoma_Enabled)
saomaClient2?.SendStartCommand();
break;
case 3: // 扫码枪3启动
if (serialport_saoma_Enabled && SerialPort_CH3Saoma != null && SerialPort_CH3Saoma.IsOpen)
{
SerialPort_CH3Saoma.Write(byt, 0, byt.Length);
}
//if (tcpSaoma_Enabled)
// saomaClient3?.SendStartCommand();
break;
case 4: // 扫码枪4启动
if (serialport_saoma_Enabled && SerialPort_CH4Saoma != null && SerialPort_CH4Saoma.IsOpen)
{
SerialPort_CH4Saoma.Write(byt, 0, byt.Length);
}
//if (tcpSaoma_Enabled)
// saomaClient4?.SendStartCommand();
break;
}
}
@@ -4013,6 +4072,106 @@ namespace SLC1_N
}
}
// 扫码枪3串口接收函数
private void SerialPort_CH3Saoma_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
try
{
System.Threading.Thread.Sleep(50);
int len = SerialPort_CH3Saoma.BytesToRead; // 获取可以读取的字节数
if (len > 1)
{
byte[] buff = new byte[len]; // 创建缓存数据数组
SerialPort_CH3Saoma.Read(buff, 0, len); // 把数据读取到buff数组
Invoke((new System.Action(() =>
{
string time = DateTime.Now.ToString();
string code = Encoding.Default.GetString(buff).Replace(" ", "").Replace("\r", "").Replace("\n", "");
Console.WriteLine("扫码枪3串口收到:" + code);
//code = code.Split(';')[0];
//Console.WriteLine("扫码枪3串口去掉分隔符:" + code);
if (lb_CH1Code.Text == code || lb_CH2Code.Text == code || lb_CH3Code.Text == code || lb_CH4Code.Text == code)
{
//MessageBox.Show($"条码 {CODE} 已存在", "重复提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
SerialPort_CH3Saoma.DiscardInBuffer();
return;
}
if (code.Length.ToString() == tb_CH3codeLeng.Text.Trim())
{
lb_CH3Code.Text = code;
}
else
{
//SetUITextBox(tb_CH3MainMessage, "CH3当前条形码长度为" + code.Length + " 所设置的条码长度为" + tb_CH3codeLeng.Text);
}
SerialPort_CH3Saoma.DiscardInBuffer();
})));
}
else
{
return;
}
}
catch (Exception ex)
{
mxlLog.Instance.Error($"串口扫码枪3接收函数 异常 ,行号{ex.StackTrace} ", ex);
}
}
// 扫码枪4串口接收函数
private void SerialPort_CH4Saoma_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
try
{
System.Threading.Thread.Sleep(50);
int len = SerialPort_CH4Saoma.BytesToRead; // 获取可以读取的字节数
if (len > 1)
{
byte[] buff = new byte[len]; // 创建缓存数据数组
SerialPort_CH4Saoma.Read(buff, 0, len); // 把数据读取到buff数组
Invoke((new System.Action(() =>
{
string time = DateTime.Now.ToString();
string code = Encoding.Default.GetString(buff).Replace(" ", "").Replace("\r", "").Replace("\n", "");
Console.WriteLine("扫码枪4串口收到:" + code);
//code = code.Split(';')[0];
//Console.WriteLine("扫码枪4串口去掉分隔符:" + code);
if (lb_CH1Code.Text == code || lb_CH2Code.Text == code || lb_CH3Code.Text == code || lb_CH4Code.Text == code)
{
//MessageBox.Show($"条码 {CODE} 已存在", "重复提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
SerialPort_CH4Saoma.DiscardInBuffer();
return;
}
if (code.Length.ToString() == tb_CH4codeLeng.Text.Trim())
{
lb_CH4Code.Text = code;
}
else
{
//SetUITextBox(tb_CH4MainMessage, "CH4当前条形码长度为" + code.Length + " 所设置的条码长度为" + tb_CH4codeLeng.Text);
}
SerialPort_CH4Saoma.DiscardInBuffer();
})));
}
else
{
return;
}
}
catch (Exception ex)
{
mxlLog.Instance.Error($"串口扫码枪1接收函数 异常 ,行号{ex.StackTrace} ", ex);
}
}
// 条码变化函数
private void CH1Code_TextChanged(object sender, EventArgs e)
{

View File

@@ -177,6 +177,12 @@
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1074, 47</value>
</metadata>
<metadata name="SerialPort_CH3Saoma.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>506, 17</value>
</metadata>
<metadata name="SerialPort_CH4Saoma.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>701, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>78</value>
</metadata>

View File

@@ -31,17 +31,27 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form_SaomaSet));
this.timer_ConnectStatus = new System.Windows.Forms.Timer(this.components);
this.bt_CH1Break = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.cb_CH1PortName = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cb_CH1BaudRate = new System.Windows.Forms.ComboBox();
this.lb_CH1Com_status = new System.Windows.Forms.Label();
this.bt_CH1Connect = new System.Windows.Forms.Button();
this.bt_CH1Refresh = new System.Windows.Forms.Button();
this.uiGroupBox9 = new Sunny.UI.UIGroupBox();
this.tabPage_SerialPort = new System.Windows.Forms.TabPage();
this.uiGroupBox5 = new Sunny.UI.UIGroupBox();
this.label17 = new System.Windows.Forms.Label();
this.cb_CH4PortName = new System.Windows.Forms.ComboBox();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.cb_CH4BaudRate = new System.Windows.Forms.ComboBox();
this.lb_CH4Com_status = new System.Windows.Forms.Label();
this.bt_CH4Connect = new System.Windows.Forms.Button();
this.bt_CH4Break = new System.Windows.Forms.Button();
this.bt_CH4Refresh = new System.Windows.Forms.Button();
this.uiGroupBox11 = new Sunny.UI.UIGroupBox();
this.label6 = new System.Windows.Forms.Label();
this.cb_CH3PortName = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.cb_CH3BaudRate = new System.Windows.Forms.ComboBox();
this.lb_CH3Com_status = new System.Windows.Forms.Label();
this.bt_CH3Connect = new System.Windows.Forms.Button();
this.bt_CH3Break = new System.Windows.Forms.Button();
this.bt_CH3Refresh = new System.Windows.Forms.Button();
this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
this.label1 = new System.Windows.Forms.Label();
this.cb_CH2PortName = new System.Windows.Forms.ComboBox();
@@ -52,6 +62,16 @@
this.bt_CH2Connect = new System.Windows.Forms.Button();
this.bt_CH2Break = new System.Windows.Forms.Button();
this.bt_CH2Refresh = new System.Windows.Forms.Button();
this.uiGroupBox9 = new Sunny.UI.UIGroupBox();
this.label7 = new System.Windows.Forms.Label();
this.cb_CH1PortName = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cb_CH1BaudRate = new System.Windows.Forms.ComboBox();
this.lb_CH1Com_status = new System.Windows.Forms.Label();
this.bt_CH1Connect = new System.Windows.Forms.Button();
this.bt_CH1Break = new System.Windows.Forms.Button();
this.bt_CH1Refresh = new System.Windows.Forms.Button();
this.uiTabControlMenu1 = new Sunny.UI.UITabControlMenu();
this.tabPage_TCP = new System.Windows.Forms.TabPage();
this.uiGroupBox3 = new Sunny.UI.UIGroupBox();
@@ -74,9 +94,11 @@
this.label8 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.tb_CH1TCP_port = new System.Windows.Forms.TextBox();
this.uiGroupBox9.SuspendLayout();
this.tabPage_SerialPort.SuspendLayout();
this.uiGroupBox5.SuspendLayout();
this.uiGroupBox11.SuspendLayout();
this.uiGroupBox1.SuspendLayout();
this.uiGroupBox9.SuspendLayout();
this.uiTabControlMenu1.SuspendLayout();
this.tabPage_TCP.SuspendLayout();
this.uiGroupBox3.SuspendLayout();
@@ -87,138 +109,261 @@
//
this.timer_ConnectStatus.Tick += new System.EventHandler(this.timer_ConnectStatus_Tick);
//
// bt_CH1Break
//
this.bt_CH1Break.Location = new System.Drawing.Point(48, 379);
this.bt_CH1Break.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Break.Name = "bt_CH1Break";
this.bt_CH1Break.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Break.TabIndex = 63;
this.bt_CH1Break.Text = "断开连接";
this.bt_CH1Break.UseVisualStyleBackColor = true;
this.bt_CH1Break.Click += new System.EventHandler(this.CodeBreak_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 12F);
this.label7.Location = new System.Drawing.Point(52, 208);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(87, 16);
this.label7.TabIndex = 70;
this.label7.Text = "串口状态:";
//
// cb_CH1PortName
//
this.cb_CH1PortName.FormattingEnabled = true;
this.cb_CH1PortName.Location = new System.Drawing.Point(43, 89);
this.cb_CH1PortName.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH1PortName.Name = "cb_CH1PortName";
this.cb_CH1PortName.Size = new System.Drawing.Size(137, 24);
this.cb_CH1PortName.TabIndex = 67;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(40, 66);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(55, 16);
this.label11.TabIndex = 65;
this.label11.Text = "端口号";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(40, 132);
this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(55, 16);
this.label15.TabIndex = 66;
this.label15.Text = "波特率";
//
// cb_CH1BaudRate
//
this.cb_CH1BaudRate.FormattingEnabled = true;
this.cb_CH1BaudRate.Items.AddRange(new object[] {
"115200",
"9600"});
this.cb_CH1BaudRate.Location = new System.Drawing.Point(43, 156);
this.cb_CH1BaudRate.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH1BaudRate.Name = "cb_CH1BaudRate";
this.cb_CH1BaudRate.Size = new System.Drawing.Size(137, 24);
this.cb_CH1BaudRate.TabIndex = 68;
//
// lb_CH1Com_status
//
this.lb_CH1Com_status.AutoSize = true;
this.lb_CH1Com_status.Font = new System.Drawing.Font("宋体", 12F);
this.lb_CH1Com_status.Location = new System.Drawing.Point(70, 237);
this.lb_CH1Com_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_CH1Com_status.Name = "lb_CH1Com_status";
this.lb_CH1Com_status.Size = new System.Drawing.Size(23, 16);
this.lb_CH1Com_status.TabIndex = 69;
this.lb_CH1Com_status.Text = "##";
//
// bt_CH1Connect
//
this.bt_CH1Connect.Location = new System.Drawing.Point(48, 275);
this.bt_CH1Connect.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Connect.Name = "bt_CH1Connect";
this.bt_CH1Connect.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Connect.TabIndex = 62;
this.bt_CH1Connect.TabStop = false;
this.bt_CH1Connect.Text = "连接串口";
this.bt_CH1Connect.UseVisualStyleBackColor = true;
this.bt_CH1Connect.Click += new System.EventHandler(this.CodeCon_Click);
//
// bt_CH1Refresh
//
this.bt_CH1Refresh.Location = new System.Drawing.Point(48, 327);
this.bt_CH1Refresh.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Refresh.Name = "bt_CH1Refresh";
this.bt_CH1Refresh.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Refresh.TabIndex = 64;
this.bt_CH1Refresh.Text = "刷新串口";
this.bt_CH1Refresh.UseVisualStyleBackColor = true;
this.bt_CH1Refresh.Click += new System.EventHandler(this.CodeRefresh_Click);
//
// uiGroupBox9
//
this.uiGroupBox9.Controls.Add(this.label7);
this.uiGroupBox9.Controls.Add(this.cb_CH1PortName);
this.uiGroupBox9.Controls.Add(this.label11);
this.uiGroupBox9.Controls.Add(this.label15);
this.uiGroupBox9.Controls.Add(this.cb_CH1BaudRate);
this.uiGroupBox9.Controls.Add(this.lb_CH1Com_status);
this.uiGroupBox9.Controls.Add(this.bt_CH1Connect);
this.uiGroupBox9.Controls.Add(this.bt_CH1Break);
this.uiGroupBox9.Controls.Add(this.bt_CH1Refresh);
this.uiGroupBox9.FillColor = System.Drawing.Color.Transparent;
this.uiGroupBox9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiGroupBox9.Location = new System.Drawing.Point(22, 5);
this.uiGroupBox9.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiGroupBox9.MinimumSize = new System.Drawing.Size(1, 1);
this.uiGroupBox9.Name = "uiGroupBox9";
this.uiGroupBox9.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
this.uiGroupBox9.Size = new System.Drawing.Size(221, 490);
this.uiGroupBox9.Style = Sunny.UI.UIStyle.Custom;
this.uiGroupBox9.TabIndex = 2;
this.uiGroupBox9.Text = "条码枪1串口设置";
this.uiGroupBox9.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// tabPage_SerialPort
//
this.tabPage_SerialPort.BackColor = System.Drawing.Color.LightBlue;
this.tabPage_SerialPort.Controls.Add(this.uiGroupBox5);
this.tabPage_SerialPort.Controls.Add(this.uiGroupBox11);
this.tabPage_SerialPort.Controls.Add(this.uiGroupBox1);
this.tabPage_SerialPort.Controls.Add(this.uiGroupBox9);
this.tabPage_SerialPort.Location = new System.Drawing.Point(201, 0);
this.tabPage_SerialPort.Name = "tabPage_SerialPort";
this.tabPage_SerialPort.Size = new System.Drawing.Size(835, 581);
this.tabPage_SerialPort.Size = new System.Drawing.Size(1015, 581);
this.tabPage_SerialPort.TabIndex = 2;
this.tabPage_SerialPort.Text = "串口扫码枪设置";
//
// uiGroupBox5
//
this.uiGroupBox5.Controls.Add(this.label17);
this.uiGroupBox5.Controls.Add(this.cb_CH4PortName);
this.uiGroupBox5.Controls.Add(this.label18);
this.uiGroupBox5.Controls.Add(this.label19);
this.uiGroupBox5.Controls.Add(this.cb_CH4BaudRate);
this.uiGroupBox5.Controls.Add(this.lb_CH4Com_status);
this.uiGroupBox5.Controls.Add(this.bt_CH4Connect);
this.uiGroupBox5.Controls.Add(this.bt_CH4Break);
this.uiGroupBox5.Controls.Add(this.bt_CH4Refresh);
this.uiGroupBox5.FillColor = System.Drawing.Color.Transparent;
this.uiGroupBox5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiGroupBox5.Location = new System.Drawing.Point(662, 16);
this.uiGroupBox5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiGroupBox5.MinimumSize = new System.Drawing.Size(1, 1);
this.uiGroupBox5.Name = "uiGroupBox5";
this.uiGroupBox5.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
this.uiGroupBox5.Size = new System.Drawing.Size(195, 408);
this.uiGroupBox5.Style = Sunny.UI.UIStyle.Custom;
this.uiGroupBox5.TabIndex = 76;
this.uiGroupBox5.Text = "CH4扫码枪";
this.uiGroupBox5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("宋体", 12F);
this.label17.Location = new System.Drawing.Point(37, 177);
this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(87, 16);
this.label17.TabIndex = 70;
this.label17.Text = "串口状态:";
//
// cb_CH4PortName
//
this.cb_CH4PortName.FormattingEnabled = true;
this.cb_CH4PortName.Location = new System.Drawing.Point(28, 58);
this.cb_CH4PortName.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH4PortName.Name = "cb_CH4PortName";
this.cb_CH4PortName.Size = new System.Drawing.Size(137, 24);
this.cb_CH4PortName.TabIndex = 67;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(25, 35);
this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(55, 16);
this.label18.TabIndex = 65;
this.label18.Text = "端口号";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(25, 101);
this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(55, 16);
this.label19.TabIndex = 66;
this.label19.Text = "波特率";
//
// cb_CH4BaudRate
//
this.cb_CH4BaudRate.FormattingEnabled = true;
this.cb_CH4BaudRate.Items.AddRange(new object[] {
"115200",
"9600"});
this.cb_CH4BaudRate.Location = new System.Drawing.Point(28, 125);
this.cb_CH4BaudRate.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH4BaudRate.Name = "cb_CH4BaudRate";
this.cb_CH4BaudRate.Size = new System.Drawing.Size(137, 24);
this.cb_CH4BaudRate.TabIndex = 68;
//
// lb_CH4Com_status
//
this.lb_CH4Com_status.AutoSize = true;
this.lb_CH4Com_status.Font = new System.Drawing.Font("宋体", 12F);
this.lb_CH4Com_status.Location = new System.Drawing.Point(55, 206);
this.lb_CH4Com_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_CH4Com_status.Name = "lb_CH4Com_status";
this.lb_CH4Com_status.Size = new System.Drawing.Size(23, 16);
this.lb_CH4Com_status.TabIndex = 69;
this.lb_CH4Com_status.Text = "##";
//
// bt_CH4Connect
//
this.bt_CH4Connect.Location = new System.Drawing.Point(33, 244);
this.bt_CH4Connect.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH4Connect.Name = "bt_CH4Connect";
this.bt_CH4Connect.Size = new System.Drawing.Size(125, 45);
this.bt_CH4Connect.TabIndex = 62;
this.bt_CH4Connect.TabStop = false;
this.bt_CH4Connect.Text = "连接串口";
this.bt_CH4Connect.UseVisualStyleBackColor = true;
this.bt_CH4Connect.Click += new System.EventHandler(this.bt_CH4Connect_Click);
//
// bt_CH4Break
//
this.bt_CH4Break.Location = new System.Drawing.Point(33, 348);
this.bt_CH4Break.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH4Break.Name = "bt_CH4Break";
this.bt_CH4Break.Size = new System.Drawing.Size(125, 45);
this.bt_CH4Break.TabIndex = 63;
this.bt_CH4Break.Text = "断开连接";
this.bt_CH4Break.UseVisualStyleBackColor = true;
this.bt_CH4Break.Click += new System.EventHandler(this.bt_CH4Break_Click);
//
// bt_CH4Refresh
//
this.bt_CH4Refresh.Location = new System.Drawing.Point(33, 296);
this.bt_CH4Refresh.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH4Refresh.Name = "bt_CH4Refresh";
this.bt_CH4Refresh.Size = new System.Drawing.Size(125, 45);
this.bt_CH4Refresh.TabIndex = 64;
this.bt_CH4Refresh.Text = "刷新串口";
this.bt_CH4Refresh.UseVisualStyleBackColor = true;
this.bt_CH4Refresh.Click += new System.EventHandler(this.bt_CH4Refresh_Click);
//
// uiGroupBox11
//
this.uiGroupBox11.Controls.Add(this.label6);
this.uiGroupBox11.Controls.Add(this.cb_CH3PortName);
this.uiGroupBox11.Controls.Add(this.label12);
this.uiGroupBox11.Controls.Add(this.label14);
this.uiGroupBox11.Controls.Add(this.cb_CH3BaudRate);
this.uiGroupBox11.Controls.Add(this.lb_CH3Com_status);
this.uiGroupBox11.Controls.Add(this.bt_CH3Connect);
this.uiGroupBox11.Controls.Add(this.bt_CH3Break);
this.uiGroupBox11.Controls.Add(this.bt_CH3Refresh);
this.uiGroupBox11.FillColor = System.Drawing.Color.Transparent;
this.uiGroupBox11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiGroupBox11.Location = new System.Drawing.Point(448, 16);
this.uiGroupBox11.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiGroupBox11.MinimumSize = new System.Drawing.Size(1, 1);
this.uiGroupBox11.Name = "uiGroupBox11";
this.uiGroupBox11.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
this.uiGroupBox11.Size = new System.Drawing.Size(195, 408);
this.uiGroupBox11.Style = Sunny.UI.UIStyle.Custom;
this.uiGroupBox11.TabIndex = 74;
this.uiGroupBox11.Text = "CH3扫码枪";
this.uiGroupBox11.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 12F);
this.label6.Location = new System.Drawing.Point(37, 177);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(87, 16);
this.label6.TabIndex = 70;
this.label6.Text = "串口状态:";
//
// cb_CH3PortName
//
this.cb_CH3PortName.FormattingEnabled = true;
this.cb_CH3PortName.Location = new System.Drawing.Point(28, 58);
this.cb_CH3PortName.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH3PortName.Name = "cb_CH3PortName";
this.cb_CH3PortName.Size = new System.Drawing.Size(137, 24);
this.cb_CH3PortName.TabIndex = 67;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(25, 35);
this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(55, 16);
this.label12.TabIndex = 65;
this.label12.Text = "端口号";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(25, 101);
this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(55, 16);
this.label14.TabIndex = 66;
this.label14.Text = "波特率";
//
// cb_CH3BaudRate
//
this.cb_CH3BaudRate.FormattingEnabled = true;
this.cb_CH3BaudRate.Items.AddRange(new object[] {
"115200",
"9600"});
this.cb_CH3BaudRate.Location = new System.Drawing.Point(28, 125);
this.cb_CH3BaudRate.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH3BaudRate.Name = "cb_CH3BaudRate";
this.cb_CH3BaudRate.Size = new System.Drawing.Size(137, 24);
this.cb_CH3BaudRate.TabIndex = 68;
//
// lb_CH3Com_status
//
this.lb_CH3Com_status.AutoSize = true;
this.lb_CH3Com_status.Font = new System.Drawing.Font("宋体", 12F);
this.lb_CH3Com_status.Location = new System.Drawing.Point(55, 206);
this.lb_CH3Com_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_CH3Com_status.Name = "lb_CH3Com_status";
this.lb_CH3Com_status.Size = new System.Drawing.Size(23, 16);
this.lb_CH3Com_status.TabIndex = 69;
this.lb_CH3Com_status.Text = "##";
//
// bt_CH3Connect
//
this.bt_CH3Connect.Location = new System.Drawing.Point(33, 244);
this.bt_CH3Connect.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH3Connect.Name = "bt_CH3Connect";
this.bt_CH3Connect.Size = new System.Drawing.Size(125, 45);
this.bt_CH3Connect.TabIndex = 62;
this.bt_CH3Connect.TabStop = false;
this.bt_CH3Connect.Text = "连接串口";
this.bt_CH3Connect.UseVisualStyleBackColor = true;
this.bt_CH3Connect.Click += new System.EventHandler(this.bt_CH3Connect_Click);
//
// bt_CH3Break
//
this.bt_CH3Break.Location = new System.Drawing.Point(33, 348);
this.bt_CH3Break.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH3Break.Name = "bt_CH3Break";
this.bt_CH3Break.Size = new System.Drawing.Size(125, 45);
this.bt_CH3Break.TabIndex = 63;
this.bt_CH3Break.Text = "断开连接";
this.bt_CH3Break.UseVisualStyleBackColor = true;
this.bt_CH3Break.Click += new System.EventHandler(this.bt_CH3Break_Click);
//
// bt_CH3Refresh
//
this.bt_CH3Refresh.Location = new System.Drawing.Point(33, 296);
this.bt_CH3Refresh.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH3Refresh.Name = "bt_CH3Refresh";
this.bt_CH3Refresh.Size = new System.Drawing.Size(125, 45);
this.bt_CH3Refresh.TabIndex = 64;
this.bt_CH3Refresh.Text = "刷新串口";
this.bt_CH3Refresh.UseVisualStyleBackColor = true;
this.bt_CH3Refresh.Click += new System.EventHandler(this.bt_CH3Refresh_Click);
//
// uiGroupBox1
//
this.uiGroupBox1.Controls.Add(this.label1);
@@ -232,23 +377,22 @@
this.uiGroupBox1.Controls.Add(this.bt_CH2Refresh);
this.uiGroupBox1.FillColor = System.Drawing.Color.Transparent;
this.uiGroupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiGroupBox1.Location = new System.Drawing.Point(264, 5);
this.uiGroupBox1.Location = new System.Drawing.Point(232, 16);
this.uiGroupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiGroupBox1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiGroupBox1.Name = "uiGroupBox1";
this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
this.uiGroupBox1.Size = new System.Drawing.Size(221, 490);
this.uiGroupBox1.Size = new System.Drawing.Size(199, 408);
this.uiGroupBox1.Style = Sunny.UI.UIStyle.Custom;
this.uiGroupBox1.TabIndex = 71;
this.uiGroupBox1.Text = "扫码枪2串口设置";
this.uiGroupBox1.TabIndex = 75;
this.uiGroupBox1.Text = "CH2扫码枪";
this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.uiGroupBox1.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 12F);
this.label1.Location = new System.Drawing.Point(52, 208);
this.label1.Location = new System.Drawing.Point(40, 177);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(87, 16);
@@ -258,7 +402,7 @@
// cb_CH2PortName
//
this.cb_CH2PortName.FormattingEnabled = true;
this.cb_CH2PortName.Location = new System.Drawing.Point(43, 89);
this.cb_CH2PortName.Location = new System.Drawing.Point(31, 58);
this.cb_CH2PortName.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH2PortName.Name = "cb_CH2PortName";
this.cb_CH2PortName.Size = new System.Drawing.Size(137, 24);
@@ -267,7 +411,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(40, 66);
this.label2.Location = new System.Drawing.Point(28, 35);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 16);
@@ -277,7 +421,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(40, 132);
this.label3.Location = new System.Drawing.Point(28, 101);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(55, 16);
@@ -290,7 +434,7 @@
this.cb_CH2BaudRate.Items.AddRange(new object[] {
"115200",
"9600"});
this.cb_CH2BaudRate.Location = new System.Drawing.Point(43, 156);
this.cb_CH2BaudRate.Location = new System.Drawing.Point(31, 125);
this.cb_CH2BaudRate.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH2BaudRate.Name = "cb_CH2BaudRate";
this.cb_CH2BaudRate.Size = new System.Drawing.Size(137, 24);
@@ -300,7 +444,7 @@
//
this.lb_CH2Com_status.AutoSize = true;
this.lb_CH2Com_status.Font = new System.Drawing.Font("宋体", 12F);
this.lb_CH2Com_status.Location = new System.Drawing.Point(71, 237);
this.lb_CH2Com_status.Location = new System.Drawing.Point(59, 206);
this.lb_CH2Com_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_CH2Com_status.Name = "lb_CH2Com_status";
this.lb_CH2Com_status.Size = new System.Drawing.Size(23, 16);
@@ -309,7 +453,7 @@
//
// bt_CH2Connect
//
this.bt_CH2Connect.Location = new System.Drawing.Point(48, 274);
this.bt_CH2Connect.Location = new System.Drawing.Point(36, 243);
this.bt_CH2Connect.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH2Connect.Name = "bt_CH2Connect";
this.bt_CH2Connect.Size = new System.Drawing.Size(125, 45);
@@ -321,7 +465,7 @@
//
// bt_CH2Break
//
this.bt_CH2Break.Location = new System.Drawing.Point(48, 379);
this.bt_CH2Break.Location = new System.Drawing.Point(36, 348);
this.bt_CH2Break.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH2Break.Name = "bt_CH2Break";
this.bt_CH2Break.Size = new System.Drawing.Size(125, 45);
@@ -332,7 +476,7 @@
//
// bt_CH2Refresh
//
this.bt_CH2Refresh.Location = new System.Drawing.Point(48, 327);
this.bt_CH2Refresh.Location = new System.Drawing.Point(36, 296);
this.bt_CH2Refresh.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH2Refresh.Name = "bt_CH2Refresh";
this.bt_CH2Refresh.Size = new System.Drawing.Size(125, 45);
@@ -341,6 +485,127 @@
this.bt_CH2Refresh.UseVisualStyleBackColor = true;
this.bt_CH2Refresh.Click += new System.EventHandler(this.CH2CodeRefresh_Click);
//
// uiGroupBox9
//
this.uiGroupBox9.Controls.Add(this.label7);
this.uiGroupBox9.Controls.Add(this.cb_CH1PortName);
this.uiGroupBox9.Controls.Add(this.label11);
this.uiGroupBox9.Controls.Add(this.label15);
this.uiGroupBox9.Controls.Add(this.cb_CH1BaudRate);
this.uiGroupBox9.Controls.Add(this.lb_CH1Com_status);
this.uiGroupBox9.Controls.Add(this.bt_CH1Connect);
this.uiGroupBox9.Controls.Add(this.bt_CH1Break);
this.uiGroupBox9.Controls.Add(this.bt_CH1Refresh);
this.uiGroupBox9.FillColor = System.Drawing.Color.Transparent;
this.uiGroupBox9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiGroupBox9.Location = new System.Drawing.Point(20, 16);
this.uiGroupBox9.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiGroupBox9.MinimumSize = new System.Drawing.Size(1, 1);
this.uiGroupBox9.Name = "uiGroupBox9";
this.uiGroupBox9.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
this.uiGroupBox9.Size = new System.Drawing.Size(195, 408);
this.uiGroupBox9.Style = Sunny.UI.UIStyle.Custom;
this.uiGroupBox9.TabIndex = 73;
this.uiGroupBox9.Text = "CH1扫码枪";
this.uiGroupBox9.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 12F);
this.label7.Location = new System.Drawing.Point(37, 177);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(87, 16);
this.label7.TabIndex = 70;
this.label7.Text = "串口状态:";
//
// cb_CH1PortName
//
this.cb_CH1PortName.FormattingEnabled = true;
this.cb_CH1PortName.Location = new System.Drawing.Point(28, 58);
this.cb_CH1PortName.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH1PortName.Name = "cb_CH1PortName";
this.cb_CH1PortName.Size = new System.Drawing.Size(137, 24);
this.cb_CH1PortName.TabIndex = 67;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(25, 35);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(55, 16);
this.label11.TabIndex = 65;
this.label11.Text = "端口号";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(25, 101);
this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(55, 16);
this.label15.TabIndex = 66;
this.label15.Text = "波特率";
//
// cb_CH1BaudRate
//
this.cb_CH1BaudRate.FormattingEnabled = true;
this.cb_CH1BaudRate.Items.AddRange(new object[] {
"115200",
"9600"});
this.cb_CH1BaudRate.Location = new System.Drawing.Point(28, 125);
this.cb_CH1BaudRate.Margin = new System.Windows.Forms.Padding(4);
this.cb_CH1BaudRate.Name = "cb_CH1BaudRate";
this.cb_CH1BaudRate.Size = new System.Drawing.Size(137, 24);
this.cb_CH1BaudRate.TabIndex = 68;
//
// lb_CH1Com_status
//
this.lb_CH1Com_status.AutoSize = true;
this.lb_CH1Com_status.Font = new System.Drawing.Font("宋体", 12F);
this.lb_CH1Com_status.Location = new System.Drawing.Point(55, 206);
this.lb_CH1Com_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_CH1Com_status.Name = "lb_CH1Com_status";
this.lb_CH1Com_status.Size = new System.Drawing.Size(23, 16);
this.lb_CH1Com_status.TabIndex = 69;
this.lb_CH1Com_status.Text = "##";
//
// bt_CH1Connect
//
this.bt_CH1Connect.Location = new System.Drawing.Point(33, 244);
this.bt_CH1Connect.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Connect.Name = "bt_CH1Connect";
this.bt_CH1Connect.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Connect.TabIndex = 62;
this.bt_CH1Connect.TabStop = false;
this.bt_CH1Connect.Text = "连接串口";
this.bt_CH1Connect.UseVisualStyleBackColor = true;
this.bt_CH1Connect.Click += new System.EventHandler(this.CodeCon_Click);
//
// bt_CH1Break
//
this.bt_CH1Break.Location = new System.Drawing.Point(33, 348);
this.bt_CH1Break.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Break.Name = "bt_CH1Break";
this.bt_CH1Break.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Break.TabIndex = 63;
this.bt_CH1Break.Text = "断开连接";
this.bt_CH1Break.UseVisualStyleBackColor = true;
this.bt_CH1Break.Click += new System.EventHandler(this.CodeBreak_Click);
//
// bt_CH1Refresh
//
this.bt_CH1Refresh.Location = new System.Drawing.Point(33, 296);
this.bt_CH1Refresh.Margin = new System.Windows.Forms.Padding(4);
this.bt_CH1Refresh.Name = "bt_CH1Refresh";
this.bt_CH1Refresh.Size = new System.Drawing.Size(125, 45);
this.bt_CH1Refresh.TabIndex = 64;
this.bt_CH1Refresh.Text = "刷新串口";
this.bt_CH1Refresh.UseVisualStyleBackColor = true;
this.bt_CH1Refresh.Click += new System.EventHandler(this.CodeRefresh_Click);
//
// uiTabControlMenu1
//
this.uiTabControlMenu1.Alignment = System.Windows.Forms.TabAlignment.Left;
@@ -354,7 +619,7 @@
this.uiTabControlMenu1.Multiline = true;
this.uiTabControlMenu1.Name = "uiTabControlMenu1";
this.uiTabControlMenu1.SelectedIndex = 0;
this.uiTabControlMenu1.Size = new System.Drawing.Size(1036, 581);
this.uiTabControlMenu1.Size = new System.Drawing.Size(1216, 581);
this.uiTabControlMenu1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.uiTabControlMenu1.Style = Sunny.UI.UIStyle.Custom;
this.uiTabControlMenu1.TabBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(115)))), ((int)(((byte)(144)))), ((int)(((byte)(153)))));
@@ -370,7 +635,7 @@
this.tabPage_TCP.Controls.Add(this.uiGroupBox2);
this.tabPage_TCP.Location = new System.Drawing.Point(201, 0);
this.tabPage_TCP.Name = "tabPage_TCP";
this.tabPage_TCP.Size = new System.Drawing.Size(835, 581);
this.tabPage_TCP.Size = new System.Drawing.Size(1015, 581);
this.tabPage_TCP.TabIndex = 3;
this.tabPage_TCP.Text = "网口扫码枪设置";
//
@@ -608,17 +873,21 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(845, 546);
this.ClientSize = new System.Drawing.Size(1083, 546);
this.Controls.Add(this.uiTabControlMenu1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form_SaomaSet";
this.Text = "扫码枪设置";
this.Load += new System.EventHandler(this.Port_Load);
this.uiGroupBox9.ResumeLayout(false);
this.uiGroupBox9.PerformLayout();
this.tabPage_SerialPort.ResumeLayout(false);
this.uiGroupBox5.ResumeLayout(false);
this.uiGroupBox5.PerformLayout();
this.uiGroupBox11.ResumeLayout(false);
this.uiGroupBox11.PerformLayout();
this.uiGroupBox1.ResumeLayout(false);
this.uiGroupBox1.PerformLayout();
this.uiGroupBox9.ResumeLayout(false);
this.uiGroupBox9.PerformLayout();
this.uiTabControlMenu1.ResumeLayout(false);
this.tabPage_TCP.ResumeLayout(false);
this.uiGroupBox3.ResumeLayout(false);
@@ -631,28 +900,8 @@
#endregion
private System.Windows.Forms.Timer timer_ConnectStatus;
private System.Windows.Forms.Button bt_CH1Break;
private System.Windows.Forms.Label label7;
public System.Windows.Forms.ComboBox cb_CH1PortName;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cb_CH1BaudRate;
public System.Windows.Forms.Label lb_CH1Com_status;
private System.Windows.Forms.Button bt_CH1Connect;
private System.Windows.Forms.Button bt_CH1Refresh;
private Sunny.UI.UIGroupBox uiGroupBox9;
private System.Windows.Forms.TabPage tabPage_SerialPort;
private Sunny.UI.UITabControlMenu uiTabControlMenu1;
private Sunny.UI.UIGroupBox uiGroupBox1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.ComboBox cb_CH2PortName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cb_CH2BaudRate;
public System.Windows.Forms.Label lb_CH2Com_status;
private System.Windows.Forms.Button bt_CH2Connect;
private System.Windows.Forms.Button bt_CH2Break;
private System.Windows.Forms.Button bt_CH2Refresh;
private System.Windows.Forms.TabPage tabPage_TCP;
private Sunny.UI.UIGroupBox uiGroupBox2;
private System.Windows.Forms.TextBox tb_CH1TCP_ip;
@@ -674,5 +923,45 @@
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox tb_CH2TCP_port;
private Sunny.UI.UIGroupBox uiGroupBox5;
private System.Windows.Forms.Label label17;
public System.Windows.Forms.ComboBox cb_CH4PortName;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.ComboBox cb_CH4BaudRate;
public System.Windows.Forms.Label lb_CH4Com_status;
private System.Windows.Forms.Button bt_CH4Connect;
private System.Windows.Forms.Button bt_CH4Break;
private System.Windows.Forms.Button bt_CH4Refresh;
private Sunny.UI.UIGroupBox uiGroupBox11;
private System.Windows.Forms.Label label6;
public System.Windows.Forms.ComboBox cb_CH3PortName;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox cb_CH3BaudRate;
public System.Windows.Forms.Label lb_CH3Com_status;
private System.Windows.Forms.Button bt_CH3Connect;
private System.Windows.Forms.Button bt_CH3Break;
private System.Windows.Forms.Button bt_CH3Refresh;
private Sunny.UI.UIGroupBox uiGroupBox1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.ComboBox cb_CH2PortName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cb_CH2BaudRate;
public System.Windows.Forms.Label lb_CH2Com_status;
private System.Windows.Forms.Button bt_CH2Connect;
private System.Windows.Forms.Button bt_CH2Break;
private System.Windows.Forms.Button bt_CH2Refresh;
private Sunny.UI.UIGroupBox uiGroupBox9;
private System.Windows.Forms.Label label7;
public System.Windows.Forms.ComboBox cb_CH1PortName;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cb_CH1BaudRate;
public System.Windows.Forms.Label lb_CH1Com_status;
private System.Windows.Forms.Button bt_CH1Connect;
private System.Windows.Forms.Button bt_CH1Break;
private System.Windows.Forms.Button bt_CH1Refresh;
}
}

View File

@@ -35,7 +35,9 @@ namespace SLC1_N
uiTabControlMenu1.TabPages[1].Enabled = false;
uiTabControlMenu1.SelectTab($"tabPage_SerialPort");
// 扫码枪1
var jsconfig = new JsonConfig("config.json");
// 串口扫码枪1
if (Form1.f1.SerialPort_CH1Saoma.IsOpen)
{
lb_CH1Com_status.Text = "已打开";
@@ -52,9 +54,8 @@ namespace SLC1_N
lb_CH1Com_status.Text = "未打开";
lb_CH1Com_status.ForeColor = Color.Red;
var jsconfig = new JsonConfig("config.json");
cb_CH1PortName.Text = jsconfig.GetValue<string>("SerialPort_CH1BaudRate", "COM21");
cb_CH1BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH1PortName", 9600).ToString();
cb_CH1PortName.Text = jsconfig.GetValue<string>("SerialPort_CH1PortName", "COM21");
cb_CH1BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH1BaudRate", 9600).ToString();
cb_CH1PortName.Enabled = true;
cb_CH1BaudRate.Enabled = true;
@@ -78,14 +79,63 @@ namespace SLC1_N
lb_CH2Com_status.Text = "未打开";
lb_CH2Com_status.ForeColor = Color.Red;
var jsconfig = new JsonConfig("config.json");
cb_CH2PortName.Text = jsconfig.GetValue<string>("SerialPort_CH2BaudRate", "COM22");
cb_CH2BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH2PortName", 9600).ToString();
cb_CH2PortName.Text = jsconfig.GetValue<string>("SerialPort_CH2PortName", "COM22");
cb_CH2BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH2BaudRate", 9600).ToString();
cb_CH2PortName.Enabled = true;
cb_CH2BaudRate.Enabled = true;
bt_CH2Connect.Enabled = true;
}
// 串口扫码枪3
if (Form1.f1.SerialPort_CH3Saoma.IsOpen)
{
lb_CH3Com_status.Text = "已打开";
lb_CH3Com_status.ForeColor = Color.Green;
cb_CH3PortName.Text = Form1.f1.SerialPort_CH3Saoma.PortName;
cb_CH3BaudRate.Text = Form1.f1.SerialPort_CH3Saoma.BaudRate.ToString();
cb_CH3PortName.Enabled = false;
cb_CH3BaudRate.Enabled = false;
bt_CH3Connect.Enabled = false;
}
else
{
lb_CH3Com_status.Text = "未打开";
lb_CH3Com_status.ForeColor = Color.Red;
cb_CH3PortName.Text = jsconfig.GetValue<string>("SerialPort_CH3PortName", "COM21");
cb_CH3BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH3BaudRate", 9600).ToString();
cb_CH3PortName.Enabled = true;
cb_CH3BaudRate.Enabled = true;
bt_CH3Connect.Enabled = true;
}
// 串口扫码枪4
if (Form1.f1.SerialPort_CH4Saoma.IsOpen)
{
lb_CH4Com_status.Text = "已打开";
lb_CH4Com_status.ForeColor = Color.Green;
cb_CH4PortName.Text = Form1.f1.SerialPort_CH4Saoma.PortName;
cb_CH4BaudRate.Text = Form1.f1.SerialPort_CH4Saoma.BaudRate.ToString();
cb_CH4PortName.Enabled = false;
cb_CH4BaudRate.Enabled = false;
bt_CH4Connect.Enabled = false;
}
else
{
lb_CH4Com_status.Text = "未打开";
lb_CH4Com_status.ForeColor = Color.Red;
cb_CH4PortName.Text = jsconfig.GetValue<string>("SerialPort_CH4PortName", "COM21");
cb_CH4BaudRate.Text = jsconfig.GetValue<int>("SerialPort_CH4BaudRate", 9600).ToString();
cb_CH4PortName.Enabled = true;
cb_CH4BaudRate.Enabled = true;
bt_CH4Connect.Enabled = true;
}
}
// TCP扫码枪初始化
@@ -101,7 +151,7 @@ namespace SLC1_N
tb_CH2TCP_port.Text = jsconfig.GetValue<int>("Saoma_Port2", 51111).ToString();
}
// 串口扫码枪1连接
// 串口扫码枪1连接按钮
private void CodeCon_Click(object sender, EventArgs e)
{
try
@@ -133,7 +183,7 @@ namespace SLC1_N
}
}
// 串口扫码枪2连接
// 串口扫码枪2连接按钮
private void CH2CodeCon_Click(object sender, EventArgs e)
{
try
@@ -165,6 +215,70 @@ namespace SLC1_N
}
}
// 串口扫码枪3连接按钮
private void bt_CH3Connect_Click(object sender, EventArgs e)
{
try
{
//设置端口的参数,包括波特率等
Form1.f1.SerialPort_CH3Saoma.BaudRate = Convert.ToInt32(cb_CH3BaudRate.Text);
Form1.f1.SerialPort_CH3Saoma.PortName = cb_CH3PortName.Text;
Form1.f1.SerialPort_CH3Saoma.DataBits = 8;
Form1.f1.SerialPort_CH3Saoma.StopBits = System.IO.Ports.StopBits.One;
Form1.f1.SerialPort_CH3Saoma.Parity = System.IO.Ports.Parity.None;
Form1.f1.SerialPort_CH3Saoma.Open();
if (Form1.f1.SerialPort_CH3Saoma.IsOpen)
{
lb_CH3Com_status.Text = "已打开";
lb_CH3Com_status.ForeColor = Color.Green;
cb_CH3PortName.Enabled = false;
cb_CH3BaudRate.Enabled = false;
bt_CH3Connect.Enabled = false;
//将端口和波特率进行存储
var jsconfig = new JsonConfig("config.json");
jsconfig.SetValue("SerialPort_CH3BaudRate", cb_CH3BaudRate.Text);
jsconfig.SetValue("SerialPort_CH3PortName", cb_CH3PortName.Text);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
// 串口扫码枪4连接按钮
private void bt_CH4Connect_Click(object sender, EventArgs e)
{
try
{
//设置端口的参数,包括波特率等
Form1.f1.SerialPort_CH4Saoma.BaudRate = Convert.ToInt32(cb_CH4BaudRate.Text);
Form1.f1.SerialPort_CH4Saoma.PortName = cb_CH4PortName.Text;
Form1.f1.SerialPort_CH4Saoma.DataBits = 8;
Form1.f1.SerialPort_CH4Saoma.StopBits = System.IO.Ports.StopBits.One;
Form1.f1.SerialPort_CH4Saoma.Parity = System.IO.Ports.Parity.None;
Form1.f1.SerialPort_CH4Saoma.Open();
if (Form1.f1.SerialPort_CH4Saoma.IsOpen)
{
lb_CH4Com_status.Text = "已打开";
lb_CH4Com_status.ForeColor = Color.Green;
cb_CH4PortName.Enabled = false;
cb_CH4BaudRate.Enabled = false;
bt_CH4Connect.Enabled = false;
//将端口和波特率进行存储
var jsconfig = new JsonConfig("config.json");
jsconfig.SetValue("SerialPort_CH4BaudRate", cb_CH4BaudRate.Text);
jsconfig.SetValue("SerialPort_CH4PortName", cb_CH4PortName.Text);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
// 串口扫码枪1刷新
private void CodeRefresh_Click(object sender, EventArgs e)
{
@@ -181,6 +295,22 @@ namespace SLC1_N
cb_CH2PortName.Items.AddRange(ports);
}
// 串口扫码枪3刷新
private void bt_CH3Refresh_Click(object sender, EventArgs e)
{
cb_CH3PortName.Items.Clear();
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
cb_CH3PortName.Items.AddRange(ports);
}
// 串口扫码枪4刷新
private void bt_CH4Refresh_Click(object sender, EventArgs e)
{
cb_CH4PortName.Items.Clear();
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
cb_CH4PortName.Items.AddRange(ports);
}
// 串口扫码枪1关闭
private void CodeBreak_Click(object sender, EventArgs e)
{
@@ -209,6 +339,34 @@ namespace SLC1_N
}
}
// 串口扫码枪3关闭
private void bt_CH3Break_Click(object sender, EventArgs e)
{
Form1.f1.SerialPort_CH3Saoma.Close();
if (!Form1.f1.SerialPort_CH3Saoma.IsOpen)
{
lb_CH3Com_status.Text = "未打开";
lb_CH3Com_status.ForeColor = Color.Red;
cb_CH3PortName.Enabled = true;
cb_CH3BaudRate.Enabled = true;
bt_CH3Connect.Enabled = true;
}
}
// 串口扫码枪4关闭
private void bt_CH4Break_Click(object sender, EventArgs e)
{
Form1.f1.SerialPort_CH4Saoma.Close();
if (!Form1.f1.SerialPort_CH4Saoma.IsOpen)
{
lb_CH4Com_status.Text = "未打开";
lb_CH4Com_status.ForeColor = Color.Red;
cb_CH4PortName.Enabled = true;
cb_CH4BaudRate.Enabled = true;
bt_CH4Connect.Enabled = true;
}
}
// 网口扫码枪1重连
private void bt_CH1TCP_Reconnect_Click(object sender, EventArgs e)
{
@@ -322,6 +480,41 @@ namespace SLC1_N
cb_CH2BaudRate.Enabled = true;
bt_CH2Connect.Enabled = true;
}
// 串口扫码枪3
if (Form1.f1.SerialPort_CH3Saoma.IsOpen)
{
lb_CH3Com_status.Text = "已打开";
lb_CH3Com_status.ForeColor = Color.Green;
cb_CH3PortName.Enabled = false;
cb_CH3BaudRate.Enabled = false;
bt_CH3Connect.Enabled = false;
}
else
{
lb_CH3Com_status.Text = "未打开";
lb_CH3Com_status.ForeColor = Color.Red;
cb_CH3PortName.Enabled = true;
cb_CH3BaudRate.Enabled = true;
bt_CH3Connect.Enabled = true;
}
// 串口扫码枪4
if (Form1.f1.SerialPort_CH4Saoma.IsOpen)
{
lb_CH4Com_status.Text = "已打开";
lb_CH4Com_status.ForeColor = Color.Green;
cb_CH4PortName.Enabled = false;
cb_CH4BaudRate.Enabled = false;
bt_CH4Connect.Enabled = false;
}
else
{
lb_CH4Com_status.Text = "未打开";
lb_CH4Com_status.ForeColor = Color.Red;
cb_CH4PortName.Enabled = true;
cb_CH4BaudRate.Enabled = true;
bt_CH4Connect.Enabled = true;
}
// 网口扫码枪1
if (Form1.f1.saomaClient1 != null && Form1.f1.saomaClient1.isRunning)
{
@@ -345,5 +538,8 @@ namespace SLC1_N
lb_CH2TCP_ConnectStatus.ForeColor = Color.Red;
}
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.