Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4bdb98f9
由
刘韬
编写于
2023-02-17 13:21:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0a6a361a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
34 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmComponentList.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.Designer.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/manager/ParamManager.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmComponentList.cs
查看文件 @
4bdb98f
...
...
@@ -99,7 +99,7 @@ namespace OnlineStore.AutoCountClient
{
var
suanfa
=
SignType
.
AUTO
;
Enum
.
TryParse
<
SignType
>(
obj
.
Sufan
.
ToString
(),
out
suanfa
);
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
RobotManager
.
robot
.
XrayBean
.
ThresholdValue
,
3
,
suanfa
));
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
0
,
0
,
suanfa
));
ParamManager
.
SaveMapToFile
();
}
}
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.Designer.cs
查看文件 @
4bdb98f
...
...
@@ -44,6 +44,7 @@
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label_coutresult
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
buttonT
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
buttonE
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
buttonD
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
buttonC
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -55,7 +56,6 @@
this
.
lblFeng
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblDes
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblProName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
buttonT
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numWSize
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numTh
)).
BeginInit
();
...
...
@@ -164,11 +164,6 @@
this
.
numWSize
.
Name
=
"numWSize"
;
this
.
numWSize
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
26
);
this
.
numWSize
.
TabIndex
=
297
;
this
.
numWSize
.
Value
=
new
decimal
(
new
int
[]
{
3
,
0
,
0
,
0
});
this
.
numWSize
.
Visible
=
false
;
//
// label3
...
...
@@ -184,26 +179,19 @@
// numTh
//
this
.
numTh
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
numTh
.
Location
=
new
System
.
Drawing
.
Point
(
271
,
19
);
this
.
numTh
.
Location
=
new
System
.
Drawing
.
Point
(
1136
,
595
);
this
.
numTh
.
Name
=
"numTh"
;
this
.
numTh
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
26
);
this
.
numTh
.
TabIndex
=
295
;
this
.
numTh
.
Value
=
new
decimal
(
new
int
[]
{
30
,
0
,
0
,
0
});
this
.
numTh
.
Visible
=
false
;
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
245
,
22
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
1090
,
597
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
20
);
this
.
label1
.
TabIndex
=
294
;
this
.
label1
.
Text
=
"阈值:"
;
this
.
label1
.
Visible
=
false
;
//
// btnEnd
//
...
...
@@ -235,10 +223,8 @@
this
.
groupBox4
.
Controls
.
Add
(
this
.
buttonB
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
buttonAuto
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
buttonA
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
numTh
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
numWSize
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
990
,
162
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
308
,
426
);
...
...
@@ -255,6 +241,19 @@
this
.
label_coutresult
.
TabIndex
=
304
;
this
.
label_coutresult
.
Text
=
"点料结果:"
;
//
// buttonT
//
this
.
buttonT
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
buttonT
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
buttonT
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
buttonT
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
315
);
this
.
buttonT
.
Name
=
"buttonT"
;
this
.
buttonT
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
39
);
this
.
buttonT
.
TabIndex
=
303
;
this
.
buttonT
.
Text
=
"模版"
;
this
.
buttonT
.
UseVisualStyleBackColor
=
false
;
this
.
buttonT
.
Click
+=
new
System
.
EventHandler
(
this
.
buttonT_Click
);
//
// buttonE
//
this
.
buttonE
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
...
...
@@ -388,19 +387,6 @@
this
.
lblProName
.
Text
=
"产品:"
;
this
.
lblProName
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// buttonT
//
this
.
buttonT
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
buttonT
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
buttonT
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
buttonT
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
315
);
this
.
buttonT
.
Name
=
"buttonT"
;
this
.
buttonT
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
39
);
this
.
buttonT
.
TabIndex
=
303
;
this
.
buttonT
.
Text
=
"模版"
;
this
.
buttonT
.
UseVisualStyleBackColor
=
false
;
this
.
buttonT
.
Click
+=
new
System
.
EventHandler
(
this
.
buttonT_Click
);
//
// FrmLearning
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
8F
,
20F
);
...
...
@@ -412,6 +398,8 @@
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
btnEnd
);
this
.
Controls
.
Add
(
this
.
btnNext
);
this
.
Controls
.
Add
(
this
.
numTh
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
3
,
2
,
3
,
2
);
this
.
Name
=
"FrmLearning"
;
...
...
@@ -428,6 +416,7 @@
this
.
groupBox4
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
4bdb98f
...
...
@@ -831,15 +831,19 @@ namespace OnlineStore.DeviceLibrary
int
threshold
=
param
.
Threshold
;
int
windowsize
=
param
.
WindowSize
;
XrayImage
.
setProcessLevel
(
4
);
if
(
threshold
>
0
)
XrayImage
.
setProcessLevel
(
threshold
);
if
(
param
.
Sign
==
CountParam
.
SignType
.
AUTO
)
{
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCount 【"
+
fileP
+
"】【"
+
100
+
"】"
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCount 【"
+
fileP
+
"】【"
+
100
+
"】"
+
threshold
);
result
=
XrayImage
.
GetLocalCount
(
fileP
,
100
,
out
countStr
,
out
dst
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCount 【"
+
fileP
+
"】【"
+
100
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
}
else
if
(
param
.
Sign
==
CountParam
.
SignType
.
IP_Template_PARTS
)
{
XrayImage
.
setProcessLevel
(
2
);
if
(
threshold
>
0
)
XrayImage
.
setProcessLevel
(
threshold
);
XrayImage
.
ReloadTpl
();
var
tpl
=
Path
.
Combine
(
"CountTemplate"
,
param
.
PN
+
".tpl"
);
...
...
@@ -848,7 +852,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"GetLocalCountTemplate "
+
tpl
+
" 【"
+
fileP
+
"】【"
+
100
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
}
else
{
LogUtil
.
info
(
"GetLocalCountIrregular "
+
type
+
" 【"
+
fileP
+
"】【"
+
100
+
"】"
);
LogUtil
.
info
(
"GetLocalCountIrregular "
+
type
+
" 【"
+
fileP
+
"】【"
+
100
+
"】"
+
threshold
);
result
=
XrayImage
.
GetLocalCountIrregular
(
fileP
,
100
,
type
.
ToString
(),
out
countStr
,
out
dst
);
LogUtil
.
info
(
"GetLocalCountIrregular "
+
type
+
" 【"
+
fileP
+
"】【"
+
100
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/manager/ParamManager.cs
查看文件 @
4bdb98f
...
...
@@ -302,7 +302,7 @@ namespace OnlineStore.DeviceLibrary
Enum
.
TryParse
<
SignType
>(
array
[
1
].
Trim
(),
out
sign
);
int
value
=
0
;
// Convert.ToInt32(array[2].Trim());
int
th
=
0
;
//
Convert.ToInt32(array[3].Trim());
int
th
=
Convert
.
ToInt32
(
array
[
3
].
Trim
());
int
size
=
0
;
//Convert.ToInt32(array[4].Trim());
return
new
CountParam
(
pn
,
th
,
size
,
sign
,
value
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论