Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7871d050
由
几米阳光
编写于
2019-03-19 11:23:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ee28c326
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
286 行增加
和
281 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/Resources/AgrGridLink.dll
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
7871d05
...
...
@@ -31,6 +31,9 @@
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
chbAuto
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
label38
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtMiddleTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -50,7 +53,7 @@
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
group
Box5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
Axis
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnReadHomeSingle
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -94,7 +97,7 @@
this
.
cmbAxisList
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
group
Box2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
Inout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblTemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnClearLog
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -175,14 +178,13 @@
this
.
英文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator11
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
德文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
启用调试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator16
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
group
Box5
.
SuspendLayout
();
this
.
group
Box2
.
SuspendLayout
();
this
.
group
Axis
.
SuspendLayout
();
this
.
group
Inout
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -262,6 +264,36 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
200
,
64
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
402
,
64
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
297
,
64
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// label38
//
this
.
label38
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -439,60 +471,61 @@
this
.
lblThisSta
.
TabIndex
=
216
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
//
// group
Box5
// group
Axis
//
this
.
group
Box5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
group
Axis
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadHomeSingle
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtHomeSingle
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
chbAutoRead
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label16
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label15
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtHomeStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtBusyStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAlarmStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnGetAlarm
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadPosition
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnOpenAxis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnCloseAxis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblCountPulse
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtASpeed
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblOutPulse
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label47
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisVMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisReturnHome
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
Bt_ClearCounter
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnComAlarmClear
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAPosition
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label48
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisStop
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAxisValue
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAxisDeviceName
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label45
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label46
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
cmbAxisList
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label49
);
this
.
groupBox5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
611
,
141
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
627
,
389
);
this
.
groupBox5
.
TabIndex
=
216
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"伺服运动"
;
this
.
groupBox5
.
Enter
+=
new
System
.
EventHandler
(
this
.
groupBox5_Enter
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label6
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label5
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnReadHomeSingle
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtHomeSingle
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
chbAutoRead
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label16
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label15
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label14
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label11
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtHomeStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
button2
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label10
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtBusyStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
button1
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label2
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAlarmStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnGetAlarm
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnReadPosition
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label7
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label8
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnOpenAxis
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnCloseAxis
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblCountPulse
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtASpeed
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblOutPulse
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label47
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisVMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisReturnHome
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
Bt_ClearCounter
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnComAlarmClear
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAPosition
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label48
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisStop
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAxisValue
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAxisDeviceName
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label45
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label46
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
cmbAxisList
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label49
);
this
.
groupAxis
.
Enabled
=
false
;
this
.
groupAxis
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupAxis
.
Location
=
new
System
.
Drawing
.
Point
(
611
,
141
);
this
.
groupAxis
.
Name
=
"groupAxis"
;
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
627
,
389
);
this
.
groupAxis
.
TabIndex
=
216
;
this
.
groupAxis
.
TabStop
=
false
;
this
.
groupAxis
.
Text
=
"伺服运动"
;
//
// label6
//
...
...
@@ -973,57 +1006,58 @@
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblTemp
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnClearLog
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSavePosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnStartAuTo
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtMiddleP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtMiddleP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label21
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOutStore
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnMiddleP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnMiddleP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
38
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
583
,
603
);
this
.
groupBox2
.
TabIndex
=
100
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"料仓操作"
;
// groupInout
//
this
.
groupInout
.
Controls
.
Add
(
this
.
lblTemp
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnClearLog
);
this
.
groupInout
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnSavePosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnStartAuTo
);
this
.
groupInout
.
Controls
.
Add
(
this
.
label9
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtMiddleP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP5
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
label21
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnOutStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP4
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnMiddleP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP5
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupInout
.
Enabled
=
false
;
this
.
groupInout
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
38
);
this
.
groupInout
.
Name
=
"groupInout"
;
this
.
groupInout
.
Size
=
new
System
.
Drawing
.
Size
(
583
,
603
);
this
.
groupInout
.
TabIndex
=
100
;
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
Text
=
"料仓操作"
;
//
// lblTemp
//
...
...
@@ -1740,7 +1774,9 @@
this
.
toolStripSeparator7
,
this
.
打开舱门
ToolStripMenuItem
,
this
.
toolStripSeparator8
,
this
.
关闭仓门
ToolStripMenuItem
});
this
.
关闭仓门
ToolStripMenuItem
,
this
.
toolStripSeparator16
,
this
.
启用调试
ToolStripMenuItem
});
this
.
iO
状态查看
ToolStripMenuItem
.
Name
=
"iO状态查看ToolStripMenuItem"
;
this
.
iO
状态查看
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
iO
状态查看
ToolStripMenuItem
.
Text
=
"设备调试"
;
...
...
@@ -1748,115 +1784,115 @@
// 查看IOToolStripMenuItem
//
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
//
// toolStripSeparator9
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 轴卡点动ToolStripMenuItem
//
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
轴卡点动
ToolStripMenuItem
.
Text
=
"轴卡点动"
;
this
.
轴卡点动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
轴卡点动
ToolStripMenuItem_Click
);
//
// toolStripSeparator12
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 扫码测试ToolStripMenuItem
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
//
// toolStripSeparator10
//
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 学习二维码ToolStripMenuItem
//
this
.
学习二维码
ToolStripMenuItem
.
Name
=
"学习二维码ToolStripMenuItem"
;
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
学习二维码
ToolStripMenuItem
.
Text
=
"学习二维码"
;
this
.
学习二维码
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
学习二维码
ToolStripMenuItem_Click
);
//
// toolStripSeparator5
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// toolStripMenuItem3
//
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem3
.
Text
=
"门禁功能屏蔽"
;
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// toolStripMenuItem2
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"门禁功能打开"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
// toolStripSeparator13
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 料仓运转OFFToolStripMenuItem
//
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
//
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 料仓运转ONToolStripMenuItem
//
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 打开舱门ToolStripMenuItem
//
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
打开舱门
ToolStripMenuItem
.
Text
=
"打开仓门"
;
this
.
打开舱门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开舱门
ToolStripMenuItem_Click
);
//
// toolStripSeparator8
//
this
.
toolStripSeparator8
.
Name
=
"toolStripSeparator8"
;
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
// 关闭仓门ToolStripMenuItem
//
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
关闭仓门
ToolStripMenuItem
.
Text
=
"关闭仓门"
;
this
.
关闭仓门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭仓门
ToolStripMenuItem_Click
);
//
...
...
@@ -1904,46 +1940,28 @@
this
.
德文
ToolStripMenuItem
.
Visible
=
false
;
this
.
德文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
德文
ToolStripMenuItem_Click
);
//
//
axis_1_Alar
m
//
启用调试ToolStripMenuIte
m
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
200
,
64
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
this
.
启用调试
ToolStripMenuItem
.
Name
=
"启用调试ToolStripMenuItem"
;
this
.
启用调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
启用调试
ToolStripMenuItem
.
Text
=
"启用调试"
;
this
.
启用调试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用调试
ToolStripMenuItem_Click
);
//
//
axis_3_Alarm
//
toolStripSeparator16
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
402
,
64
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
297
,
64
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Dpi
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1253
,
7
7
9
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1253
,
7
4
9
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
group
Box5
);
this
.
Controls
.
Add
(
this
.
group
Axis
);
this
.
Controls
.
Add
(
this
.
richTextBox1
);
this
.
Controls
.
Add
(
this
.
group
Box2
);
this
.
Controls
.
Add
(
this
.
group
Inout
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
...
@@ -1961,10 +1979,10 @@
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
group
Box5
.
ResumeLayout
(
false
);
this
.
group
Box5
.
PerformLayout
();
this
.
group
Box2
.
ResumeLayout
(
false
);
this
.
group
Box2
.
PerformLayout
();
this
.
group
Axis
.
ResumeLayout
(
false
);
this
.
group
Axis
.
PerformLayout
();
this
.
group
Inout
.
ResumeLayout
(
false
);
this
.
group
Inout
.
PerformLayout
();
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
...
...
@@ -1975,7 +1993,7 @@
#
endregion
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Box2
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Inout
;
private
System
.
Windows
.
Forms
.
Button
btnOutStore
;
private
System
.
Windows
.
Forms
.
Button
btnInStore
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP3
;
...
...
@@ -1990,7 +2008,7 @@
private
System
.
Windows
.
Forms
.
TextBox
lblOutPulse
;
private
System
.
Windows
.
Forms
.
TextBox
lblCountPulse
;
private
System
.
Windows
.
Forms
.
Button
btnComAlarmClear
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Box5
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Axis
;
public
System
.
Windows
.
Forms
.
Button
btnComP1
;
public
System
.
Windows
.
Forms
.
TextBox
txtComP1
;
public
System
.
Windows
.
Forms
.
Button
btnInOutP2
;
...
...
@@ -2128,6 +2146,8 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
英文
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
德文
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator15
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator16
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用调试
ToolStripMenuItem
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
7871d05
...
...
@@ -875,23 +875,12 @@ namespace OnlineStore.ACSingleStore
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
PleaseStartStore
,
"请先启动料仓!"
));
}
}
//private void btnAxisConfig_Click(object sender, EventArgs e)
//{
// FormManager.ShowAxisConfig(store);
//}
}
private
void
轴卡点动
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
button1_Click
(
null
,
null
);
}
private
void
轴运动配置
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
//FormManager.ShowAxisConfig(store);
}
}
private
void
启动
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
start_button_Click
(
null
,
null
);
...
...
@@ -920,14 +909,7 @@ namespace OnlineStore.ACSingleStore
{
//this.richTextBox1.Text = "";
LogUtil
.
ClearLog
();
}
private
void
btnRelMove_Click
(
object
sender
,
EventArgs
e
)
{
//int posi = FormUtil.GetIntValue(txtLinePosition);
//ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
}
}
private
void
料仓运转
ONToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Enabled
=
false
;
...
...
@@ -940,12 +922,7 @@ namespace OnlineStore.ACSingleStore
{
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
string
message
=
""
;
//List<string> codeList = HDevelopExport.CameraScan();
//foreach (string str in codeList)
//{
// string code = HDevelopExport.SubStrCode(str);
// message = message + code + "##";
//}
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
foreach
(
string
str
in
codeList
)
{
...
...
@@ -1020,9 +997,7 @@ namespace OnlineStore.ACSingleStore
this
.
btnInOutP1
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
btnInOutP3
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
btnMiddleP1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
192
)))));
this
.
btnMiddleP2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
192
)))));
this
.
btnMiddleP2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
192
)))));
}
/// <summary>
/// 判断AC伺服电机轴是否运动完成
...
...
@@ -1184,21 +1159,9 @@ namespace OnlineStore.ACSingleStore
{
ExitApp
();
}
}
//private void 摄像机调试ToolStripMenuItem_Click(object sender, EventArgs e)
//{
// FrmCamera frm = new FrmCamera(store);
// frm.ShowDialog();
//}
}
private
void
学习二维码
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
//string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
//string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
//HDCodeLearnHelper.LoadConfig(nameStr, codeStr);
//FrmCodeLearn learn = new FrmCodeLearn();
//learn.ShowDialog();
{
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
string
nameStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CameraName
);
...
...
@@ -1230,17 +1193,10 @@ namespace OnlineStore.ACSingleStore
{
FrmLanguage
frm
=
new
FrmLanguage
();
frm
.
ShowDialog
();
}
private
void
开启
DEBUGToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
}
}
private
void
清理日志
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
string
str
=
ResourceCulture
.
China
;
string
str
=
ResourceCulture
.
China
;
ResourceCulture
.
SetCurrentCulture
(
str
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Default_Language
,
str
);
this
.
LanguageProcess
();
...
...
@@ -1251,17 +1207,36 @@ namespace OnlineStore.ACSingleStore
string
str
=
ResourceCulture
.
English
;
ResourceCulture
.
SetCurrentCulture
(
str
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Default_Language
,
str
);
this
.
LanguageProcess
();
this
.
LanguageProcess
();
}
private
void
德文
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
DebugStatus
(
bool
status
)
{
if
(
status
)
{
启用调试
ToolStripMenuItem
.
Text
=
"禁用调试"
;
}
else
{
启用调试
ToolStripMenuItem
.
Text
=
"启用调试"
;
}
groupAxis
.
Enabled
=
status
;
groupInout
.
Enabled
=
status
;
}
private
void
groupBox5_Enter
(
object
sender
,
EventArgs
e
)
{
private
void
启用调试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(
启用调试
ToolStripMenuItem
.
Text
.
Equals
(
"启用调试"
))
{
DebugStatus
(
true
);
}
else
{
DebugStatus
(
false
);
}
}
}
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
7871d05
...
...
@@ -99,9 +99,6 @@
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\AgrGridLink.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
...
...
source/DeviceLibrary/Resources/AgrGridLink.dll
deleted
100644 → 0
查看文件 @
ee28c32
此文件类型无法预览
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
7871d05
...
...
@@ -85,15 +85,12 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置
string
nameStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CameraName
);
string
codeStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CodeType
);
//HDevelopExport.LoadConfig(nameStr,codeStr);
CodeManager
.
LoadConfig
(
nameStr
,
codeStr
);
//初始化 //连接设备
IOManager
.
instance
.
ConnectionKND
(
Config
.
DIODeviceNameList
);
//scanSocket.OnScanRevice += onCodeReceived;
timersTimer
.
Enabled
=
false
;
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
if
(
isAuto
==
1
)
...
...
@@ -1050,12 +1047,7 @@ namespace OnlineStore.DeviceLibrary
BusyMoveProcess
();
}
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
//if (scanSocket.isScannerRun.Equals(false))
//{
// scanSocket.ConnectScanner(Config.Scanner_Ip,Config.Scanner_Port);
//}
{
//判断是否需要出入库
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
)&&
alarmType
.
Equals
(
StoreAlarmType
.
None
))
{
...
...
@@ -1102,11 +1094,7 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
StoreName
+
"定时处理出错"
,
ex
);
}
}
//private void BeginScannering()
//{
// scanSocket.BeginScannering();
//}
private
DateTime
preIoTimerOutTime
=
DateTime
.
Now
;
/// <summary>
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
7871d05
...
...
@@ -761,11 +761,7 @@ namespace OnlineStore.DeviceLibrary
if
(
storeMoveType
.
Equals
(
StoreMoveType
.
InStore
))
{
int
newIndex
=
autoPositionIndex
;
//int newIndex = autoPositionIndex - 1;
//if (autoJiange == 0)
//{
// newIndex = autoPositionIndex;
//}
if
(
newIndex
<
0
)
{
if
(
AutoStartIndex
>=
0
&&
AutoStartIndex
<
PositionNumList
.
Count
)
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
7871d05
...
...
@@ -6,14 +6,15 @@ using System.Collections.Generic;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.Text
;
using
System.Windows.Forms
;
namespace
OnlineStore.DeviceLibrary
{
public
class
CodeManager
public
class
CodeManager
{
public
static
List
<
string
>
cameraNameList
=
new
List
<
string
>();
public
static
List
<
string
>
codeTypeList
=
new
List
<
string
>();
...
...
@@ -31,7 +32,7 @@ namespace OnlineStore.DeviceLibrary
cameraNameList
=
new
List
<
string
>();
codeTypeList
=
new
List
<
string
>();
try
{
{
string
[]
nameArray
=
nameStr
.
Split
(
spiltChar
);
foreach
(
string
str
in
nameArray
)
{
...
...
@@ -45,31 +46,40 @@ namespace OnlineStore.DeviceLibrary
codeTypeList
.
Add
(
str
.
Trim
());
}
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
balserNameList
.
AddRange
(
names
);
foreach
(
string
name
in
hikNameList
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
foreach
(
string
name
in
balserNameList
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
}
LoadCamera
();
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
nameStr
,
codeStr
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
ToString
());
}
}
}
private
static
void
LoadCamera
()
{
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
balserNameList
.
AddRange
(
names
);
foreach
(
string
name
in
hikNameList
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
foreach
(
string
name
in
balserNameList
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
}
}
public
static
Bitmap
GetCamerImage
(
string
cameraName
)
{
Bitmap
bitm
=
null
;
//若未加载到相机,需要重新加载相机
if
(
balserNameList
.
Count
<=
0
&&
hikNameList
.
Count
<=
0
)
{
LogUtil
.
error
(
"获取图片时发现未加载到相机,重新加载相机"
);
LoadCamera
();
}
if
(
balserNameList
.
Contains
(
cameraName
))
{
BaslerCamera
.
Instance
.
Open
(
cameraName
);
...
...
@@ -77,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
bitm
=
BaslerCamera
.
Instance
.
Image
;
BaslerCamera
.
Instance
.
Close
();
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
HIKCamera
.
Instance
.
Open
(
cameraName
);
HIKCamera
.
Instance
.
GrabOne
();
...
...
@@ -86,12 +96,13 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
}
return
bitm
;
}
public
static
List
<
string
>
CameraScan
(
)
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
()
{
List
<
string
>
codeList
=
new
List
<
string
>();
List
<
CodeInfo
>
allCodeList
=
new
List
<
CodeInfo
>();
...
...
@@ -100,34 +111,52 @@ namespace OnlineStore.DeviceLibrary
{
foreach
(
string
cameraName
in
cameraNameList
)
{
Bitmap
bitmap
=
GetCamerImage
(
cameraName
);
if
(
bitmap
==
null
)
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
}
else
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
))
{
if
(
bitmap
==
null
)
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
continue
;
}
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
}
else
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
//LogUtil.info(" 摄像机【" + cameraName + "】【"+ codeType + "】扫码完成");
allCodeList
.
AddRange
(
cc
);
}
allCodeList
.
AddRange
(
cc
);
}
}
}
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
"扫码出现AccessViolationException异常:"
+
e
.
ToString
());
GC
.
Collect
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"扫码出错:"
+
ex
.
ToString
());
}
foreach
(
CodeInfo
info
in
allCodeList
)
foreach
(
CodeInfo
info
in
allCodeList
)
{
codeList
.
Add
(
info
.
CodeStr
);
}
return
codeList
;
}
public
static
string
GetCodeParamFilePath
(
string
codePath
)
{
...
...
@@ -142,7 +171,7 @@ namespace OnlineStore.DeviceLibrary
{
return
""
;
}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论