Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9e753723
由
张东亮
编写于
2023-04-25 11:11:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
9c2471ed
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
27 行增加
和
11 行删除
SmartScan/SetControl/UsrCamera.Designer.cs
SmartScan/SetControl/UsrCamera.cs
SmartScan/SetControl/UsrMaterialTemplate.Designer.cs
SmartScan/SetControl/UsrCamera.Designer.cs
查看文件 @
9e75372
此文件的差异被折叠,
点击展开。
SmartScan/SetControl/UsrCamera.cs
查看文件 @
9e75372
...
...
@@ -2,6 +2,8 @@
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Windows.Forms
;
using
BLL
;
using
DocumentFormat.OpenXml.Spreadsheet
;
using
Model
;
namespace
SmartScan
...
...
@@ -14,7 +16,7 @@ namespace SmartScan
{
InitializeComponent
();
Asa
.
FaceControl
.
Language
.
SetLanguage
(
this
);
BtnCameraImage
.
Enabled
=
Common
.
cameraVision
==
null
?
false
:
Common
.
cameraVision
.
Count
>
0
;
BtnCameraImage
.
Enabled
=
Common
.
cameraVision
==
null
?
false
:
Common
.
cameraVision
.
Count
>
0
;
}
public
Asa
.
FaceControl
.
FacePanel
GetPanel
()
...
...
@@ -65,13 +67,6 @@ namespace SmartScan
List
<
CameraVisionLib
.
Model
.
BarcodeInfo
>
info
=
Common
.
cameraVision
.
GetBarCode
(
bmp
);
LstCode
.
Items
.
Clear
();
PicShow
.
CodeCenterClear
();
if
(
info
.
Count
==
0
)
{
string
text
=
Asa
.
FaceControl
.
Language
.
Dialog
(
Model
.
LanguageDialogKey
.
CODE_COUNT
);
new
Asa
.
FaceControl
.
FaceMessageBox
(
""
,
text
,
MessageBoxButtons
.
OK
).
ShowDialog
();
return
;
}
string
[]
arr
=
new
string
[
info
.
Count
];
PointF
[]
lst
=
new
PointF
[
info
.
Count
];
for
(
int
i
=
0
;
i
<
info
.
Count
;
i
++)
...
...
@@ -79,8 +74,29 @@ namespace SmartScan
arr
[
i
]
=
string
.
Format
(
"({0}) "
,
i
+
1
)
+
info
[
i
].
Text
.
Replace
(
"\r\n"
,
""
);
lst
[
i
]
=
info
[
i
].
Center
;
}
List
<
string
>
ocrs
=
new
List
<
string
>();
int
startidx
=
info
.
Count
+
1
;
if
(
Config
.
Func_EnabledOCR
)
{
//保存需要识别ocr的区域
bmp
?.
Save
(
@"ocrt.jpg"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
string
[]
regOcrCodes
=
PaddleOCRHelper
.
StartTest
(
"..\\ocrt.jpg"
).
Split
(
';'
);
foreach
(
var
ocr
in
regOcrCodes
)
{
if
(
string
.
IsNullOrEmpty
(
ocr
))
continue
;
ocrs
.
Add
(
$
"({startidx}) {ocr} <OCR>"
);
startidx
++;
}
}
if
(
info
.
Count
==
0
)
{
string
text
=
Asa
.
FaceControl
.
Language
.
Dialog
(
Model
.
LanguageDialogKey
.
CODE_COUNT
);
new
Asa
.
FaceControl
.
FaceMessageBox
(
""
,
text
,
MessageBoxButtons
.
OK
).
ShowDialog
();
return
;
}
LstCode
.
Items
.
AddRange
(
arr
);
if
(
ocrs
.
Count
>
0
)
LstCode
.
Items
.
AddRange
(
ocrs
.
ToArray
());
PicShow
.
AddCodeCenter
(
lst
);
}
...
...
SmartScan/SetControl/UsrMaterialTemplate.Designer.cs
查看文件 @
9e75372
...
...
@@ -89,7 +89,7 @@ namespace SmartScan
this
.
BtnExtractCode
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
BtnExtractCode
.
Size
=
new
System
.
Drawing
.
Size
(
227
,
56
);
this
.
BtnExtractCode
.
TabIndex
=
17
;
this
.
BtnExtractCode
.
Text
=
"
条码
提取"
;
this
.
BtnExtractCode
.
Text
=
"提取"
;
this
.
BtnExtractCode
.
Click
+=
new
System
.
EventHandler
(
this
.
BtnExtractCode_Click
);
//
// BtnPrimaryCode
...
...
@@ -159,7 +159,7 @@ namespace SmartScan
this
.
BtnScanCode
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
BtnScanCode
.
Size
=
new
System
.
Drawing
.
Size
(
461
,
56
);
this
.
BtnScanCode
.
TabIndex
=
12
;
this
.
BtnScanCode
.
Text
=
"
条码
识别"
;
this
.
BtnScanCode
.
Text
=
"识别"
;
this
.
BtnScanCode
.
Click
+=
new
System
.
EventHandler
(
this
.
BtnScanCode_Click
);
//
// BtnLocalImage
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论