Beispiel #1
0
        private void OnStopRecord(object sender, EventArgs e)
        {
            int err;

            err = PCO_SDK_LibWrapper.PCO_SetRecordingState(f_CameraHandle, 0);
            cbGrabCamera.IsEnabled = false;
            if (camDialog != IntPtr.Zero)
            {
                PCO_SDK_LibWrapper.PCO_EnableDialogCam(camDialog, true);
            }
            err = PCO_SDK_LibWrapper.PCO_CancelImages(f_CameraHandle);
            f_CameraTimer.Stop();
        }
Beispiel #2
0
        private void OnStartRecord(object sender, EventArgs e)
        {
            int    err;
            uint   dwWarn = 0, dwError = 0, dwStatus = 0;
            ushort width     = 0;
            ushort height    = 0;
            ushort widthmax  = 0;
            ushort heightmax = 0;

            // It is recommended to call this function in order to get information about the camera internal state
            err = PCO_SDK_LibWrapper.PCO_GetCameraHealthStatus(f_CameraHandle, ref dwWarn, ref dwError, ref dwStatus);
            PCO_SDK_LibWrapper.PCO_SetTriggerMode(f_CameraHandle, 0);
            err = PCO_SDK_LibWrapper.PCO_ArmCamera(f_CameraHandle);
            err = PCO_SDK_LibWrapper.PCO_GetSizes(f_CameraHandle, ref width, ref height, ref widthmax, ref heightmax);
            err = PCO_SDK_LibWrapper.PCO_CamLinkSetImageParameters(f_CameraHandle, (UInt16)width, (UInt16)height);

            err = PCO_SDK_LibWrapper.PCO_SetRecordingState(f_CameraHandle, 1);
            cbGrabCamera.IsEnabled = true;
            if (camDialog != IntPtr.Zero)
            {
                PCO_SDK_LibWrapper.PCO_EnableDialogCam(camDialog, false);
            }
            f_CameraTimer.Start();
        }