基本信息
源码名称:visionpro加载toolblock实例
源码大小:0.07M
文件格式:.zip
开发语言:C#
更新时间:2020-03-17
   源码介绍
visionpro加载toolblock实例

    void Subject_Ran(object sender, EventArgs e)
    {
      // This method executes each time the TB runs
      if ((bool)(cogToolBlockEditV21.Subject.Outputs["InspectionPassed"].Value) == true)
        numPass ;
      else
        numFail ;
      // Update the label with pass and fail
      nPass.Text = numPass.ToString();
      nFail.Text = numFail.ToString();
      // Update the CogDisplayRecord with the image and the lastRunRecord
      cogRecordDisplay1.Image = cogToolBlockEditV21.Subject.Inputs["Image"].Value as CogImage8Grey;
      CogBlobTool mBlobTool = cogToolBlockEditV21.Subject.Tools["CogBlobTool1"] as CogBlobTool;
      cogRecordDisplay1.Record = mBlobTool.CreateLastRunRecord();
      cogRecordDisplay1.Fit(true);
    }