Commit 69f067ba 刘韬

1

1 个父辈 aab51ccb
......@@ -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>
......
<?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
......@@ -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>
......
......@@ -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;
......
......@@ -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))
{
......
......@@ -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!