Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
AccAOI
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0fd83219
由
LN
编写于
2019-08-08 14:46:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加名称编辑功能
1 个父辈
044dc943
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
485 行增加
和
47 行删除
AOI/AoiProject.cs
AOI/ResultBean.cs
AOI/blob/AoiBlobMethod.cs
AOI/mark/AoiMarkMethod.cs
AOI/match/AoiTemplateMethod.cs
AOI/rgb/AoiMethodRgb.cs
AccAOI/AccAOI.csproj
AccAOI/FrmAoiSetting.Designer.cs
AccAOI/FrmAoiSetting.cs
AccAOI/FrmMethodName.Designer.cs
AccAOI/FrmMethodName.cs
AccAOI/FrmMethodName.resx
AccAOI/control/ABaseControl.Designer.cs
AccAOI/control/ABaseControl.cs
AccAOI/control/AioMarkControl.cs
AccAOI/control/AioTempMatchControl.cs
dll/Asa.Theme.dll
AOI/AoiProject.cs
查看文件 @
0fd8321
...
...
@@ -67,14 +67,17 @@ namespace AOI
}
using
(
Graphics
g
=
Graphics
.
FromImage
(
image
))
{
foreach
(
ResultBean
resultBean
in
resultBeans
)
foreach
(
ResultBean
resultBean
in
resultBeans
)
{
Pen
pen
=
new
Pen
(
Color
.
Lime
,
5
);
Pen
pen
=
new
Pen
(
Color
.
Lime
,
5
);
if
(!
resultBean
.
result
)
{
pen
=
new
Pen
(
Color
.
Red
,
5
);
pen
=
new
Pen
(
Color
.
Red
,
5
);
}
if
(
resultBean
.
roiPath
!=
null
)
{
g
.
DrawPath
(
pen
,
resultBean
.
roiPath
);
}
g
.
DrawPath
(
pen
,
resultBean
.
roiPath
);
}
}
resultImg
=
image
;
...
...
AOI/ResultBean.cs
查看文件 @
0fd8321
...
...
@@ -10,6 +10,14 @@ namespace AOI
{
public
class
ResultBean
{
public
ResultBean
(
string
name
)
{
this
.
MethodName
=
name
;
}
/// <summary>
/// 名称
/// </summary>
public
string
MethodName
;
/// <summary>
/// AOI标识
/// </summary>
...
...
AOI/blob/AoiBlobMethod.cs
查看文件 @
0fd8321
...
...
@@ -43,7 +43,7 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
ResultBean
resultBean
=
new
ResultBean
();
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
...
AOI/mark/AoiMarkMethod.cs
查看文件 @
0fd8321
...
...
@@ -69,7 +69,7 @@ namespace AOI
/// <returns></returns>
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
ResultBean
resultBean
=
new
ResultBean
();
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
resultBean
.
standardRoiImage
=
standardImage
;
Image
resultImage
=
FixImage
(
standardImage
,
imageToCheck
);
if
(
resultImage
!=
null
)
...
...
AOI/match/AoiTemplateMethod.cs
查看文件 @
0fd8321
...
...
@@ -23,7 +23,7 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
ResultBean
resultBean
=
new
ResultBean
();
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
...
AOI/rgb/AoiMethodRgb.cs
查看文件 @
0fd8321
...
...
@@ -40,7 +40,7 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
ResultBean
resultBean
=
new
ResultBean
();
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
...
AccAOI/AccAOI.csproj
查看文件 @
0fd8321
...
...
@@ -110,6 +110,12 @@
<DependentUpon>FrmAoiSetting.cs</DependentUpon>
</Compile>
<Compile Include="camera\HIKCamera.cs" />
<Compile Include="FrmMethodName.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMethodName.Designer.cs">
<DependentUpon>FrmMethodName.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="control\AioTempMatchControl.resx">
...
...
@@ -130,6 +136,9 @@
<EmbeddedResource Include="FrmAoiSetting.resx">
<DependentUpon>FrmAoiSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMethodName.resx">
<DependentUpon>FrmMethodName.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
...
...
AccAOI/FrmAoiSetting.Designer.cs
查看文件 @
0fd8321
...
...
@@ -42,14 +42,15 @@ namespace AccAOI
this
.
btnGetCameraImg
=
new
Asa
.
Theme
.
FlatButton
();
this
.
comType
=
new
Asa
.
Theme
.
FlatCombo
();
this
.
panAoi
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
imageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
btnExcute
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnDel
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnImageChange
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatButton1
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatButton2
=
new
Asa
.
Theme
.
FlatButton
();
this
.
testImageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
lblCurrImage
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
testImageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
imageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
btnUpdateName
=
new
Asa
.
Theme
.
FlatButton
();
this
.
SuspendLayout
();
//
// aoiList
...
...
@@ -57,16 +58,18 @@ namespace AccAOI
this
.
aoiList
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
aoiList
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
aoiList
.
Index
=
-
1
;
this
.
aoiList
.
Inside
=
false
;
this
.
aoiList
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
153
);
this
.
aoiList
.
Name
=
"aoiList"
;
this
.
aoiList
.
SelectedIndex
=
-
1
;
this
.
aoiList
.
Size
=
new
System
.
Drawing
.
Size
(
287
,
477
);
this
.
aoiList
.
TabIndex
=
2
;
this
.
aoiList
.
IndexChanged
+=
new
System
.
EventHandler
(
this
.
aoiList_IndexChanged
);
this
.
aoiList
.
SelectedIndexChanged
+=
new
Asa
.
Theme
.
Event
.
SelectedIndexChanged
(
this
.
aoiList_IndexChanged
);
//
// btnOpenPro
//
this
.
btnOpenPro
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnOpenPro
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnOpenPro
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnOpenPro
.
Inside
=
false
;
this
.
btnOpenPro
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
40
);
...
...
@@ -79,6 +82,8 @@ namespace AccAOI
//
// btnSavePro
//
this
.
btnSavePro
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSavePro
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnSavePro
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnSavePro
.
Inside
=
false
;
this
.
btnSavePro
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
40
);
...
...
@@ -91,6 +96,8 @@ namespace AccAOI
//
// btnNewAoi
//
this
.
btnNewAoi
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnNewAoi
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnNewAoi
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnNewAoi
.
Inside
=
false
;
this
.
btnNewAoi
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
76
);
...
...
@@ -103,6 +110,8 @@ namespace AccAOI
//
// btnOpenImage
//
this
.
btnOpenImage
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnOpenImage
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnOpenImage
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnOpenImage
.
Inside
=
false
;
this
.
btnOpenImage
.
Location
=
new
System
.
Drawing
.
Point
(
1155
,
40
);
...
...
@@ -115,6 +124,8 @@ namespace AccAOI
//
// flatLabel1
//
this
.
flatLabel1
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
flatLabel1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
flatLabel1
.
Inside
=
false
;
this
.
flatLabel1
.
Location
=
new
System
.
Drawing
.
Point
(
649
,
40
);
this
.
flatLabel1
.
Name
=
"flatLabel1"
;
...
...
@@ -129,11 +140,14 @@ namespace AccAOI
this
.
cmbCameraList
.
Inside
=
false
;
this
.
cmbCameraList
.
Location
=
new
System
.
Drawing
.
Point
(
730
,
40
);
this
.
cmbCameraList
.
Name
=
"cmbCameraList"
;
this
.
cmbCameraList
.
SelectedIndex
=
0
;
this
.
cmbCameraList
.
Size
=
new
System
.
Drawing
.
Size
(
281
,
30
);
this
.
cmbCameraList
.
TabIndex
=
12
;
//
// btnGetCameraImg
//
this
.
btnGetCameraImg
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnGetCameraImg
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnGetCameraImg
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnGetCameraImg
.
Inside
=
false
;
this
.
btnGetCameraImg
.
Location
=
new
System
.
Drawing
.
Point
(
1031
,
40
);
...
...
@@ -151,6 +165,7 @@ namespace AccAOI
this
.
comType
.
Inside
=
false
;
this
.
comType
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
76
);
this
.
comType
.
Name
=
"comType"
;
this
.
comType
.
SelectedIndex
=
0
;
this
.
comType
.
Size
=
new
System
.
Drawing
.
Size
(
109
,
30
);
this
.
comType
.
TabIndex
=
14
;
//
...
...
@@ -164,25 +179,13 @@ namespace AccAOI
this
.
panAoi
.
Size
=
new
System
.
Drawing
.
Size
(
317
,
592
);
this
.
panAoi
.
TabIndex
=
15
;
//
// imageBox1
//
this
.
imageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
imageBox1
.
DragHandleSize
=
9
;
this
.
imageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
625
,
115
);
this
.
imageBox1
.
Name
=
"imageBox1"
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
imageBox1
.
SelectionMode
=
Acc
.
ImageBox
.
ImageBoxSelectionMode
.
Rectangle
;
this
.
imageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
728
,
517
);
this
.
imageBox1
.
TabIndex
=
4
;
this
.
imageBox1
.
SelectionRegionChanged
+=
new
System
.
EventHandler
(
this
.
imageBox1_SelectionRegionChanged
);
//
// btnExcute
//
this
.
btnExcute
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnExcute
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnExcute
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnExcute
.
Inside
=
false
;
this
.
btnExcute
.
Location
=
new
System
.
Drawing
.
Point
(
1
53
,
112
);
this
.
btnExcute
.
Location
=
new
System
.
Drawing
.
Point
(
1
281
,
76
);
this
.
btnExcute
.
Name
=
"btnExcute"
;
this
.
btnExcute
.
Size
=
new
System
.
Drawing
.
Size
(
109
,
30
);
this
.
btnExcute
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
...
...
@@ -192,6 +195,8 @@ namespace AccAOI
//
// btnDel
//
this
.
btnDel
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnDel
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnDel
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnDel
.
Inside
=
false
;
this
.
btnDel
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
112
);
...
...
@@ -204,6 +209,8 @@ namespace AccAOI
//
// btnImageChange
//
this
.
btnImageChange
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnImageChange
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnImageChange
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnImageChange
.
Inside
=
false
;
this
.
btnImageChange
.
Location
=
new
System
.
Drawing
.
Point
(
902
,
76
);
...
...
@@ -216,6 +223,8 @@ namespace AccAOI
//
// flatButton1
//
this
.
flatButton1
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
flatButton1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
flatButton1
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
flatButton1
.
Inside
=
false
;
this
.
flatButton1
.
Location
=
new
System
.
Drawing
.
Point
(
1031
,
76
);
...
...
@@ -228,6 +237,8 @@ namespace AccAOI
//
// flatButton2
//
this
.
flatButton2
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
flatButton2
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
flatButton2
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
flatButton2
.
Inside
=
false
;
this
.
flatButton2
.
Location
=
new
System
.
Drawing
.
Point
(
1155
,
76
);
...
...
@@ -238,6 +249,17 @@ namespace AccAOI
this
.
flatButton2
.
Text
=
"选择测试图片"
;
this
.
flatButton2
.
Click
+=
new
System
.
EventHandler
(
this
.
flatButton2_Click
);
//
// lblCurrImage
//
this
.
lblCurrImage
.
AutoSize
=
true
;
this
.
lblCurrImage
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCurrImage
.
ForeColor
=
System
.
Drawing
.
Color
.
LawnGreen
;
this
.
lblCurrImage
.
Location
=
new
System
.
Drawing
.
Point
(
655
,
84
);
this
.
lblCurrImage
.
Name
=
"lblCurrImage"
;
this
.
lblCurrImage
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
22
);
this
.
lblCurrImage
.
TabIndex
=
22
;
this
.
lblCurrImage
.
Text
=
"基准图:"
;
//
// testImageBox1
//
this
.
testImageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
...
...
@@ -248,25 +270,43 @@ namespace AccAOI
this
.
testImageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
668
,
101
);
this
.
testImageBox1
.
Name
=
"testImageBox1"
;
this
.
testImageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
testImageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
652
,
421
);
this
.
testImageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
705
,
421
);
this
.
testImageBox1
.
TabIndex
=
21
;
this
.
testImageBox1
.
Visible
=
false
;
//
//
lblCurrImage
//
imageBox1
//
this
.
lblCurrImage
.
AutoSize
=
true
;
this
.
lblCurrImage
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCurrImage
.
ForeColor
=
System
.
Drawing
.
Color
.
LawnGreen
;
this
.
lblCurrImage
.
Location
=
new
System
.
Drawing
.
Point
(
655
,
84
);
this
.
lblCurrImage
.
Name
=
"lblCurrImage"
;
this
.
lblCurrImage
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
22
);
this
.
lblCurrImage
.
TabIndex
=
22
;
this
.
lblCurrImage
.
Text
=
"基准图:"
;
this
.
imageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
imageBox1
.
DragHandleSize
=
9
;
this
.
imageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
625
,
115
);
this
.
imageBox1
.
Name
=
"imageBox1"
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
imageBox1
.
SelectionMode
=
Acc
.
ImageBox
.
ImageBoxSelectionMode
.
Rectangle
;
this
.
imageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
781
,
517
);
this
.
imageBox1
.
TabIndex
=
4
;
this
.
imageBox1
.
SelectionRegionChanged
+=
new
System
.
EventHandler
(
this
.
imageBox1_SelectionRegionChanged
);
//
// btnUpdateName
//
this
.
btnUpdateName
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnUpdateName
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnUpdateName
.
Inside
=
false
;
this
.
btnUpdateName
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
112
);
this
.
btnUpdateName
.
Name
=
"btnUpdateName"
;
this
.
btnUpdateName
.
Size
=
new
System
.
Drawing
.
Size
(
109
,
30
);
this
.
btnUpdateName
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
TabIndex
=
23
;
this
.
btnUpdateName
.
Text
=
"修改"
;
this
.
btnUpdateName
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpdateName_Click
);
//
// FrmAoiSetting
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1362
,
641
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1415
,
641
);
this
.
Controls
.
Add
(
this
.
btnUpdateName
);
this
.
Controls
.
Add
(
this
.
lblCurrImage
);
this
.
Controls
.
Add
(
this
.
testImageBox1
);
this
.
Controls
.
Add
(
this
.
flatButton1
);
...
...
@@ -316,5 +356,6 @@ namespace AccAOI
private
Asa
.
Theme
.
FlatButton
flatButton2
;
private
AccImageBox
testImageBox1
;
private
System
.
Windows
.
Forms
.
Label
lblCurrImage
;
private
Asa
.
Theme
.
FlatButton
btnUpdateName
;
}
}
\ No newline at end of file
AccAOI/FrmAoiSetting.cs
查看文件 @
0fd8321
...
...
@@ -293,14 +293,27 @@ namespace AccAOI
return
;
}
string
text
=
comType
.
Text
;
CloseCurrAoi
();
AoiMethod
methodInfo
=
ControlUtil
.
GetMethod
(
text
);
methodInfo
.
MethodName
=
Project
.
methodMap
.
Values
.
Count
.
ToString
().
PadLeft
(
2
,
'0'
)
+
"_"
+
text
;
string
defaultName
=
Project
.
methodMap
.
Values
.
Count
.
ToString
().
PadLeft
(
2
,
'0'
)
+
"_"
+
text
;
FrmMethodName
frmName
=
new
FrmMethodName
(
defaultName
,
new
List
<
string
>(
Project
.
methodMap
.
Keys
));
frmName
.
Text
=
"请输入新增【"
+
text
+
"】方法的名称"
;
DialogResult
result
=
frmName
.
ShowDialog
();
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
methodInfo
.
MethodName
=
frmName
.
MethodName
;
}
else
{
return
;
}
CloseCurrAoi
();
// methodInfo.MethodName = Project.methodMap.Values.Count.ToString().PadLeft(2, '0') + "_" + text;
Project
.
methodMap
.
Add
(
methodInfo
.
MethodName
,
methodInfo
);
ShowAoi
(
methodInfo
);
aoiList
.
ItemAdd
(
aoiControl
.
TitleName
);
aoiList
.
SelectedIndex
=
Project
.
methodMap
.
Count
-
1
;
if
(
imageBox1
.
Visible
.
Equals
(
false
))
{
btnImageChange_Click
(
null
,
null
);
...
...
@@ -386,7 +399,7 @@ namespace AccAOI
aoiList
.
ItemAdd
(
key
);
if
(
index
.
Equals
(
0
))
{
aoiList
.
Index
=
index
;
aoiList
.
Selected
Index
=
index
;
ShowAoi
(
Project
.
methodMap
[
key
]);
}
index
++;
...
...
@@ -399,9 +412,9 @@ namespace AccAOI
}
}
private
void
aoiList_IndexChanged
(
object
sender
,
EventArgs
e
)
private
void
aoiList_IndexChanged
(
object
sender
)
{
int
index
=
aoiList
.
Index
;
int
index
=
aoiList
.
Selected
Index
;
if
(
index
>=
0
&&
(
Project
!=
null
))
{
List
<
AoiMethod
>
methods
=
new
List
<
AoiMethod
>(
Project
.
methodMap
.
Values
);
...
...
@@ -599,6 +612,55 @@ namespace AccAOI
{
btnImageChange_Click
(
null
,
null
);
}
}
}
private
void
btnUpdateName_Click
(
object
sender
,
EventArgs
e
)
{
int
index
=
aoiList
.
SelectedIndex
;
if
(
index
>=
0
&&
(
Project
!=
null
)&&(
aoiControl
!=
null
))
{
List
<
AoiMethod
>
methods
=
new
List
<
AoiMethod
>(
Project
.
methodMap
.
Values
);
if
(
index
<
methods
.
Count
)
{
// AoiMethod method = methods[index];
string
oldName
=
methods
[
index
].
MethodName
;
List
<
string
>
allName
=
new
List
<
string
>(
Project
.
methodMap
.
Keys
);
allName
.
Remove
(
oldName
);
FrmMethodName
frmName
=
new
FrmMethodName
(
oldName
,
allName
);
frmName
.
Text
=
"请输入修改后的名称"
;
DialogResult
result
=
frmName
.
ShowDialog
();
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
string
newName
=
frmName
.
MethodName
;
if
(
newName
.
Equals
(
oldName
))
{
return
;
}
methods
[
index
].
MethodName
=
newName
;
//Project.methodMap.Remove(oldName);
//Project.methodMap.Add(newName, method);
Project
.
methodMap
.
Clear
();
aoiList
.
ItemClear
();
foreach
(
AoiMethod
m
in
methods
)
{
Project
.
methodMap
.
Add
(
m
.
MethodName
,
m
);
aoiList
.
ItemAdd
(
m
.
MethodName
);
}
aoiControl
.
TitleName
=
newName
;
}
else
{
return
;
}
}
if
(
imageBox1
.
Visible
.
Equals
(
false
))
{
btnImageChange_Click
(
null
,
null
);
}
}
}
}
}
AccAOI/FrmMethodName.Designer.cs
0 → 100644
查看文件 @
0fd8321
namespace
AccAOI
{
partial
class
FrmMethodName
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
txtName
=
new
Asa
.
Theme
.
FlatText
();
this
.
btnCancel
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnOk
=
new
Asa
.
Theme
.
FlatButton
();
this
.
SuspendLayout
();
//
// txtName
//
this
.
txtName
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
txtName
.
Inside
=
false
;
this
.
txtName
.
Location
=
new
System
.
Drawing
.
Point
(
63
,
60
);
this
.
txtName
.
Name
=
"txtName"
;
this
.
txtName
.
Size
=
new
System
.
Drawing
.
Size
(
174
,
30
);
this
.
txtName
.
TabIndex
=
0
;
//
// btnCancel
//
this
.
btnCancel
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnCancel
.
Inside
=
false
;
this
.
btnCancel
.
Location
=
new
System
.
Drawing
.
Point
(
44
,
116
);
this
.
btnCancel
.
Name
=
"btnCancel"
;
this
.
btnCancel
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
30
);
this
.
btnCancel
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnCancel
.
TabIndex
=
1
;
this
.
btnCancel
.
Text
=
"取消"
;
this
.
btnCancel
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCancel_Click
);
//
// btnOk
//
this
.
btnOk
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnOk
.
Inside
=
false
;
this
.
btnOk
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
116
);
this
.
btnOk
.
Name
=
"btnOk"
;
this
.
btnOk
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
30
);
this
.
btnOk
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnOk
.
TabIndex
=
2
;
this
.
btnOk
.
Text
=
"确定"
;
this
.
btnOk
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOk_Click
);
//
// FrmMethodName
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
292
,
172
);
this
.
Controls
.
Add
(
this
.
btnOk
);
this
.
Controls
.
Add
(
this
.
btnCancel
);
this
.
Controls
.
Add
(
this
.
txtName
);
this
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
Minimized
=
false
;
this
.
Name
=
"FrmMethodName"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
Manual
;
this
.
Text
=
"请输入方法名称"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMethodName_Load
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
Asa
.
Theme
.
FlatText
txtName
;
private
Asa
.
Theme
.
FlatButton
btnCancel
;
private
Asa
.
Theme
.
FlatButton
btnOk
;
}
}
\ No newline at end of file
AccAOI/FrmMethodName.cs
0 → 100644
查看文件 @
0fd8321
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
AccAOI
{
public
partial
class
FrmMethodName
:
Asa
.
Theme
.
FlatForm
{
public
string
MethodName
=
""
;
public
List
<
string
>
AllNameList
=
new
List
<
string
>();
public
FrmMethodName
(
string
name
,
List
<
string
>
names
)
{
InitializeComponent
();
MethodName
=
name
;
AllNameList
=
names
;
}
private
void
FrmMethodName_Load
(
object
sender
,
EventArgs
e
)
{
txtName
.
Text
=
MethodName
;
}
private
void
btnCancel_Click
(
object
sender
,
EventArgs
e
)
{
this
.
DialogResult
=
DialogResult
.
Cancel
;
this
.
Close
();
}
private
void
btnOk_Click
(
object
sender
,
EventArgs
e
)
{
string
newName
=
txtName
.
Text
;
if
(
AllNameList
.
Contains
(
newName
))
{
MessageBox
.
Show
(
"名称【"
+
newName
+
"】已存在,请重新输入"
);
txtName
.
Focus
();
return
;
}
MethodName
=
newName
;
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
Close
();
}
}
}
AccAOI/FrmMethodName.resx
0 → 100644
查看文件 @
0fd8321
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
AccAOI/control/ABaseControl.Designer.cs
查看文件 @
0fd8321
...
...
@@ -46,6 +46,8 @@ namespace AccAOI.control
//
// btnSetArea
//
this
.
btnSetArea
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSetArea
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnSetArea
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnSetArea
.
Inside
=
false
;
this
.
btnSetArea
.
Location
=
new
System
.
Drawing
.
Point
(
104
,
30
);
...
...
@@ -58,6 +60,8 @@ namespace AccAOI.control
//
// btnClearArea
//
this
.
btnClearArea
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnClearArea
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnClearArea
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnClearArea
.
Inside
=
false
;
this
.
btnClearArea
.
Location
=
new
System
.
Drawing
.
Point
(
204
,
274
);
...
...
@@ -109,6 +113,8 @@ namespace AccAOI.control
//
// btnImgType
//
this
.
btnImgType
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnImgType
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnImgType
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnImgType
.
Inside
=
false
;
this
.
btnImgType
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
30
);
...
...
@@ -148,6 +154,7 @@ namespace AccAOI.control
//
this
.
aoiImage
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
aoiImage
.
ImeMode
=
System
.
Windows
.
Forms
.
ImeMode
.
On
;
this
.
aoiImage
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
53
);
this
.
aoiImage
.
Name
=
"aoiImage"
;
this
.
aoiImage
.
Size
=
new
System
.
Drawing
.
Size
(
288
,
182
);
...
...
AccAOI/control/ABaseControl.cs
查看文件 @
0fd8321
...
...
@@ -99,7 +99,7 @@ namespace AccAOI.control
BImageBox
.
SelectNone
();
}
private
void
btnImgType_Click
(
object
sender
,
EventArgs
e
)
private
void
btnImgType_Click
(
object
sender
,
EventArgs
e
)
{
if
(
btnImgType
.
Text
.
Equals
(
"原图"
))
{
ShowImageType
=
1
;
...
...
@@ -114,6 +114,29 @@ namespace AccAOI.control
}
UpdateImage
();
}
/// <summary>
/// 1=原图,2-效果图
/// </summary>
/// <param name="type"></param>
internal
void
SetCurrImageType
(
int
type
)
{
if
(
ShowImageType
.
Equals
(
type
))
{
return
;
}
if
(
type
.
Equals
(
1
))
{
ShowImageType
=
1
;
btnImgType
.
Text
=
"效果图"
;
panAreaImage
.
Text
=
"区域图 - 原图"
;
}
else
{
ShowImageType
=
2
;
btnImgType
.
Text
=
"原图"
;
panAreaImage
.
Text
=
"区域图像 - 效果图"
;
}
}
}
}
AccAOI/control/AioMarkControl.cs
查看文件 @
0fd8321
...
...
@@ -50,6 +50,7 @@ namespace AccAOI.control
flatTextSearchZoom
.
Text
=
method
.
SearchPathZoom
.
ToString
();
IsShowOk
=
true
;
SetCurrImageType
(
1
);
UpdateImage
();
}
...
...
@@ -85,6 +86,7 @@ namespace AccAOI.control
}
else
{
SetCurrImageType
(
2
);
lblResult
.
ForeColor
=
Color
.
Green
;
lblResult
.
Text
=
"OK"
;
this
.
aoiImage
.
Image
=
result
;
...
...
@@ -117,6 +119,15 @@ namespace AccAOI.control
AoiMarkMethod
markMethod
=
(
AoiMarkMethod
)
AoiInfo
;
GraphicsPath
searchPath
=
markMethod
.
GetSearchPath
();
BImageBox
.
ShowPath
(
searchPath
,
Color
.
Yellow
);
if
(
ShowImageType
.
Equals
(
1
))
{
Image
cutImage
=
markMethod
.
GetRoiImage
(
BaseImage
,
true
);
aoiImage
.
Image
=
cutImage
;
}
else
{
aoiImage
.
Image
=
null
;
}
GC
.
Collect
();
}
...
...
AccAOI/control/AioTempMatchControl.cs
查看文件 @
0fd8321
...
...
@@ -48,6 +48,7 @@ namespace AccAOI.control
trackBarSamePercent
.
Value
=
(
int
)
method
.
SamePercent
;
IsShowOk
=
true
;
SetCurrImageType
(
1
);
UpdateImage
();
}
...
...
@@ -87,6 +88,7 @@ namespace AccAOI.control
lblResult
.
Text
=
result
.
result
?
"OK"
:
"NG"
;
if
(
result
.
currentRoiImage
!=
null
)
{
SetCurrImageType
(
2
);
this
.
aoiImage
.
Image
=
result
.
currentRoiImage
;
}
}
...
...
@@ -117,7 +119,15 @@ namespace AccAOI.control
AoiTemplateMethod
MatchMethod
=
(
AoiTemplateMethod
)
AoiInfo
;
MatchMethod
.
RoiPath
=
currPath
;
if
(
ShowImageType
.
Equals
(
1
))
{
Image
cutImage
=
MatchMethod
.
GetRoiImage
(
BaseImage
,
true
);
aoiImage
.
Image
=
cutImage
;
}
else
{
aoiImage
.
Image
=
null
;
}
GC
.
Collect
();
}
...
...
dll/Asa.Theme.dll
查看文件 @
0fd8321
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论