mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-04-07 19:06:34 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
1628
PMAlignTool/FormPMAlignTool.Designer.cs
generated
Normal file
1628
PMAlignTool/FormPMAlignTool.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
182
PMAlignTool/FormPMAlignTool.cs
Normal file
182
PMAlignTool/FormPMAlignTool.cs
Normal file
@@ -0,0 +1,182 @@
|
||||
using ChoiceTech.Halcon.Control;
|
||||
using CommonMethods;
|
||||
using HalconDotNet;
|
||||
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;
|
||||
using ViewROI;
|
||||
|
||||
namespace PMAlignTool
|
||||
{
|
||||
public partial class FormPMAlignTool : Form
|
||||
{
|
||||
private PMAlign myPMAlign = null;
|
||||
private IToolInfo myToolInfo = null;
|
||||
public HWindowTool_Smart myHwindow = new HWindowTool_Smart();
|
||||
private HDrawingObject selected_drawing_object = new HDrawingObject();
|
||||
private List<HDrawingObject> templateModelListAdd = new List<HDrawingObject>() { };
|
||||
private List<HDrawingObject> templateModelListSub = new List<HDrawingObject>() { };
|
||||
public FormPMAlignTool(ref object pmalign)
|
||||
{
|
||||
InitializeComponent();
|
||||
_instance = this;
|
||||
if (pmalign.GetType().FullName != "System.Object")
|
||||
{
|
||||
myToolInfo = (IToolInfo)pmalign;
|
||||
myPMAlign = (PMAlign)myToolInfo.tool;
|
||||
myPMAlign.DispImage();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体对象实例
|
||||
/// </summary>
|
||||
private static FormPMAlignTool _instance;
|
||||
public static FormPMAlignTool Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance != null)
|
||||
{
|
||||
lock (_instance)
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
object pmalign = new object();
|
||||
_instance = new FormPMAlignTool(ref pmalign);
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
object pmalign = new object();
|
||||
_instance = new FormPMAlignTool(ref pmalign);
|
||||
return _instance;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void FormPMAlignTool_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.panel1.Controls.Add(myHwindow);
|
||||
myHwindow.Dock = DockStyle.Fill;
|
||||
InitTool();
|
||||
}
|
||||
|
||||
private void InitTool()
|
||||
{
|
||||
cNumErosionValue1.Value = myPMAlign.imageProcess.erosionValue1.algValue;
|
||||
cbCErosion1.Checked = myPMAlign.imageProcess.erosionValue1.isEnable;
|
||||
cNumDilationValue2.Value = myPMAlign.imageProcess.dilationValue.algValue;
|
||||
cbCDilation1.Checked = myPMAlign.imageProcess.dilationValue.isEnable;
|
||||
cNumErosionValue2.Value = myPMAlign.imageProcess.erosionValue2.algValue;
|
||||
cbCErosion2.Checked = myPMAlign.imageProcess.erosionValue2.isEnable;
|
||||
}
|
||||
|
||||
private void btnAcqNewModelImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (myPMAlign.inputImage != null)
|
||||
{
|
||||
myPMAlign.oldTrainImage = myPMAlign.inputImage;
|
||||
}
|
||||
}
|
||||
private ShapeMode selectType;
|
||||
private void btnOperateROI_Click(object sender, EventArgs e)
|
||||
{
|
||||
HDrawingObject temp_object = new HDrawingObject();
|
||||
temp_object.ClearDrawingObject();
|
||||
Button btnClick = sender as Button;
|
||||
selectType = (ShapeMode)Enum.Parse(typeof(ShapeMode), btnClick.Tag.ToString());
|
||||
switch (selectType)
|
||||
{
|
||||
case ShapeMode.RECTANGLE1:
|
||||
temp_object = HDrawingObject.CreateDrawingObject(HDrawingObject.HDrawingObjectType.RECTANGLE1, new HTuple[] { 100, 100, 300, 400 });
|
||||
break;
|
||||
case ShapeMode.RECTANGLE2:
|
||||
temp_object = HDrawingObject.CreateDrawingObject(HDrawingObject.HDrawingObjectType.RECTANGLE2, new HTuple[] { 200, 200, 0, 100,300 });
|
||||
break;
|
||||
case ShapeMode.CIRCLE:
|
||||
temp_object = HDrawingObject.CreateDrawingObject(HDrawingObject.HDrawingObjectType.CIRCLE, new HTuple[] { 200, 200, 100 });
|
||||
break;
|
||||
case ShapeMode.ELLIPSE:
|
||||
break;
|
||||
case ShapeMode.Other:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GC.KeepAlive(temp_object);
|
||||
temp_object.OnSelect(OnSelectDrawingObject);
|
||||
temp_object.OnAttach(OnSelectDrawingObject);
|
||||
temp_object.OnResize(OnSelectDrawingObject);
|
||||
temp_object.OnDrag(OnSelectDrawingObject);
|
||||
myHwindow.DispHWindow.AttachDrawingObjectToWindow(temp_object);
|
||||
if(rdo_templateRegionAdd.Checked)
|
||||
{
|
||||
templateModelListAdd.Add(temp_object);
|
||||
}
|
||||
else
|
||||
{
|
||||
templateModelListSub.Add(temp_object);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 参数回调
|
||||
/// </summary>
|
||||
/// <param name="dobj"></param>
|
||||
/// <param name="hwin"></param>
|
||||
/// <param name="type"></param>
|
||||
private void OnSelectDrawingObject(HDrawingObject dobj, HWindow hwin, string type)
|
||||
{
|
||||
HObject selectObj = dobj.GetDrawingObjectIconic();
|
||||
myPMAlign.templateRegion = selectObj.Clone();
|
||||
switch (selectType)
|
||||
{
|
||||
case ShapeMode.RECTANGLE1:
|
||||
break;
|
||||
case ShapeMode.RECTANGLE2:
|
||||
break;
|
||||
case ShapeMode.CIRCLE:
|
||||
break;
|
||||
case ShapeMode.ELLIPSE:
|
||||
break;
|
||||
case ShapeMode.Other:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
selectObj.Dispose();
|
||||
}
|
||||
|
||||
private void btnCreateModel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(myPMAlign.modelID == -1)
|
||||
{
|
||||
myPMAlign.oldTrainImage = myPMAlign.inputImage;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void PreProcess_CheckChanged(object sender, EventArgs e)
|
||||
{
|
||||
myPMAlign.imageProcess.erosionValue1.isEnable = cbCErosion1.Checked;
|
||||
myPMAlign.imageProcess.dilationValue.isEnable = cbCDilation1.Checked;
|
||||
myPMAlign.imageProcess.erosionValue2.isEnable = cbCErosion2.Checked;
|
||||
}
|
||||
|
||||
private void PreValueChanged(double value)
|
||||
{
|
||||
myPMAlign.imageProcess.erosionValue1.algValue = cNumErosionValue1.Value;
|
||||
myPMAlign.imageProcess.dilationValue.algValue = cNumDilationValue2.Value;
|
||||
myPMAlign.imageProcess.erosionValue2.algValue = cNumErosionValue2.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
1957
PMAlignTool/FormPMAlignTool.resx
Normal file
1957
PMAlignTool/FormPMAlignTool.resx
Normal file
File diff suppressed because it is too large
Load Diff
160
PMAlignTool/PMAlign.cs
Normal file
160
PMAlignTool/PMAlign.cs
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* ==============================================================================
|
||||
*
|
||||
* Filename: PMAlign
|
||||
* Description:
|
||||
*
|
||||
* Version: 1.0
|
||||
* Created: 2021/3/30 14:07:10
|
||||
*
|
||||
* Author: liu.wenjie
|
||||
*
|
||||
* ==============================================================================
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CommonMethods;
|
||||
using HalconDotNet;
|
||||
using ToolBase;
|
||||
using static DataStruct.DataStruct;
|
||||
|
||||
namespace PMAlignTool
|
||||
{
|
||||
[Serializable]
|
||||
public class PMAlign:IToolBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示匹配到的模板
|
||||
/// </summary>
|
||||
internal bool showTemplate { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否显示中心十字架
|
||||
/// </summary>
|
||||
internal bool showCross { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否显示特征
|
||||
/// </summary>
|
||||
internal bool showFeature { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 显示结果序号
|
||||
/// </summary>
|
||||
internal bool showIndex { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否显示搜索区域
|
||||
/// </summary>
|
||||
internal bool showSearchRegion { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 模板句柄
|
||||
/// </summary>
|
||||
internal HTuple modelID { get; set; } = -1;
|
||||
/// <summary>
|
||||
/// 行列间隔像素数
|
||||
/// </summary>
|
||||
internal int spanPixelNum { get; set; } = 100;
|
||||
/// <summary>
|
||||
/// 排序模式
|
||||
/// </summary>
|
||||
// internal SortMode sortMode = SortMode.从上至下且从左至右;
|
||||
/// <summary>
|
||||
/// 模板区域
|
||||
/// </summary>
|
||||
internal HObject templateRegion { get; set; }
|
||||
/// <summary>
|
||||
/// 在进行模板创建及匹配时进行的图像预处理
|
||||
/// </summary>
|
||||
public ImagePreProcess imageProcess { get; set; } = new ImagePreProcess();
|
||||
|
||||
internal HObject totalRegion;
|
||||
/// <summary>
|
||||
/// 搜索区域图像
|
||||
/// </summary>
|
||||
internal HObject reducedImage;
|
||||
/// <summary>
|
||||
/// 最小匹配分数
|
||||
/// </summary>
|
||||
internal double minScore { get; set; } = 0.5;
|
||||
/// <summary>
|
||||
/// 匹配个数
|
||||
/// </summary>
|
||||
internal int matchNum { get; set; } = 1;
|
||||
/// <summary>
|
||||
/// 起始角度
|
||||
/// </summary>
|
||||
internal int startAngle { get; set; } = -30;
|
||||
/// <summary>
|
||||
/// 角度范围
|
||||
/// </summary>
|
||||
internal int angleRange { get; set; } = 30;
|
||||
/// <summary>
|
||||
/// 角度步长
|
||||
/// </summary>
|
||||
internal int angleStep { get; set; } = 1;
|
||||
/// <summary>
|
||||
/// 对比度
|
||||
/// </summary>
|
||||
internal int contrast { get; set; } = 30;
|
||||
/// <summary>
|
||||
/// 训练时所使用的模板图像,不点击获取图像时,不进行更新
|
||||
/// </summary>
|
||||
public HObject oldTrainImage { get; set; }
|
||||
|
||||
internal void DispMainWindow(object dispHWindow)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 极性
|
||||
/// </summary>
|
||||
internal string polarity { get; set; } = "use_polarity";
|
||||
|
||||
/// <summary>
|
||||
/// 工具锁
|
||||
/// </summary>
|
||||
private object obj { get; set; } = new object();
|
||||
/// <summary>
|
||||
/// 模板匹配结果
|
||||
/// </summary>
|
||||
internal List<XYU> L_result = new List<XYU>();
|
||||
|
||||
public override void Run(SoftwareRunState softwareRunState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DispImage()
|
||||
{
|
||||
if (inputImage != null)
|
||||
{
|
||||
FormPMAlignTool.Instance.myHwindow.DispHWindow.DispObj(inputImage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DispMainWindow(HWindow window)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CreateModelTemplate()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class ImagePreProcess
|
||||
{
|
||||
public ProcessAlg erosionValue1 { get; set; } = new ProcessAlg();
|
||||
public ProcessAlg dilationValue { get; set; } = new ProcessAlg();
|
||||
public ProcessAlg erosionValue2 { get; set; } = new ProcessAlg();
|
||||
}
|
||||
[Serializable]
|
||||
public class ProcessAlg
|
||||
{
|
||||
public double algValue { get; set; } = 0;
|
||||
public bool isEnable { get; set; } = false;
|
||||
}
|
||||
}
|
||||
115
PMAlignTool/PMAlignTool.csproj
Normal file
115
PMAlignTool/PMAlignTool.csproj
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C1C08195-2EC8-42E9-93BB-D5331E6C6687}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PMAlignTool</RootNamespace>
|
||||
<AssemblyName>PMAlignTool</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Controls">
|
||||
<HintPath>..\UsingControl\Controls\obj\Debug\Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="halcondotnet">
|
||||
<HintPath>C:\Program Files\MVTec\HALCON-19.05-Progress\bin\dotnet20\halcondotnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FormPMAlignTool.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormPMAlignTool.Designer.cs">
|
||||
<DependentUpon>FormPMAlignTool.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PMAlign.cs" />
|
||||
<Compile Include="PMAlignToolRun.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FormPMAlignTool.resx">
|
||||
<DependentUpon>FormPMAlignTool.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CommonMethods\CommonHelper.csproj">
|
||||
<Project>{1C8D0DDC-2086-48A9-9586-F2B643E2FC54}</Project>
|
||||
<Name>CommonHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataStruct\DataStruct.csproj">
|
||||
<Project>{DF3D4D4C-02DF-4F92-9FD4-0A861F64B0EF}</Project>
|
||||
<Name>DataStruct</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FormLib\FormLib.csproj">
|
||||
<Project>{8C6FC8C6-8874-494B-8260-071F291AA33D}</Project>
|
||||
<Name>FormLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ImageWindow\HWindow_Tool.csproj">
|
||||
<Project>{9BAA53FD-89B5-43E2-AC59-A27B006DEBB6}</Project>
|
||||
<Name>HWindow_Tool</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ToolBase\ToolBase.csproj">
|
||||
<Project>{7CD50B44-BF56-4E8E-8FA1-05F6968C1835}</Project>
|
||||
<Name>ToolBase</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ToolLib.Log\Logger\Logger.csproj">
|
||||
<Project>{D4E052B9-E541-4B67-A1F9-273073EF1D4B}</Project>
|
||||
<Name>Logger</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ToolLib.VisionJob\ToolLib.VisionJob.csproj">
|
||||
<Project>{16E8FF17-98A8-4452-AB9E-C433DC9C21F7}</Project>
|
||||
<Name>ToolLib.VisionJob</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
68
PMAlignTool/PMAlignToolRun.cs
Normal file
68
PMAlignTool/PMAlignToolRun.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* ==============================================================================
|
||||
*
|
||||
* Filename: PMAlignToolRun
|
||||
* Description:
|
||||
*
|
||||
* Version: 1.0
|
||||
* Created: 2021/3/30 11:05:40
|
||||
*
|
||||
* Author: liu.wenjie
|
||||
*
|
||||
* ==============================================================================
|
||||
*/
|
||||
using CommonMethods.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CommonMethods;
|
||||
using System.Windows.Forms;
|
||||
using ToolLib.VisionJob;
|
||||
using System.Drawing;
|
||||
using System.Text.RegularExpressions;
|
||||
using HalconDotNet;
|
||||
using FormLib;
|
||||
using Logger;
|
||||
|
||||
namespace PMAlignTool
|
||||
{
|
||||
public class PMAlignToolRun : IToolRun
|
||||
{
|
||||
public void ToolRun(string jobName, int toolIndex, int inputItemNum, TreeNode selectNode, List<IToolInfo> L_toolList)
|
||||
{
|
||||
PMAlign myPMAlign = (PMAlign)L_toolList[toolIndex].tool;
|
||||
VisionJob myJob = VisionJobParams.pVisionProject.Project[jobName];
|
||||
for (int j = 0; j < inputItemNum; j++)
|
||||
{
|
||||
if (L_toolList[toolIndex].GetInput(L_toolList[toolIndex].toolInput[j].IOName).value == null)
|
||||
{
|
||||
selectNode.ForeColor = Color.Red;
|
||||
LoggerClass.WriteLog(L_toolList[toolIndex].toolName + " 无输入图像", MsgLevel.Exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
string sourceFrom = L_toolList[toolIndex].GetInput(L_toolList[toolIndex].toolInput[j].IOName).value.ToString();
|
||||
if (L_toolList[toolIndex].toolInput[j].IOName == "InputImage")
|
||||
{
|
||||
string sourceToolName = Regex.Split(sourceFrom, "->")[0];
|
||||
sourceToolName = sourceToolName.Substring(3, Regex.Split(sourceFrom, "->")[0].Length - 3);
|
||||
string toolItem = Regex.Split(sourceFrom, "->")[1];
|
||||
myPMAlign.inputImage = myJob.GetToolInfoByToolName(sourceToolName).GetOutput(toolItem).value as HObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
myPMAlign.Run(SoftwareRunState.Release);
|
||||
if (myPMAlign.toolRunStatu != ToolRunStatu.Succeed)
|
||||
{
|
||||
myJob.FormLogDisp($"{L_toolList[toolIndex].toolName} 运行失败,失败原因:{myPMAlign.runMessage}", Color.Red, selectNode, Logger.MsgLevel.Exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
myJob.FormLogDisp($"{L_toolList[toolIndex].toolName} 运行成功,{myPMAlign.runTime}", Color.Green, selectNode);
|
||||
myPMAlign.DispMainWindow(FormImageWindow.Instance.myHWindow.DispHWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
PMAlignTool/Properties/AssemblyInfo.cs
Normal file
36
PMAlignTool/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("PMAlignTool")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PMAlignTool")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("c1c08195-2ec8-42e9-93bb-d5331e6c6687")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
PMAlignTool/Properties/Resources.Designer.cs
generated
Normal file
63
PMAlignTool/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace PMAlignTool.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PMAlignTool.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
PMAlignTool/Properties/Resources.resx
Normal file
120
PMAlignTool/Properties/Resources.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user