Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 84f375e7
由
LN
编写于
2023-03-24 09:34:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
托盘检测图片保存单独配置
1 个父辈
d5242713
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
67 行增加
和
23 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
84f375e
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
checkBox1
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbSaveImg
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbSaveImg
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbSaveImage
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbSaveImage
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
@@ -96,6 +97,7 @@
...
@@ -96,6 +97,7 @@
this
.
toolStripMenuItem2
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem2
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem3
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem3
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator20
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
托盘初始化
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
托盘初始化
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
查看托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
查看托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -121,7 +123,6 @@
...
@@ -121,7 +123,6 @@
this
.
toolStripSeparator19
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator19
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
自动保存托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
自动保存托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
新托盘检测逻辑
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
新托盘检测逻辑
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator20
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
@@ -154,6 +155,7 @@
...
@@ -154,6 +155,7 @@
//
//
// tabPage1
// tabPage1
//
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
checkBox1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbSaveImg
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbSaveImg
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbSaveImage
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbSaveImage
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
...
@@ -171,11 +173,23 @@
...
@@ -171,11 +173,23 @@
this
.
tabPage1
.
Text
=
"状态信息"
;
this
.
tabPage1
.
Text
=
"状态信息"
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
//
// checkBox1
//
this
.
checkBox1
.
AutoSize
=
true
;
this
.
checkBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
1151
,
150
);
this
.
checkBox1
.
Name
=
"checkBox1"
;
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
24
);
this
.
checkBox1
.
TabIndex
=
286
;
this
.
checkBox1
.
Text
=
"保存托盘检测图片"
;
this
.
checkBox1
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox1
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
checkBox1_CheckedChanged_1
);
//
// chbSaveImg
// chbSaveImg
//
//
this
.
chbSaveImg
.
AutoSize
=
true
;
this
.
chbSaveImg
.
AutoSize
=
true
;
this
.
chbSaveImg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbSaveImg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbSaveImg
.
Location
=
new
System
.
Drawing
.
Point
(
1
187
,
145
);
this
.
chbSaveImg
.
Location
=
new
System
.
Drawing
.
Point
(
1
028
,
150
);
this
.
chbSaveImg
.
Name
=
"chbSaveImg"
;
this
.
chbSaveImg
.
Name
=
"chbSaveImg"
;
this
.
chbSaveImg
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbSaveImg
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbSaveImg
.
TabIndex
=
285
;
this
.
chbSaveImg
.
TabIndex
=
285
;
...
@@ -187,7 +201,7 @@
...
@@ -187,7 +201,7 @@
//
//
this
.
chbSaveImage
.
AutoSize
=
true
;
this
.
chbSaveImage
.
AutoSize
=
true
;
this
.
chbSaveImage
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbSaveImage
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbSaveImage
.
Location
=
new
System
.
Drawing
.
Point
(
1059
,
145
);
this
.
chbSaveImage
.
Location
=
new
System
.
Drawing
.
Point
(
900
,
150
);
this
.
chbSaveImage
.
Name
=
"chbSaveImage"
;
this
.
chbSaveImage
.
Name
=
"chbSaveImage"
;
this
.
chbSaveImage
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbSaveImage
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbSaveImage
.
TabIndex
=
203
;
this
.
chbSaveImage
.
TabIndex
=
203
;
...
@@ -769,80 +783,85 @@
...
@@ -769,80 +783,85 @@
// toolStripSeparator6
// toolStripSeparator6
//
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator6
.
Visible
=
false
;
this
.
toolStripSeparator6
.
Visible
=
false
;
//
//
// 二维码学习ToolStripMenuItem
// 二维码学习ToolStripMenuItem
//
//
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码学习"
;
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码学习"
;
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator7
// toolStripSeparator7
//
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// iO模块状态ToolStripMenuItem
// iO模块状态ToolStripMenuItem
//
//
this
.
iO
模块状态
ToolStripMenuItem
.
Name
=
"iO模块状态ToolStripMenuItem"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Name
=
"iO模块状态ToolStripMenuItem"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Text
=
"IO模块状态"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Text
=
"IO模块状态"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
iO
模块状态
ToolStripMenuItem_Click
);
this
.
iO
模块状态
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
iO
模块状态
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator9
// toolStripSeparator9
//
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// toolStripMenuItem2
// toolStripMenuItem2
//
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"查看异常列表"
;
this
.
toolStripMenuItem2
.
Text
=
"查看异常列表"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click_1
);
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click_1
);
//
//
// toolStripSeparator13
// toolStripSeparator13
//
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// toolStripMenuItem3
// toolStripMenuItem3
//
//
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem3
.
Text
=
"查看禁用托盘"
;
this
.
toolStripMenuItem3
.
Text
=
"查看禁用托盘"
;
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
//
//
// toolStripSeparator20
//
this
.
toolStripSeparator20
.
Name
=
"toolStripSeparator20"
;
this
.
toolStripSeparator20
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
//
// 托盘初始化ToolStripMenuItem
// 托盘初始化ToolStripMenuItem
//
//
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Text
=
"托盘编码"
;
this
.
托盘初始化
ToolStripMenuItem
.
Text
=
"托盘编码"
;
this
.
托盘初始化
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
托盘初始化
ToolStripMenuItem_Click
);
this
.
托盘初始化
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
托盘初始化
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator14
// toolStripSeparator14
//
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// 查看托盘信息ToolStripMenuItem
// 查看托盘信息ToolStripMenuItem
//
//
this
.
查看托盘信息
ToolStripMenuItem
.
Name
=
"查看托盘信息ToolStripMenuItem"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Name
=
"查看托盘信息ToolStripMenuItem"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Text
=
"查看托盘信息"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Text
=
"查看托盘信息"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayInfo_Click
);
this
.
查看托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayInfo_Click
);
//
//
// toolStripSeparator12
// toolStripSeparator12
//
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// 清空托盘信息ToolStripMenuItem
// 清空托盘信息ToolStripMenuItem
//
//
this
.
清空托盘信息
ToolStripMenuItem
.
Name
=
"清空托盘信息ToolStripMenuItem"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Name
=
"清空托盘信息ToolStripMenuItem"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
清空托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
清空托盘信息
ToolStripMenuItem
.
Text
=
"清空托盘信息"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Text
=
"清空托盘信息"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空托盘信息
ToolStripMenuItem_Click
);
this
.
清空托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空托盘信息
ToolStripMenuItem_Click
);
//
//
...
@@ -998,11 +1017,6 @@
...
@@ -998,11 +1017,6 @@
this
.
新托盘检测逻辑
ToolStripMenuItem
.
Text
=
"✔新托盘检测逻辑"
;
this
.
新托盘检测逻辑
ToolStripMenuItem
.
Text
=
"✔新托盘检测逻辑"
;
this
.
新托盘检测逻辑
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
新托盘检测逻辑
ToolStripMenuItem_Click
);
this
.
新托盘检测逻辑
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
新托盘检测逻辑
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator20
//
this
.
toolStripSeparator20
.
Name
=
"toolStripSeparator20"
;
this
.
toolStripSeparator20
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// FrmLineStore
// FrmLineStore
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -1138,6 +1152,7 @@
...
@@ -1138,6 +1152,7 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem2
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem2
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator13
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator13
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator20
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator20
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox1
;
}
}
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
84f375e
...
@@ -152,6 +152,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -152,6 +152,7 @@ namespace OnlineStore.AssemblyLine
{
{
自动保存托盘信息
ToolStripMenuItem
.
Text
=
gouStr
+
"自动保存托盘信息"
;
自动保存托盘信息
ToolStripMenuItem
.
Text
=
gouStr
+
"自动保存托盘信息"
;
}
}
checkBox1
.
Checked
=
CodeManager
.
SaveReelCheckImage
;
cmbTrayType
.
SelectedIndex
=
0
;
cmbTrayType
.
SelectedIndex
=
0
;
cmbTray
.
SelectedIndex
=
0
;
cmbTray
.
SelectedIndex
=
0
;
LogUtil
.
logBox
=
this
.
logBox
;
LogUtil
.
logBox
=
this
.
logBox
;
...
@@ -1468,5 +1469,19 @@ namespace OnlineStore.AssemblyLine
...
@@ -1468,5 +1469,19 @@ namespace OnlineStore.AssemblyLine
FrmExceptionMsg
frm
=
new
FrmExceptionMsg
();
FrmExceptionMsg
frm
=
new
FrmExceptionMsg
();
frm
.
ShowDialog
();
frm
.
ShowDialog
();
}
}
private
void
checkBox1_CheckedChanged_1
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
CodeManager
.
SaveReelCheckImage
.
Equals
(
checkBox1
.
Checked
))
{
return
;
}
CodeManager
.
SaveReelCheckImage
=
(
checkBox1
.
Checked
);
LogUtil
.
info
(
"勾选 保存托盘验证图片功能:CodeManager.SaveReelCheckImage ="
+
CodeManager
.
SaveReelCheckImage
);
}
}
}
}
}
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
84f375e
...
@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary
public
class
CodeManager
public
class
CodeManager
{
{
public
static
bool
SaveImage
=
false
;
public
static
bool
SaveImage
=
false
;
public
static
bool
SaveReelCheckImage
=
true
;
public
static
List
<
string
>
allCodeTypeList
=
new
List
<
string
>();
public
static
List
<
string
>
allCodeTypeList
=
new
List
<
string
>();
public
static
List
<
string
>
balserNameList
=
new
List
<
string
>();
public
static
List
<
string
>
balserNameList
=
new
List
<
string
>();
public
static
List
<
string
>
hikNameList
=
new
List
<
string
>();
public
static
List
<
string
>
hikNameList
=
new
List
<
string
>();
...
@@ -397,7 +398,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -397,7 +398,7 @@ namespace OnlineStore.DeviceLibrary
if
(
needSaveImg
)
if
(
needSaveImg
)
{
{
string
nameStr
=
"nofindCode"
;
string
nameStr
=
"nofindCode"
;
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
Save
NoReel
ImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
}
}
if
(
deviceName
!=
""
||
r
!=
""
)
if
(
deviceName
!=
""
||
r
!=
""
)
...
@@ -463,10 +464,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -463,10 +464,20 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"保存"
+
deviceName
+
" 【"
+
cameraName
+
"】的图片到【"
+
dire
+
iamgeName
+
"】出错"
+
ex
.
ToString
());
LogUtil
.
error
(
"保存"
+
deviceName
+
" 【"
+
cameraName
+
"】的图片到【"
+
dire
+
iamgeName
+
"】出错"
+
ex
.
ToString
());
}
}
}
}
private
static
void
SaveNoReelImageToFile
(
string
deviceName
,
string
cameraName
,
Bitmap
bitmap
)
{
if
(!
SaveReelCheckImage
)
return
;
saveImg
(
deviceName
,
cameraName
,
bitmap
);
}
private
static
void
SaveImageToFile
(
string
deviceName
,
string
cameraName
,
Bitmap
bitmap
)
private
static
void
SaveImageToFile
(
string
deviceName
,
string
cameraName
,
Bitmap
bitmap
)
{
{
if
(!
SaveImage
)
return
;
if
(!
SaveImage
)
return
;
string
date
=
deviceName
.
Trim
().
Replace
(
'_'
,
'-'
)
+
"-"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd-HHmmss"
)
+
DateTime
.
Now
.
Millisecond
;
saveImg
(
deviceName
,
cameraName
,
bitmap
);
}
private
static
void
saveImg
(
string
deviceName
,
string
cameraName
,
Bitmap
bitmap
)
{
string
date
=
deviceName
.
Trim
().
Replace
(
'_'
,
'-'
)
+
"-"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd-HHmmss"
)
+
DateTime
.
Now
.
Millisecond
;
string
dire
=
@"D:\image\" + deviceName.Trim().Replace('_', '-') + @"
\
" + cameraName.Trim().Replace('_', '-').Replace(':', '-') + @"
\
";
string
dire
=
@"D:\image\" + deviceName.Trim().Replace('_', '-') + @"
\
" + cameraName.Trim().Replace('_', '-').Replace(':', '-') + @"
\
";
string
iamgeName
=
date
+
".bmp"
;
string
iamgeName
=
date
+
".bmp"
;
try
try
...
@@ -476,9 +487,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -476,9 +487,12 @@ namespace OnlineStore.DeviceLibrary
{
{
Directory
.
CreateDirectory
(
dire
);
Directory
.
CreateDirectory
(
dire
);
}
}
if
(
ReelCheckUtil
.
canSavePic
(
dire
))
{
bit
.
Save
(
dire
+
iamgeName
,
ImageFormat
.
Bmp
);
bit
.
Save
(
dire
+
iamgeName
,
ImageFormat
.
Bmp
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码失败,保存图片到【"
+
dire
+
iamgeName
+
"】成功"
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码失败,保存图片到【"
+
dire
+
iamgeName
+
"】成功"
);
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"保存"
+
deviceName
+
" 【"
+
cameraName
+
"】的图片到【"
+
dire
+
iamgeName
+
"】出错"
+
ex
.
ToString
());
LogUtil
.
error
(
"保存"
+
deviceName
+
" 【"
+
cameraName
+
"】的图片到【"
+
dire
+
iamgeName
+
"】出错"
+
ex
.
ToString
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论