예제 #1
0
 private bool IsExistEnvironmentDir()
 {
     if (!LibUtilities.IsDirectoryExists(LibUtilities.TheEnvironmentVariablePath))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.License)))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.OCRArchived)))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.OCRInput)))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.OCRMasterFormSets)))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.OCRNotRecognized)))
     {
         return(false);
     }
     if (!LibUtilities.IsDirectoryExists(Path.Combine(LibUtilities.TheEnvironmentVariablePath, TheEnvVarSubDir.OCROutput)))
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
        public LeadToolsUtilities()
        {
            this.TheEngineType = Convert.ToString(ConfigurationManager.AppSettings["OrcEngineType"]);
            string EnvironmentVariable = Convert.ToString(ConfigurationManager.AppSettings["EnvironmentVariable"]);

            if (!this.SetEnvironmentVariable(EnvironmentVariable))
            {
                return;
            }
            LibUtilities.TheEnvironmentVariablePath = LibUtilities.GetEnvironmentVariablePath(EnvironmentVariable);
            if (!this.IsExistEnvironmentDir())
            {
                return;
            }

            if (!this.SetLicense())
            {
                return;
            }
            if (!this.StartOcrEngine())
            {
                return;
            }
            if (!this.CreateRasterCodecs(300))
            {
                return;
            }
            if (!this.CreateRepository(TheEnvVarSubDir.OCRMasterFormSets))
            {
                return;
            }
            if (!this.SetupAutoFormsEngine())
            {
                return;
            }
        }