示例#1
0
 /// <summary>
 /// 通过工具名获取工具信息
 /// </summary>
 /// <param name="toolName">工具名</param>
 /// <returns>工具信息</returns>
 internal static ToolInfo GetToolInfoByToolName(string jobName, string toolName)
 {
     try
     {
         Job job = new Job();
         //for (int i = 0; i < Project.Instance.L_jobList.Count; i++)
         //{
         //    if (Project.Instance.L_jobList[i].jobName == jobName)
         //    {
         //        job = Project.Instance.L_jobList[i];
         //        break;
         //    }
         //}
         job = TestForm.GetInstance().myJob;
         for (int i = 0; i < job.L_toolList.Count; i++)
         {
             if (job.L_toolList[i].toolName == toolName)
             {
                 return(job.L_toolList[i]);
             }
         }
         return(new ToolInfo());
     }
     catch (Exception ex)
     {
         return(new ToolInfo());
     }
 }
示例#2
0
 public TestForm()
 {
     InitializeComponent();
     instance = this;
     CheckForIllegalCrossThreadCalls = false;
 }