public void AutoTrigger(object sender, EventArgs e)
 {
     lock (LockHardwareTrigger)
     {
         string cameraSerialNo = GetCameraSerialNo(sender);
         Cognex.VisionPro.ICogImage outputImage = GetOutputImage(sender);
         HardwareTiggerOccured(cameraSerialNo, outputImage);
     }
 }
        private void CaptureCurrentImage(ToolBlockPowerSuite toolBlockPowerSuite, string strDscription = null)
        {
            Cognex.VisionPro.ICogImage cogImage = null;
            try
            {
                cogImage = (toolBlockPowerSuite.ThisToolBlock.Inputs[0].Value as Cognex.VisionPro.ICogImage);
            }
            catch
            {
                try
                {
                    cogImage = (toolBlockPowerSuite.ThisToolBlock.Tools[0] as CogAcqFifoTool).OutputImage;
                }
                catch
                {
                }
            }
            Bitmap bmp = cogImage.ToBitmap();

            AutoSaveClearImage(bmp, strDscription, false, "图片", null);
        }
 private void HardwareTiggerOccured(string CameraID, Cognex.VisionPro.ICogImage img)
 {
 }