1、增加单独Job的保存、添加和创建

2、每个Job单独绑定一个图像窗体
3、支持通过以job的方式外部调用
This commit is contained in:
liu.wenjie
2022-05-09 16:17:41 +08:00
parent 7ca84a8720
commit 9dcba19b67
36 changed files with 1022 additions and 113 deletions

View File

@@ -31,10 +31,10 @@ namespace FindLineTool
{
public class FindLineRun : IToolRun
{
public void ToolRun(string jobName, int toolIndex, int inputItemNum, TreeNode selectNode, List<IToolInfo> L_toolList)
public void ToolRun(string jobName, int toolIndex, int inputItemNum, TreeNode selectNode, List<IToolInfo> L_toolList, IVisionJob runJob, Form myHalconWindowForm)
{
FindLine myFindLine = (FindLine)L_toolList[toolIndex].tool;
VisionJob myJob = VisionJobParams.pVisionProject.Project[jobName];
VisionJob myJob = (VisionJob)runJob;
for (int j = 0; j < inputItemNum; j++)
{
if (L_toolList[toolIndex].GetInput(L_toolList[toolIndex].toolInput[j].IOName).value == null)
@@ -74,8 +74,9 @@ namespace FindLineTool
else
{
myJob.FormLogDisp($"{L_toolList[toolIndex].toolName} 运行成功,{myFindLine.runTime}", Color.Green, selectNode);
myFindLine.DispMainWindow(FormImageWindow.Instance.myHWindow);
myFindLine.DispMainWindow(((FormImageWindow)myHalconWindowForm).myHWindow);
}
L_toolList[toolIndex].toolRunStatu = myFindLine.toolRunStatu;
}
}
}