Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 13676e4d
由
几米阳光
编写于
2019-02-27 16:17:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码修改
1 个父辈
91ea680b
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
94 行增加
和
40 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/App.config
查看文件 @
13676e4
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
<!--
end
one
store
config
-->
<!--
end
one
store
config
-->
<!--摄像机名称列表配置,用
#分割-->
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C6989848
3
)"
/>
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C6989848
4
)"
/>
<!--二维码类型列表配置,用
#分割,一维码=Barcode。-->
<!--二维码类型列表配置,用
#分割,一维码=Barcode。-->
<
add
key
=
"CodeType"
value
=
"
Data Matrix ECC 200#
Barcode"
/>
<
add
key
=
"CodeType"
value
=
"Barcode"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
13676e4
...
@@ -162,6 +162,7 @@
...
@@ -162,6 +162,7 @@
this
.
扫码测试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
扫码测试
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator10
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator10
=
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
.
配置信息
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
.
日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -1774,55 +1775,55 @@
...
@@ -1774,55 +1775,55 @@
// 查看IOToolStripMenuItem
// 查看IOToolStripMenuItem
//
//
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
//
//
// toolStripSeparator5
// toolStripSeparator5
//
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
//
// 料仓运转ONToolStripMenuItem
// 料仓运转ONToolStripMenuItem
//
//
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
//
//
// toolStripSeparator6
// toolStripSeparator6
//
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
//
// 料仓运转OFFToolStripMenuItem
// 料仓运转OFFToolStripMenuItem
//
//
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
//
//
// toolStripSeparator7
// toolStripSeparator7
//
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
//
// 打开舱门ToolStripMenuItem
// 打开舱门ToolStripMenuItem
//
//
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
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
);
//
//
// toolStripSeparator8
// toolStripSeparator8
//
//
this
.
toolStripSeparator8
.
Name
=
"toolStripSeparator8"
;
this
.
toolStripSeparator8
.
Name
=
"toolStripSeparator8"
;
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
//
//
// 关闭仓门ToolStripMenuItem
// 关闭仓门ToolStripMenuItem
//
//
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
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
);
//
//
...
@@ -1833,7 +1834,8 @@
...
@@ -1833,7 +1834,8 @@
this
.
toolStripSeparator9
,
this
.
toolStripSeparator9
,
this
.
扫码测试
ToolStripMenuItem
,
this
.
扫码测试
ToolStripMenuItem
,
this
.
toolStripSeparator10
,
this
.
toolStripSeparator10
,
this
.
学习二维码
ToolStripMenuItem
});
this
.
学习二维码
ToolStripMenuItem
,
this
.
扫码循环测试
ToolStripMenuItem
});
this
.
设备调试
ToolStripMenuItem
.
Name
=
"设备调试ToolStripMenuItem"
;
this
.
设备调试
ToolStripMenuItem
.
Name
=
"设备调试ToolStripMenuItem"
;
this
.
设备调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
设备调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
设备调试
ToolStripMenuItem
.
Text
=
"设备调试"
;
this
.
设备调试
ToolStripMenuItem
.
Text
=
"设备调试"
;
...
@@ -1841,34 +1843,42 @@
...
@@ -1841,34 +1843,42 @@
// 轴卡点动ToolStripMenuItem
// 轴卡点动ToolStripMenuItem
//
//
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
);
//
//
// toolStripSeparator9
// toolStripSeparator9
//
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
1
5
7
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
6
);
//
//
// 扫码测试ToolStripMenuItem
// 扫码测试ToolStripMenuItem
//
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
);
//
//
// toolStripSeparator10
// toolStripSeparator10
//
//
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
5
7
,
6
);
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
6
);
//
//
// 学习二维码ToolStripMenuItem
// 学习二维码ToolStripMenuItem
//
//
this
.
学习二维码
ToolStripMenuItem
.
Name
=
"学习二维码ToolStripMenuItem"
;
this
.
学习二维码
ToolStripMenuItem
.
Name
=
"学习二维码ToolStripMenuItem"
;
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
);
//
//
// 扫码循环测试ToolStripMenuItem
//
this
.
扫码循环测试
ToolStripMenuItem
.
Name
=
"扫码循环测试ToolStripMenuItem"
;
this
.
扫码循环测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
扫码循环测试
ToolStripMenuItem
.
Text
=
"开始循环扫码"
;
this
.
扫码循环测试
ToolStripMenuItem
.
Visible
=
false
;
this
.
扫码循环测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码循环测试
ToolStripMenuItem_Click
);
//
// 配置信息ToolStripMenuItem
// 配置信息ToolStripMenuItem
//
//
this
.
配置信息
ToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
配置信息
ToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
...
@@ -2428,6 +2438,7 @@
...
@@ -2428,6 +2438,7 @@
private
System
.
Windows
.
Forms
.
ComboBox
comboBoxPortName
;
private
System
.
Windows
.
Forms
.
ComboBox
comboBoxPortName
;
private
System
.
Windows
.
Forms
.
Label
lblShuoKeMsg
;
private
System
.
Windows
.
Forms
.
Label
lblShuoKeMsg
;
private
System
.
Windows
.
Forms
.
CheckBox
chbOnlyOut
;
private
System
.
Windows
.
Forms
.
CheckBox
chbOnlyOut
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
扫码循环测试
ToolStripMenuItem
;
}
}
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
13676e4
...
@@ -1365,5 +1365,59 @@ namespace OnlineStore.ACSingleStore
...
@@ -1365,5 +1365,59 @@ namespace OnlineStore.ACSingleStore
{
{
}
}
private
System
.
Timers
.
Timer
scanTimer
=
new
System
.
Timers
.
Timer
();
private
int
count
=
0
;
private
void
扫码循环测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(
扫码循环测试
ToolStripMenuItem
.
Text
.
Equals
(
"开始循环扫码"
))
{
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
count
=
0
;
scanTimer
.
Interval
=
3000
;
scanTimer
.
AutoReset
=
true
;
scanTimer
.
Elapsed
+=
ScanTimer_Elapsed
;
scanTimer
.
Start
();
扫码循环测试
ToolStripMenuItem
.
Text
=
"停止循环扫码"
;
LogUtil
.
info
(
"开始循环扫码"
);
}
else
{
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
scanTimer
.
Stop
();
扫码循环测试
ToolStripMenuItem
.
Text
=
"开始循环扫码"
;
LogUtil
.
info
(
"停止循环扫码"
);
}
}
private
object
ScanLock
=
""
;
private
void
ScanTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
if
(
Monitor
.
TryEnter
(
ScanLock
))
{
try
{
count
++;
string
message
=
""
;
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
foreach
(
string
str
in
codeList
)
{
message
=
message
+
str
+
"##"
;
}
LogUtil
.
info
(
"第【"
+
count
+
"】次扫码测试 :"
+
message
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"扫码测试错误:"
+
ex
.
ToString
());
}
finally
{
Monitor
.
Exit
(
ScanLock
);
}
}
else
{
LogUtil
.
info
(
"扫码测试未得到锁"
);
}
}
}
}
}
}
source/Common/util/LogUtil.cs
查看文件 @
13676e4
...
@@ -100,7 +100,7 @@ namespace OnlineStore.Common
...
@@ -100,7 +100,7 @@ namespace OnlineStore.Common
}
}
public
static
void
error
(
ILog
log
,
string
errorMsg
)
public
static
void
error
(
ILog
log
,
string
errorMsg
)
{
{
if
(!
lasErrorLogList
.
Contains
(
errorMsg
))
//
if (!lasErrorLogList.Contains(errorMsg))
{
{
log
.
Error
(
log
.
Logger
.
Name
+
" - "
+
errorMsg
);
log
.
Error
(
log
.
Logger
.
Name
+
" - "
+
errorMsg
);
if
(
logBox
==
null
)
if
(
logBox
==
null
)
...
@@ -109,11 +109,11 @@ namespace OnlineStore.Common
...
@@ -109,11 +109,11 @@ namespace OnlineStore.Common
}
}
AddToBox
(
errorMsg
,
Color
.
Red
);
AddToBox
(
errorMsg
,
Color
.
Red
);
}
}
lasErrorLogList
.
Add
(
errorMsg
);
//
lasErrorLogList.Add(errorMsg);
if
(
lasErrorLogList
.
Count
>
errCount
)
//
if (lasErrorLogList.Count > errCount)
{
//
{
lasErrorLogList
.
RemoveAt
(
0
);
//
lasErrorLogList.RemoveAt(0);
}
//
}
}
}
private
static
void
AddToBox
(
string
msg
,
Color
color
)
private
static
void
AddToBox
(
string
msg
,
Color
color
)
{
{
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
13676e4
...
@@ -123,28 +123,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -123,28 +123,16 @@ namespace OnlineStore.DeviceLibrary
{
{
foreach
(
string
cameraName
in
cameraNameList
)
foreach
(
string
cameraName
in
cameraNameList
)
{
{
Bitmap
bitmap
=
GetCamerImage
(
cameraName
);
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
))
{
if
(
bitmap
==
null
)
if
(
bitmap
==
null
)
{
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
continue
;
}
}
else
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
//string path = Application.StartupPath + @"\CodeImage\";
System
.
Threading
.
Thread
.
Sleep
(
1
);
//string filePath = path + @"code.png";
//if (File.Exists(filePath))
//{
// File.Delete(filePath);
//}
//if (!Directory.Exists(path))
//{
// Directory.CreateDirectory(path);
//}
//bitmap.Save(filePath);
//LogUtil.info(" 摄像机【" + cameraName + "】图片已保存到:"+filePath);
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
...
@@ -159,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -159,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
{
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
}
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成"
);
//
LogUtil.info(" 摄像机【" + cameraName + "】【"+ codeType + "】扫码完成");
}
}
allCodeList
.
AddRange
(
cc
);
allCodeList
.
AddRange
(
cc
);
}
}
...
@@ -168,6 +156,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -168,6 +156,7 @@ namespace OnlineStore.DeviceLibrary
catch
(
AccessViolationException
e
)
catch
(
AccessViolationException
e
)
{
{
LogUtil
.
error
(
"扫码出现AccessViolationException异常:"
+
e
.
ToString
());
LogUtil
.
error
(
"扫码出现AccessViolationException异常:"
+
e
.
ToString
());
GC
.
Collect
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论