Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Imports using the specified import settings.
        /// </summary>
        /// <param name="progressDlg">The progress dialog.</param>
        /// <param name="parameters">The paramaters: import settings, undo action, and book
        /// merger, TeImportUi.</param>
        /// <returns>The Scripture reference of the first thing imported</returns>
        /// <remarks>This method runs on the background thread!</remarks>
        /// ------------------------------------------------------------------------------------
        protected virtual object ImportSf(IAdvInd4 progressDlg, object[] parameters)
        {
            Debug.Assert(parameters.Length == 3);
            IScrImportSet     importSettings = (IScrImportSet)parameters[0];
            UndoImportManager undoManager    = (UndoImportManager)parameters[1];
            TeImportUi        importUi       = (TeImportUi)parameters[2];

            return(TeSfmImporter.Import(importSettings, m_cache, m_styleSheet,
                                        undoManager, importUi));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Calls the importer.
        /// </summary>
        /// <param name="importSettings">The import settings.</param>
        /// <param name="undoManager">The undo manager.</param>
        /// <param name="importUi">The import UI.</param>
        /// <returns></returns>
        protected virtual ScrReference Import(IScrImportSet importSettings, UndoImportManager undoManager,
                                              TeImportUi importUi)
        {
            if (importSettings != null)
            {
                return(TeSfmImporter.Import(importSettings, m_cache, m_styleSheet,
                                            undoManager, importUi, m_fParatextStreamlinedImport));
            }

            return((ScrReference)TeXmlImporter.Import(m_cache, m_styleSheet, m_sOXESFile,
                                                      undoManager, importUi));
        }