Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
AccAOI
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 69f067ba
由
刘韬
编写于
2023-03-22 13:13:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
aab51ccb
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
34 行增加
和
7 行删除
AOI/AOI.csproj
AOI/packages.config
AOIProject/AOIProject.csproj
AccAOI/FrmAoiSetting.Designer.cs
AccAOI/FrmAoiSetting.cs
ImageBox/AccImageBox.csproj
AOI/AOI.csproj
查看文件 @
69f067b
...
...
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AOI</RootNamespace>
<AssemblyName>AOI</AssemblyName>
<TargetFrameworkVersion>v4.
6
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7.2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
...
...
AOI/packages.config
查看文件 @
69f067b
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"12.0.2"
targetFramework
=
"net45"
/>
<
package
id
=
"OpenCvSharp3-AnyCPU"
version
=
"4.0.0.20181129"
targetFramework
=
"net45"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net46"
/>
<
package
id
=
"OpenCvSharp3-AnyCPU"
version
=
"4.0.0.20181129"
targetFramework
=
"net45"
requireReinstallation
=
"true"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net46"
requireReinstallation
=
"true"
/>
</
packages
>
\ No newline at end of file
AOIProject/AOIProject.csproj
查看文件 @
69f067b
...
...
@@ -15,7 +15,7 @@
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>
x64
</PlatformTarget>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
...
...
AccAOI/FrmAoiSetting.Designer.cs
查看文件 @
69f067b
...
...
@@ -297,7 +297,7 @@ namespace AccAOI
this
.
imageBox1
.
DragHandleSize
=
9
;
this
.
imageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
738
,
58
);
this
.
imageBox1
.
Name
=
"imageBox1"
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Yellow
;
this
.
imageBox1
.
SelectionMode
=
Acc
.
ImageBox
.
ImageBoxSelectionMode
.
Rectangle
;
this
.
imageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
560
,
557
);
this
.
imageBox1
.
TabIndex
=
4
;
...
...
AccAOI/FrmAoiSetting.cs
查看文件 @
69f067b
...
...
@@ -278,9 +278,18 @@ namespace AccAOI
System
.
Windows
.
Forms
.
OpenFileDialog
openDialog
=
new
System
.
Windows
.
Forms
.
OpenFileDialog
();
openDialog
.
Title
=
AOIResourceCulture
.
GetValue
(
"打开项目"
);
openDialog
.
Filter
=
"(*.data)|*.data|(*.*)|*.*"
;
if
(!
String
.
IsNullOrEmpty
(
DefaultPath
))
//openDialog.RestoreDirectory = true;
if
(
String
.
IsNullOrEmpty
(
DefaultPath
))
{
Directory
.
CreateDirectory
(
"config\\AOIConfig"
);
openDialog
.
InitialDirectory
=
Path
.
Combine
(
Application
.
StartupPath
,
"config\\AOIConfig"
);
}
else
if
(!
String
.
IsNullOrEmpty
(
DefaultPath
))
{
Directory
.
CreateDirectory
(
DefaultPath
);
openDialog
.
InitialDirectory
=
DefaultPath
;
}
//openDialog.DefaultExt = "png";
System
.
Windows
.
Forms
.
DialogResult
result
=
openDialog
.
ShowDialog
();
...
...
@@ -316,7 +325,13 @@ namespace AccAOI
System
.
Windows
.
Forms
.
SaveFileDialog
saveFileDialog
=
new
System
.
Windows
.
Forms
.
SaveFileDialog
();
saveFileDialog
.
Title
=
AOIResourceCulture
.
GetValue
(
"保存项目"
);
saveFileDialog
.
Filter
=
"(*.data)|*.data|(*.*)|*.*"
;
//saveFileDialog.FileOk += (CancelEventHandler)delegate(object s, CancelEventArgs c) {
// //if (Path.GetFullPath(saveFileDialog.FileName) !=
// //Path.GetFullPath(Path.Combine(Application.StartupPath, "config\\AOIConfig")))
// // c.Cancel= true;
//};
//saveFileDialog.RestoreDirectory = true;
if
(!
String
.
IsNullOrEmpty
(
currProjectFileName
))
{
saveFileDialog
.
InitialDirectory
=
Path
.
GetFullPath
(
currProjectFileName
);
...
...
@@ -325,6 +340,12 @@ namespace AccAOI
else
if
(!
String
.
IsNullOrEmpty
(
DefaultPath
))
{
saveFileDialog
.
InitialDirectory
=
DefaultPath
;
}
else
{
Directory
.
CreateDirectory
(
"config\\AOIConfig"
);
saveFileDialog
.
InitialDirectory
=
Path
.
Combine
(
Application
.
StartupPath
,
"config\\AOIConfig"
);
}
//openDialog.DefaultExt = "png";
System
.
Windows
.
Forms
.
DialogResult
result
=
saveFileDialog
.
ShowDialog
();
...
...
@@ -337,6 +358,11 @@ namespace AccAOI
MyMessage
.
Show
(
AOIResourceCulture
.
GetValue
(
"保存成功"
));
}
private
void
SaveFileDialog_FileOk
(
object
sender
,
CancelEventArgs
e
)
{
throw
new
NotImplementedException
();
}
private
void
btnNewAoi_Click
(
object
sender
,
EventArgs
e
)
{
if
(
BaseImg
==
null
)
...
...
@@ -670,6 +696,7 @@ namespace AccAOI
}
string
filePath
=
Application
.
StartupPath
+
@"\aimage\"
;
Directory
.
CreateDirectory
(
filePath
);
string
fileName
=
@"\test.bmp"
;
using
(
Bitmap
img
=
CameraManager
.
GetCamerImage
(
camera
))
{
...
...
ImageBox/AccImageBox.csproj
查看文件 @
69f067b
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ImageBox</RootNamespace>
<AssemblyName>AccImageBox</AssemblyName>
<TargetFrameworkVersion>v4.
5
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7.2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论