Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ed66d54e
由
张东亮
编写于
2023-04-28 09:40:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码小程序
1 个父辈
da61a318
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
15 行增加
和
13 行删除
dll/CodeLibrary--.dll
dll/CodeLibrary.dll
dll/MvCameraControl.Net.dll
source/ACPackingStore/Program.cs
source/DeviceLibrary/device/halcon/CodeManager.cs
dll/CodeLibrary--.dll
0 → 100644
查看文件 @
ed66d54
此文件类型无法预览
dll/CodeLibrary.dll
查看文件 @
ed66d54
此文件类型无法预览
dll/MvCameraControl.Net.dll
查看文件 @
ed66d54
此文件类型无法预览
source/ACPackingStore/Program.cs
查看文件 @
ed66d54
...
@@ -103,17 +103,19 @@ namespace OnlineStore.ACPackingStore
...
@@ -103,17 +103,19 @@ namespace OnlineStore.ACPackingStore
try
try
{
{
var
pss
=
Process
.
GetProcessesByName
(
"ScanCodeServer"
);
var
pss
=
Process
.
GetProcessesByName
(
"ScanCodeServer"
);
if
(
pss
.
Length
>
0
)
if
(
pss
.
Length
>
0
)
{
}
return
;
else
var
f
=
"ScanCodeServer\\ScanCodeServer.exe"
;
if
(
File
.
Exists
(
f
))
{
{
Process
p
=
new
Process
();
var
f
=
"ScanCodeServer\\ScanCodeServer.exe"
;
p
.
StartInfo
=
new
ProcessStartInfo
(
f
);
if
(
File
.
Exists
(
f
))
p
.
Start
();
{
Process
p
=
new
Process
();
p
.
StartInfo
=
new
ProcessStartInfo
(
f
);
p
.
Start
();
}
}
}
}
catch
(
Exception
ex
)
{
}
}
catch
(
Exception
ex
)
{
}
Application
.
Run
(
new
FrmStore
());
Application
.
Run
(
new
FrmStore
());
...
...
source/DeviceLibrary/device/halcon/CodeManager.cs
查看文件 @
ed66d54
...
@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"加载HIK相机出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"加载HIK相机出错:"
+
ex
.
ToString
());
}
}
}
}
string
[]
names
=
Camera
.
_cam
.
Name
;
string
[]
names
=
Camera
.
_cam
?
.
Name
;
if
(
names
!=
null
)
if
(
names
!=
null
)
...
@@ -130,8 +130,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -130,8 +130,8 @@ namespace OnlineStore.DeviceLibrary
bool
findRightCode
=
false
;
bool
findRightCode
=
false
;
try
try
{
{
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
);
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
Bitmap
bmp
);
if
(
ho_Image
==
null
)
if
(
bmp
==
null
)
{
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
CloseCamera
(
cameraName
);
...
@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
codeCount
=
codeCount
,
codeCount
=
codeCount
,
timeout
=
codeTimeout
timeout
=
codeTimeout
};
};
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
bmp
,
remoteDecodeParam
);
if
(
cc
!=
null
)
if
(
cc
!=
null
)
{
{
foreach
(
CodeInfo
c
in
cc
)
foreach
(
CodeInfo
c
in
cc
)
...
@@ -190,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
//}
//}
if
(!
findRightCode
)
if
(!
findRightCode
)
{
{
SaveImageToFile
(
deviceName
,
cameraName
,
ho_Image
);
SaveImageToFile
(
deviceName
,
cameraName
,
bmp
);
}
}
if
(
deviceName
!=
""
||
r
!=
""
)
if
(
deviceName
!=
""
||
r
!=
""
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论