/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the ChooseScriptureDialog class. /// WARNING: this constructor is called by reflection, at least in the Interlinear /// Text DLL. If you change its parameters be SURE to find and fix those callers also. /// </summary> /// <param name="cache">The cache.</param> /// <param name="objList">A list of texts and books to check as an array of hvos</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// <param name="importer">The Paratext book importer.</param> /// ------------------------------------------------------------------------------------ public FilterTextsDialogTE(FdoCache cache, IStText[] objList, IHelpTopicProvider helpTopicProvider, IBookImporter importer) : base(cache, objList, helpTopicProvider) { m_bookImporter = importer; using (var progressDlg = new ProgressDialogWithTask(this)) { // This somewhat duplicates some logic in FieldWorks.GetHelpTopicProvider, but it feels // wrong to reference the main exe even though I can't find an actual circular dependency. // As far as I can discover, the help topic provider is only used if the user has modified // TE styles and TE needs to display a dialog about it (possibly because it has loaded a // new version of the standard ones?). Anyway, I don't think it will be used at all if TE // is not installed, so it should be safe to use the regular FLEx one. IHelpTopicProvider helpProvider; if (FwUtils.FwUtils.IsTEInstalled) { helpProvider = (IHelpTopicProvider)DynamicLoader.CreateObject(FwDirectoryFinder.TeDll, "SIL.FieldWorks.TE.TeHelpTopicProvider"); } else { helpProvider = (IHelpTopicProvider)DynamicLoader.CreateObject(FwDirectoryFinder.FlexDll, "SIL.FieldWorks.XWorks.LexText.FlexHelpTopicProvider"); } NonUndoableUnitOfWorkHelper.Do(cache.ActionHandlerAccessor, () => TeScrInitializer.EnsureMinimalScriptureInitialization(cache, progressDlg, helpProvider)); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the ChooseScriptureDialog class. /// WARNING: this constructor is called by reflection, at least in the Interlinear /// Text DLL. If you change its parameters be SURE to find and fix those callers also. /// </summary> /// <param name="cache">The cache.</param> /// <param name="objList">A list of texts and books to check as an array of hvos</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// <param name="importer">The Paratext book importer.</param> /// ------------------------------------------------------------------------------------ public FilterTextsDialogTE(FdoCache cache, IStText[] objList, IHelpTopicProvider helpTopicProvider, IBookImporter importer) : base(cache, objList, helpTopicProvider) { m_bookImporter = importer; using (var progressDlg = new ProgressDialogWithTask(null, cache.ThreadHelper)) { NonUndoableUnitOfWorkHelper.Do(cache.ActionHandlerAccessor, () => TeScrInitializer.EnsureMinimalScriptureInitialization(cache, progressDlg, (IHelpTopicProvider)DynamicLoader.CreateObject(DirectoryFinder.TeDll, "SIL.FieldWorks.TE.TeHelpTopicProvider"))); } }