/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize the importer /// </summary> /// ------------------------------------------------------------------------------------ public override void TestSetup() { base.TestSetup(); m_styleSheet = new FwStyleSheet(); m_styleSheet.Init(Cache, m_scr.Hvo, ScriptureTags.kflidStyles); InitWsInfo(); DummyTeImporter.s_translatorNoteDefn = Cache.ServiceLocator.GetInstance <ICmAnnotationDefnRepository>().TranslatorAnnotationDefn; DummyTeImporter.s_consultantNoteDefn = Cache.ServiceLocator.GetInstance <ICmAnnotationDefnRepository>().ConsultantAnnotationDefn; m_titus = new BCVRef(56001001); m_settings = m_scr.FindOrCreateDefaultImportSettings(TypeOfImport.Other); m_settings.StartRef = m_titus; m_settings.EndRef = m_titus; m_settings.ImportTranslation = true; InitializeImportSettings(); m_actionHandler.EndUndoTask(); // Let the importer handle the undo/redo m_importer = new DummyTeImporter(m_settings, this, m_styleSheet); m_importer.Initialize(); m_importer.UndoInfo.StartImportingFiles(); }
public override void Initialize() { base.Initialize(); m_styleSheet = new FwStyleSheet(); m_styleSheet.Init(Cache, m_scr.Hvo, (int)Scripture.ScriptureTags.kflidStyles); InitWsInfo(); DummyTeImporter.s_translatorNoteDefn = m_scrInMemoryCache.m_translatorNoteDefn; DummyTeImporter.s_consultantNoteDefn = m_scrInMemoryCache.m_consultantNoteDefn; m_titus = new BCVRef(56001001); m_settings = new DummyScrImportSet(); m_scr.ImportSettingsOC.Add(m_settings); m_settings.ImportTypeEnum = TypeOfImport.Other; m_settings.StartRef = m_titus; m_settings.EndRef = m_titus; m_settings.ImportTranslation = true; InitializeImportSettings(); m_importer = new DummyTeImporter(m_settings, Cache, m_styleSheet, m_scrInMemoryCache); m_importer.Initialize(); }