public bool CreateDevice() { if (_MagDevice == null) { _MagDevice = new MagDevice(IntPtr.Zero); } if (NewFrame == null) { NewFrame = new GroupSDK.DelegateNewFrame(NewFrameCome); } return(_MagDevice.Initialize()); }
/// <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); }
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); } }
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)); }
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); }