Exemple #1
0
        public bool Initialize(int _ID, string _CamType, string _CamInfo)
        {
            bool _Result = true;

            CameraType = _CamType;

            //LDH, 2019.03.14, Common 폴더에서 Exposure time 읽기 추가
            int CamExposure = ReadExposure();

            if (CameraType == eCameraType.Euresys.ToString())
            {
                if (_ID == 0)
                {
                    objEuresysManager = new CEuresysManager(_CamInfo, CamExposure);
                    objEuresysManager.EuresysGrabEvent += new CEuresysManager.EuresysGrabHandler(ImageGrabEvent);
                }
            }

            else if (CameraType == eCameraType.EuresysIOTA.ToString())
            {
                if (_ID == 0)
                {
                    objEuresysIOTAManager = new CEuresysIOTAManager(CamExposure);
                    objEuresysIOTAManager.EuresysGrabEvent += new CEuresysIOTAManager.EuresysGrabHandler(ImageGrabEvent);
                }
            }

            else if (CameraType == eCameraType.BaslerGE.ToString())
            {
                objBaslerManager = new CBaslerManager();
                if (true == objBaslerManager.Initialize(_ID, _CamInfo))
                {
                    objBaslerManager.BaslerGrabEvent += new CBaslerManager.BaslerGrabHandler(ImageGrabEvent);
                }
                else
                {
                    _Result = false;
                }
            }

            return(_Result);
        }
        public bool Initialize(int _ID, string _CamType, string _CamInfo)
        {
            bool _Result = true;

            CameraType = _CamType;

            if (CameraType == eCameraType.Euresys.ToString())
            {
                if (_ID == 0)
                {
                    objEuresysManager = new CEuresysManager(_CamInfo);
                    objEuresysManager.EuresysGrabEvent += new CEuresysManager.EuresysGrabHandler(ImageGrabEvent);
                }
            }

            else if (CameraType == eCameraType.EuresysIOTA.ToString())
            {
                if (_ID == 0)
                {
                    objEuresysIOTAManager = new CEuresysIOTAManager();
                    objEuresysIOTAManager.EuresysGrabEvent += new CEuresysIOTAManager.EuresysGrabHandler(ImageGrabEvent);
                }
            }

            else if (CameraType == eCameraType.BaslerGE.ToString())
            {
                objBaslerManager = new CBaslerManager();
                if (true == objBaslerManager.Initialize(_ID, _CamInfo))
                {
                    objBaslerManager.BaslerGrabEvent += new CBaslerManager.BaslerGrabHandler(ImageGrabEvent);
                }
                else
                {
                    _Result = false;
                }
            }

            return(_Result);
        }