Example #1
0
 public void Run()
 {
     for (int i = 0; i < L_toolList.Count; i++)
     {
         TreeNode treeNode = GetToolNodeByNodeText(L_toolList[i].toolName);
         inputItemNum  = (L_toolList[i]).toolInput.Count;
         outputItemNum = (L_toolList[i]).toolOutput.Count;
         string   assemblyName = "VisionEdit.ToolRunLib." + L_toolList[i].toolType.ToString() + "Run" + ",VisionEdit";
         Type     classType    = Type.GetType(assemblyName);
         IToolRun myCaliperRun = (IToolRun)Activator.CreateInstance(classType);
         myCaliperRun.ToolRun(i, inputItemNum, treeNode, myFormLog, myFormImageWindow, L_toolList);
     }
 }
Example #2
0
 public void Run()
 {
     for (int i = 0; i < L_toolList.Count; i++)
     {
         TreeNode treeNode = GetToolNodeByNodeText(L_toolList[i].toolName);
         inputItemNum  = (L_toolList[i]).toolInput.Count;
         outputItemNum = (L_toolList[i]).toolOutput.Count;
         // 通过要调用的程序集名称.类名,程序集名称 对类进行调用
         // FormToolName 中已存储程序集名称
         string   assemblyName = $"{L_toolList[i].FormToolName.Split('.')[0]}.{L_toolList[i].toolType.ToString()}Run,{L_toolList[i].FormToolName.Split('.')[0]}";
         Type     classType    = Type.GetType(assemblyName);
         IToolRun myTool       = (IToolRun)Activator.CreateInstance(classType);
         myTool.ToolRun(JobName, i, inputItemNum, treeNode, L_toolList);
     }
 }