Beispiel #1
0
        public MainForm()
        {
            DXLog.InitLog();
            this.logger = DXLog.GetLogger(typeof(MainForm));


            logger.Info("Main service start.");



            InitializeComponent();
        }
Beispiel #2
0
        public void InitOCRService(bool isLorR, string szPath)
        {
            try
            {
                m_Wrapper = new OCRWrapper();

                if (isLorR)
                {
                    int index = Convert.ToInt16(szPath);
                    m_Capture = m_Wrapper.ConnectLocalCamera(index);
                    logger.Info("Connected local camera,framewidth:{0}", m_Capture.FrameWidth.ToString());
                }
                else
                {
                    m_Capture = m_Wrapper.ConnectRemoteCamera(szPath);
                    logger.Info("Connected remote camera,framewidth:{0}", m_Capture.FrameWidth.ToString());
                }
            }
            catch (Exception ex)
            {
                logger.Error("Connected init ocr service error, {0}", ex.ToString());
            }
        }