public int Run1(int time, string _pathin, ref Result0 result) { Stop1(); if(GetImage1(_pathin)) { try { myJobManager1.Run()) System.Threading.Thread.Sleep(time); } catch { return 2; } if(GetResult1(ref result)) { Stop0(); return 0; } else { return 3; } } else { return 1; } return 4; }
private bool GetResult0(ref Result0 result) { if (null == myJobManager0) { return false; } ICogRecord tmpRecord; ICogRecord topRecord; try { topRecord = myJobManager0.UserResult(); if (null == topRecord) { return false; } if (null != cogRecordDisplay0) { tmpRecord = topRecord.SubRecords["ShowLastRunRecordForUserQueue"]; tmpRecord = tmpRecord.SubRecords["LastRun"]; tmpRecord = tmpRecord.SubRecords["CogFixtureTool1.OutputImage"]; if (null != tmpRecord.Content) { cogRecordDisplay0.Record = tmpRecord; } cogRecordDisplay0.AutoFit = true; } return true; } catch { return false; } }