/// ------------------------------------------------------------------------------------ /// <summary> /// Load the scripture project and enumerator, preparing us to read the data files. /// </summary> /// <param name="settings">Import settings object (filled in by wizard)</param> /// ------------------------------------------------------------------------------------ public void LoadScriptureProject(IScrImportSet settings) { m_settings = settings; m_ImportType = settings.ImportTypeEnum; // Load ScriptureText object switch (TypeOfImport) { case TypeOfImport.Paratext6: if ((!settings.ImportTranslation && !settings.ImportAnnotations) || !LoadParatextVernacularProject()) { if (!LoadParatextBackTranslationProject()) { if (!LoadParatextNotesProject()) { throw new InvalidOperationException("There was nothing worth loading."); } } } break; case TypeOfImport.Other: case TypeOfImport.Paratext5: ScrVers versification = m_settings.Cache.LangProject.TranslatedScriptureOA.Versification; m_settings.CheckForOverlappingFilesInRange( new ScrReference(m_settings.StartRef, versification), new ScrReference(m_settings.EndRef, versification)); m_scSfmText = new SCScriptureText(settings, ImportDomain.Main); // Now initialize the TextEnum with the range of scripture text we want m_scTextEnum = m_scSfmText.TextEnum(m_settings.StartRef, m_settings.EndRef); break; default: Debug.Assert(false, "bogus TypeOfImport"); break; } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Load the scripture project and enumerator, preparing us to read the data files. /// </summary> /// <param name="settings">Import settings object (filled in by wizard)</param> /// ------------------------------------------------------------------------------------ public void LoadScriptureProject(IScrImportSet settings) { m_settings = settings; m_ImportType = settings.ImportTypeEnum; // Load ScriptureText object switch (TypeOfImport) { case TypeOfImport.Paratext6: if ((!settings.ImportTranslation && !settings.ImportAnnotations) || !LoadParatextVernacularProject()) if (!LoadParatextBackTranslationProject()) if (!LoadParatextNotesProject()) throw new InvalidOperationException("There was nothing worth loading."); break; case TypeOfImport.Other: case TypeOfImport.Paratext5: ScrVers versification = m_settings.Cache.LangProject.TranslatedScriptureOA.Versification; m_settings.CheckForOverlappingFilesInRange( new ScrReference(m_settings.StartRef, versification), new ScrReference(m_settings.EndRef, versification)); m_scSfmText = new SCScriptureText(settings, ImportDomain.Main); // Now initialize the TextEnum with the range of scripture text we want m_scTextEnum = m_scSfmText.TextEnum(m_settings.StartRef, m_settings.EndRef); break; default: Debug.Assert(false, "bogus TypeOfImport"); break; } }