public static void start(String dir) { Logger m_log = null; String m_watchDirName = dir; String m_watchDirNameIndd = null; String m_watchDirNameInx = null; String m_watchDirNames = null; InDesignApplication m_InDesignApp = null; try { Logger.Initialize(m_watchDirName + @"\AdobeConverter.log"); m_watchDirNameIndd = m_watchDirName + @"\indd"; m_watchDirNameInx = m_watchDirName + @"\inx"; DirectoryInfo watchDirIndd = new DirectoryInfo(m_watchDirNameIndd); DirectoryInfo watchDirInx = new DirectoryInfo(m_watchDirNameInx); watchDirIndd.Create(); watchDirInx.Create(); m_watchDirNames = m_watchDirNameIndd + ";" + m_watchDirNameInx; m_log = Logger.GetLogger(); m_log.Log("[Indesign]: GlobalSight InDesign Converter starting up."); m_log.Log("[Indesign]: Creating and starting threads to watch directory " + m_watchDirNames); m_importConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.IMPORT), m_watchDirNames); m_exportConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.EXPORT), m_watchDirNames); m_previewConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.PREVIEW), m_watchDirNames); m_importConverterRunner.Start(); m_exportConverterRunner.Start(); m_previewConverterRunner.Start(); //if (AllowInteractWithDesktop()) //{ // m_InDesignApp = InDesignApplication.getInstance(); //} //else //{ // throw new Exception("InDesign Converter Service needs to interact with desktop." // + " The properties of InDesign Converter Service needs to " // + "be changed to allow sevice to interact with desktop."); //} m_InDesignApp = InDesignApplication.getInstance(); } catch (Exception e) { string msg = "GlobalSight InDesign Converter failed to initialize because of: " + e.Message + "\r\n" + e.StackTrace; // EventLog.WriteEntry(msg, EventLogEntryType.Error); Logger.LogWithoutException(msg); throw e; } }
public static void start(String dir) { Logger m_log = null; String m_watchDirName = dir; String m_watchDirNameIndd = null; String m_watchDirNameInx = null; String m_watchDirNames = null; InDesignApplication m_InDesignApp = null; try { Logger.Initialize(m_watchDirName + @"\AdobeConverter.log"); m_watchDirNameIndd = m_watchDirName + @"\indd"; m_watchDirNameInx = m_watchDirName + @"\inx"; DirectoryInfo watchDirIndd = new DirectoryInfo(m_watchDirNameIndd); DirectoryInfo watchDirInx = new DirectoryInfo(m_watchDirNameInx); watchDirIndd.Create(); watchDirInx.Create(); m_watchDirNames = m_watchDirNameIndd + ";" + m_watchDirNameInx; m_log = Logger.GetLogger(); m_log.EnableDebug = AppConfig.IsDebugEnabled(); m_log.Log("[Indesign]: GlobalSight InDesign CS5.5 Converter starting up."); m_log.Log("[Indesign]: Creating and starting threads to watch directory " + m_watchDirNames); m_importConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.IMPORT), m_watchDirNames); m_exportConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.EXPORT), m_watchDirNames); m_previewConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.PREVIEW), m_watchDirNames); m_idmlPreviewConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.IDML_PREVIEW), m_watchDirNames); m_inctxrvConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.INCTXRV), m_watchDirNames); m_importConverterRunner.Start(); m_exportConverterRunner.Start(); m_previewConverterRunner.Start(); m_idmlPreviewConverterRunner.Start(); m_inctxrvConverterRunner.Start(); m_InDesignApp = InDesignApplication.getInstance(); } catch (Exception e) { string msg = "GlobalSight InDesign Converter failed to initialize because of: " + e.Message + "\r\n" + e.StackTrace; // EventLog.WriteEntry(msg, EventLogEntryType.Error); Logger.LogWithoutException(msg); throw e; } }
public static void start(String dir) { Logger m_log = null; String m_watchDirName = dir; String m_watchDirNameIndd = null; String m_watchDirNames = null; InDesignApplication m_InDesignApp = null; try { m_watchDirNameIndd = m_watchDirName + @"\idml"; DirectoryInfo watchDirIndd = new DirectoryInfo(m_watchDirNameIndd); watchDirIndd.Create(); Logger.Initialize(m_watchDirNameIndd + @"\IdmlConverter.log"); m_watchDirNames = m_watchDirNameIndd; m_log = Logger.GetLogger(); m_log.EnableDebug = AppConfig.IsDebugEnabled(); m_log.Log("[Idml]: GlobalSight Idml Converter starting up."); m_log.Log("[Idml]: Creating and starting threads to watch directory " + m_watchDirNames); m_importConverterRunner = new ConverterRunner( new InDesignConverterImpl(InDesignConverterImpl.ConversionType.IMPORT), m_watchDirNames); m_importConverterRunner.Start(); m_InDesignApp = InDesignApplication.getInstance(); } catch (Exception e) { string msg = "GlobalSight Idml Converter failed to initialize because of: " + e.Message + "\r\n" + e.StackTrace; Logger.LogWithoutException(msg); throw e; } }