Example #1
0
        public static OcrWebService CreateOcrWebService()
        {
            XmlConfig     config        = new XmlConfig(_configFile);
            OcrWebService ocrWebService = new OcrWebService(config.GetExplicit("UserName"), config.GetExplicit("LicenseCode"));

            //ocrWebService.UserName = config.GetExplicit("UserName");
            //ocrWebService.LicenseCode = config.GetExplicit("LicenseCode");
            if (_cacheDirectory != null)
            {
                UrlCache urlCache = new UrlCache(_cacheDirectory);
                urlCache.UrlFileNameType = UrlFileNameType.Host | UrlFileNameType.Path;
                urlCache.IndexedFile     = true;
                ocrWebService.HttpManager.SetCacheManager(urlCache);
            }
            return(ocrWebService);
        }
Example #2
0
 public ScanManager(string userName, string licenseCode, UrlCache urlCache)
 {
     _ocrWebService = new OcrWebService(userName, licenseCode, _timeout);
     _ocrWebService.HttpManager.SetCacheManager(urlCache);
 }