Exemplo n.º 1
0
        public bool CreateDevice()
        {
            if (_MagDevice == null)
            {
                _MagDevice = new MagDevice(IntPtr.Zero);
            }

            if (NewFrame == null)
            {
                NewFrame = new GroupSDK.DelegateNewFrame(NewFrameCome);
            }

            return(_MagDevice.Initialize());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化设备
        /// </summary>
        /// <returns>是否成功</returns>
        private Boolean InitializeDevice()
        {
            if (mMagService.IsInitialized() || !mMagService.Initialize())
            {
                return(false);
            }

            if (mMagDevice.IsInitialized() || !mMagDevice.Initialize())
            {
                return(false);
            }

            mMagService.EnableAutoReConnect(true);
            mOnNewFrame = new GroupSDK.DelegateNewFrame(OnFrameReceived);

            return(true);
        }
Exemplo n.º 3
0
        public bool LoadDDT(GroupSDK.OUTPUT_PARAM param, [MarshalAs(UnmanagedType.LPWStr)] string sFileName, GroupSDK.DelegateNewFrame funcFrame, uint intUserData)
        {
            if (!GroupSDK.MAG_IsProcessingImage(m_intChannelIndex))
            {
                if (!GroupSDK.MAG_LoadDDT(m_intChannelIndex, ref param, sFileName, funcFrame, intUserData))
                {
                    return(false);
                }

                GroupSDK.MAG_GetCamInfo(m_intChannelIndex, ref m_CamInfo, Marshal.SizeOf(typeof(GroupSDK.CAMERA_INFO)));
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
 public bool StartProcessPulseImage(GroupSDK.OUTPUT_PARAM param, GroupSDK.DelegateNewFrame funcFrame, uint dwStreamType, uint dwUserData)
 {
     return(GroupSDK.MAG_StartProcessPulseImage(m_intChannelIndex, ref param, funcFrame, dwStreamType, dwUserData));
 }
Exemplo n.º 5
0
        public bool LoadBufferedDDT(GroupSDK.OUTPUT_PARAM param, IntPtr pBuffer, uint size, GroupSDK.DelegateNewFrame funcFrame, IntPtr pUserData)
        {
            if (!GroupSDK.MAG_IsProcessingImage(m_intChannelIndex))
            {
                if (!GroupSDK.MAG_LoadBufferedDDT(m_intChannelIndex, ref param, pBuffer, size, funcFrame, pUserData))
                {
                    return(false);
                }

                GroupSDK.MAG_GetCamInfo(m_intChannelIndex, ref m_CamInfo, Marshal.SizeOf(typeof(GroupSDK.CAMERA_INFO)));
                return(true);
            }

            return(true);
        }