Example #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 ///
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="filter">book filter in place</param>
 /// <param name="bookID">ordinal ID of the book being removed</param>
 /// ------------------------------------------------------------------------------------
 public UndoRemoveBookAction(FdoCache cache, FilteredScrBooks filter, int bookID)
 {
     m_cache      = cache;
     m_bookFilter = filter;
     m_bookID     = bookID;
     m_bookHvo    = ScrBook.FindBookByID(m_cache, bookID).Hvo;
 }
Example #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportUsfmDialog"/> class.
        /// </summary>
        /// <param name="cache">database cache</param>
        /// <param name="filter">book filter to display which books we will export</param>
        /// <param name="appKey">location of registry</param>
        /// <param name="markup">type of markup format for export:
        /// Paratext (one domain, non-interleaved) OR Toolbox (optionally interleaved)</param>
        /// ------------------------------------------------------------------------------------
        public ExportUsfmDialog(FdoCache cache, FilteredScrBooks filter, RegistryKey appKey,
                                MarkupType markup) : this()
        {
            m_cache      = cache;
            m_markupType = markup;          // let dialog know if this is for Paratext or Toolbox
            if (appKey != null)             // might be null in tests - in this case derived class has to provide a m_regGroup
            {
                m_regGroup = new RegistryGroup(appKey, "ExportUsfmSettings");
            }

            // Display books and markup labels
            string filtered = (filter.AllBooks ? TeResourceHelper.GetResourceString("kstidExportDlgUnfiltered") :
                               TeResourceHelper.GetResourceString("kstidExportDlgFiltered"));
            string booksToExport = GetExportedBooksStr(filter);

            if (filter.BookCount == 1)
            {
                lblBooks.Text = string.Format(TeResourceHelper.GetResourceString("kstidBooksToExportSingularForm"),
                                              filtered, booksToExport);
            }
            else
            {
                lblBooks.Text = string.Format(lblBooks.Text, filter.BookCount, filtered, booksToExport);
            }
        }
Example #3
0
        public void ExportUSFM_ToolboxVernacular()
        {
            string           fileName = Path.Combine(Path.GetTempPath(), "~usfmfile~.txt");
            FilteredScrBooks filter   = FilteredScrBooks.GetFilterInstance(Cache, 1);

            while (filter.BookCount > 0)
            {
                filter.Remove(0);
            }
            // add the book of James to the book filter
            filter.Add(Cache.LangProject.TranslatedScriptureOA.ScriptureBooksOS[1]);

            // perform Toolbox vernacular export
            try
            {
                ExportUsfm export = new ExportUsfm(Cache, filter, fileName);
                export.MarkupSystem = MarkupType.Toolbox;
                export.Run();
                VerifyFile("SIL.FieldWorks.AcceptanceTests.TE.ExportJasToolbox.sf",
                           fileName);
            }
            finally
            {
                try
                {
                    File.Delete(fileName);
                }
                catch {}
            }
        }
Example #4
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="TeImportManager"/> class.
 /// </summary>
 /// <remarks>This version is for testing only</remarks>
 /// <param name="cache">The cache.</param>
 /// <param name="styleSheet">The style sheet.</param>
 /// ------------------------------------------------------------------------------------
 protected TeImportManager(FdoCache cache, FwStyleSheet styleSheet)
 {
     m_mainWnd    = null;
     m_cache      = cache;
     m_styleSheet = styleSheet;
     m_bookFilter = null;             // not used in testing
 }
Example #5
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_FootnoteVc != null)
                {
                    m_FootnoteVc.Dispose();
                }
            }
            m_FootnoteVc  = null;
            m_Scripture   = null;
            m_persistence = null;
            m_draftView   = null;
            m_bookFilter  = null;
        }
Example #6
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="TeHeaderFooterVc"/> class.
 /// </summary>
 /// <param name="cache">DB Connection</param>
 /// <param name="page">Page information</param>
 /// <param name="wsDefault">ID of default writing system</param>
 /// <param name="printDateTime">printing date/time</param>
 /// <param name="filterInstance">book filter instance</param>
 /// ------------------------------------------------------------------------------------
 public TeHeaderFooterVc(FdoCache cache, IPageInfo page, int wsDefault,
                         DateTime printDateTime, int filterInstance)
     : base(page, wsDefault, printDateTime, cache)
 {
     m_scr               = m_cache.LangProject.TranslatedScriptureOA;
     m_bookFilter        = m_cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(filterInstance);
     m_autoAdjustColumns = true;
 }
Example #7
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="TeImportManager"/> class.
 /// </summary>
 /// <param name="mainWnd">The main window we belong to</param>
 /// <param name="importCallbacks">The import callbacks.</param>
 /// ------------------------------------------------------------------------------------
 protected TeImportManager(FwMainWnd mainWnd, ITeImportCallbacks importCallbacks)
 {
     m_mainWnd         = mainWnd;
     m_cache           = m_mainWnd.Cache;
     m_styleSheet      = m_mainWnd.StyleSheet;
     m_importCallbacks = importCallbacks;
     m_bookFilter      = m_importCallbacks.BookFilter;
 }
Example #8
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="EditorialChecksViewWrapper"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="bookFilter">The book filter.</param>
 /// <param name="viewCreateInfo">Information used to create the view.</param>
 /// <param name="settingsRegKey">The settings reg key.</param>
 /// <param name="sProjectName">The name of the current project</param>
 /// ------------------------------------------------------------------------------------
 public EditorialChecksViewWrapper(Control parent, FdoCache cache,
                                   FilteredScrBooks bookFilter, object viewCreateInfo, RegistryKey settingsRegKey,
                                   string sProjectName) : base(parent, cache, viewCreateInfo, settingsRegKey)
 {
     Name           = "EditorialChecks";
     m_sProjectName = sProjectName;
     m_bookFilter   = bookFilter;
 }
Example #9
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="TeHeaderFooterVc"/> class.
 /// </summary>
 /// <param name="cache">DB Connection</param>
 /// <param name="page">Page information</param>
 /// <param name="wsDefault">ID of default writing system</param>
 /// <param name="printDateTime">printing date/time</param>
 /// <param name="filterInstance">book filter instance</param>
 /// <param name="sectionsTag">The sections tag.</param>
 /// ------------------------------------------------------------------------------------
 public TeHeaderFooterVc(FdoCache cache, IPageInfo page, int wsDefault,
                         DateTime printDateTime, int filterInstance, int sectionsTag)
     : base(page, wsDefault, printDateTime, cache)
 {
     m_scr               = m_cache.LangProject.TranslatedScriptureOA;
     m_bookFilter        = FilteredScrBooks.GetFilterInstance(m_cache, filterInstance);
     m_autoAdjustColumns = true;
     m_sectionsTag       = sectionsTag;
 }
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="T:DummyParatextDialog"/> class.
 /// </summary>
 /// <param name="cache">The cache.</param>
 /// <param name="filter">The filter.</param>
 /// ------------------------------------------------------------------------------------
 public DummyParatextDialog(FdoCache cache, FilteredScrBooks filter)
     : base(cache, filter, null, null, null)
 {
     if (m_regGroup != null)
     {
         m_regGroup.Dispose();
     }
     m_regGroup = new InMemoryRegistryGroup();
 }
        public override void TestSetup()
        {
            base.TestSetup();

            m_BookFilter = Cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance);
            m_BookFilter.ShowAllBooks();

            ConfigurePublication(true, true);
        }
Example #12
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportUsfmDialog"/> class.
        /// </summary>
        /// <param name="cache">database cache</param>
        /// <param name="filter">book filter to display which books we will export</param>
        /// <param name="appKey">location of registry</param>
        /// ------------------------------------------------------------------------------------
        public ExportTbxDialog(FdoCache cache, FilteredScrBooks filter, RegistryKey appKey)
            : base(cache, filter, appKey, MarkupType.Toolbox)
        {
            InitializeComponent();
            // Save default label for BT control
            m_defaultBtLabel = chkBackTranslation.Text;

            m_fileDialog = new TeImportExportFileDialog(m_cache, FileType.ToolBox);
        }
Example #13
0
 public void Deinitialize()
 {
     CheckDisposed();
     m_exporter = null;
     m_cache.Dispose();
     m_cache  = null;
     m_filter = null;
     File.Delete(m_fileName);
     m_fileName = null;
 }
Example #14
0
        public override void Initialize()
        {
            base.Initialize();

            m_BookFilter = new FilteredScrBooks(Cache, m_filterInstance);
            m_BookFilter.ShowAllBooks();
            ParagraphCounterManager.ParagraphCounterType = typeof(TeParaCounter);

            ConfigurePublication(true, true);
        }
Example #15
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="EditorialChecksViewWrapper"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="bookFilter">The book filter.</param>
 /// <param name="draftViewProxy">View proxy used to create the view.</param>
 /// <param name="settingsRegKey">The settings reg key.</param>
 /// <param name="sProjectName">The name of the current project</param>
 /// <param name="helpTopicProvider">The help topic provider.</param>
 /// <param name="app">The application (needed to get the product name)</param>
 /// ------------------------------------------------------------------------------------
 public EditorialChecksViewWrapper(Control parent, FdoCache cache,
                                   FilteredScrBooks bookFilter, ViewProxy draftViewProxy, RegistryKey settingsRegKey,
                                   string sProjectName, IHelpTopicProvider helpTopicProvider, IApp app) :
     base(parent, cache, draftViewProxy, settingsRegKey)
 {
     Name = "EditorialChecks";
     m_helpTopicProvider = helpTopicProvider;
     m_app          = app;
     m_sProjectName = sProjectName;
     m_bookFilter   = bookFilter;
 }
Example #16
0
 public override void Initialize()
 {
     CheckDisposed();
     m_cache  = FdoCache.Create("TestLangProj");
     m_filter = new FilteredScrBooks(m_cache, 123);
     m_filter.ShowAllBooks();
     m_fileName = Path.GetTempFileName();
     File.Delete(m_fileName);                    // exporter pops up dialog if file exists!
     m_exporter = new ExportXml(m_fileName, m_cache, m_filter,
                                ExportWhat.AllBooks, 0, 0, 0, "This is a test");
 }
            /// --------------------------------------------------------------------------------
            /// <summary>
            ///
            /// </summary>
            /// --------------------------------------------------------------------------------
            public DummyTeFootnoteView(FdoCache cache)
                : base()
            {
                // Add virtual property to cache
                if (FilteredScrBooks.GetFilterInstance(cache, 0) == null)
                {
                    new FilteredScrBooks(cache, 0);
                }

                m_locationTracker = new LocationTrackerImpl(cache, 0);
            }
Example #18
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// constructor
 /// </summary>
 /// ------------------------------------------------------------------------------------
 public DummyExportUsfm(FdoCache cache, FilteredScrBooks filter) :
     base(cache, filter, string.Empty)
 {
     if (m_file != null)
     {
         m_file.Close();
     }
     m_file = new DummyFileWriter();
     // Usually this is set by the main window and most tests need this.
     m_requestedAnalWS = new int[] { m_defaultAnalWS };
 }
Example #19
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Insert a bar to separate this book from the following book (unless this is the last
        /// book being displayed).
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected virtual void InsertBookSeparator(int hvoScrBook, IVwEnv vwenv)
        {
            FilteredScrBooks filter = m_cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance);
            int hvoLastScrBook      = filter.GetBook(filter.BookCount - 1).Hvo;

            if (hvoLastScrBook != hvoScrBook)
            {
                vwenv.AddSimpleRect((int)FwTextColor.kclrTransparent, -1, 20000, 0);
                vwenv.AddSimpleRect((int)ColorUtil.ConvertColorToBGR(ColorUtil.LightInverse(m_BackColor)), -1, 10000, 0);
                vwenv.AddSimpleRect((int)FwTextColor.kclrTransparent, -1, 5000, 0);
            }
        }
        public override void TestSetup()
        {
            base.TestSetup();
            m_listOfChecks = new SortedList <ScrCheckKey, IScriptureCheck>();
            m_bookFilter   = Cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance);

            m_editChecksControl = new EditorialChecksControl(
                Cache, null, m_bookFilter, "Dummy Caption", "Dummy Project", null, null);

            m_checksTree = ReflectionHelper.GetField(
                m_editChecksControl, "m_availableChecksTree") as TriStateTreeView;
        }
Example #21
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// lears member variables, cleans up temp files, shuts down the cache, etc.
        /// </summary>
        /// <remarks>This method is called after each test</remarks>
        /// ------------------------------------------------------------------------------------
        public override void TestTearDown()
        {
            m_exporter = null;
            m_filter   = null;
            if (m_fileName != null)
            {
                FileUtils.Delete(m_fileName);
            }
            m_stylesheet = null;
            m_fileName   = null;

            base.TestTearDown();
        }
Example #22
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Make the root box.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void MakeRoot()
        {
            CheckDisposed();

            if (m_fdoCache == null || DesignMode)
            {
                return;
            }

            if (FwEditingHelper.ApplicableStyleContexts != null)
            {
                FwEditingHelper.ApplicableStyleContexts = new List <ContextValues>(2);
                FwEditingHelper.ApplicableStyleContexts.Add(ContextValues.Note);
                FwEditingHelper.ApplicableStyleContexts.Add(ContextValues.General);
            }

            // This is muy importante. If a spurious rootbox got made already and we just replace
            // it with a new one, the old one will fire an assertion in its destructor.
            // REVIEW: Is this okay? Is there any way to prevent early creation of rootboxes?
            if (m_rootb == null)
            {
                m_rootb = VwRootBoxClass.Create();
            }

            m_rootb.SetSite(this);

            // Set up a new view constructor.
            m_FootnoteVc = new FootnoteVc(m_filterInstance, TeStVc.LayoutViewTarget.targetDraft,
                                          m_isBackTranslation ? m_btWs : m_fdoCache.DefaultVernWs);
            m_FootnoteVc.ContentType = this.ContentType;

            m_FootnoteVc.Cache           = m_fdoCache;
            m_FootnoteVc.HeightEstimator = Group as IHeightEstimator;
            m_FootnoteVc.Editable        = EditingHelper.Editable;
            m_bookFilter = FilteredScrBooks.GetFilterInstance(m_fdoCache, m_filterInstance);

            m_FootnoteVc.Cache = m_fdoCache;

            m_rootb.DataAccess = m_fdoCache.MainCacheAccessor;
            //EditingHelper.RootObjects = new int[]{ScriptureObj.Hvo};
            m_rootb.SetRootObject(ScriptureObj.Hvo, m_FootnoteVc,
                                  (int)FootnoteFrags.kfrScripture, m_styleSheet);

            base.MakeRoot();
            m_dxdLayoutWidth = kForceLayout;             // Don't try to draw until we get OnSize and do layout.

            //TODO:
            //ptmw->RegisterRootBox(qrootb);

            Synchronize(m_rootb);
        }
Example #23
0
        public override void Initialize()
        {
            m_inMemoryCache = null;
            base.Initialize();
            m_inMemoryCache.InitializeAnnotationDefs();
            m_listOfChecks = new SortedList <ScrCheckKey, IScriptureCheck>();
            m_bookFilter   = new FilteredScrBooks(Cache, m_filterInstance);

            m_editChecksControl = new EditorialChecksControl(
                m_scrInMemoryCache.Cache, m_bookFilter, "Dummy Caption", "Dummy Project", null);

            m_checksTree = ReflectionHelper.GetField(
                m_editChecksControl, "m_availableChecksTree") as TriStateTreeView;
        }
Example #24
0
        public override void Exit()
        {
            CheckDisposed();

            m_exporter = null;
            m_filter   = null;
            if (m_fileName != null)
            {
                File.Delete(m_fileName);
            }
            m_stylesheet = null;
            m_fileName   = null;

            Options.UseInterlinearBackTranslation = m_saveSegmentedBT;

            base.Exit();
        }
Example #25
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Constructs a new instance of the <see cref="ExportXhtml"/> class.
        /// </summary>
        /// <param name="fileName">pathname of the XHTML file to create</param>
        /// <param name="cache">data source</param>
        /// <param name="filter">lists the books to export</param>
        /// <param name="what">tells what to export: everything, filtered list, or single book</param>
        /// <param name="nBook">if single book, number of the book to export</param>
        /// <param name="iFirstSection">if single book, index of first section to export</param>
        /// <param name="iLastSection">if single book, index of last section to export</param>
        /// <param name="sDescription"></param>
        /// <param name="styleSheet"></param>
        /// <param name="pub"></param>
        /// ------------------------------------------------------------------------------------
        public ExportXhtml(string fileName, FdoCache cache, FilteredScrBooks filter,
                           ExportWhat what, int nBook, int iFirstSection, int iLastSection, string sDescription,
                           FwStyleSheet styleSheet, IPublication pub)
        {
            m_fileName      = fileName;
            m_cache         = cache;
            m_bookFilter    = filter;
            m_what          = what;
            m_nBookSingle   = nBook;
            m_iFirstSection = iFirstSection;
            m_iLastSection  = iLastSection;
            m_sDescription  = sDescription;
            m_styleSheet    = styleSheet;
            m_pub           = pub;

            m_scr = cache.LangProject.TranslatedScriptureOA;
        }
Example #26
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Test setup
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void TestSetup()
        {
            base.TestSetup();
            m_fileName = FileUtils.GetTempFile("tmp");
            FileUtils.Delete(m_fileName);               // exporter pops up dialog if file exists!
            m_stylesheet = new FwStyleSheet();
            m_stylesheet.Init(Cache, m_scr.Hvo, ScriptureTags.kflidStyles);

            m_book = AddBookToMockedScripture(1, "Genesis");
            AddTitleToMockedBook(m_book, "Genesis");

            m_filter = Cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(123);

            m_filter.ShowAllBooks();

            m_exporter = new ExportXhtml(m_fileName, Cache, m_filter, ExportWhat.AllBooks, 1, 0, 0,
                                         string.Empty, m_stylesheet, null, null);
        }
Example #27
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:UndoImportInfo"/> class.
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="bookFilter">The book filter.</param>
        /// ------------------------------------------------------------------------------------
        public UndoImportManager(FdoCache cache, FilteredScrBooks bookFilter)
        {
            m_cache      = cache;
            m_bookFilter = bookFilter;
            m_scr        = m_cache.LangProject.TranslatedScriptureOA;

            Debug.Assert(m_cache.ActionHandlerAccessor != null);
            Debug.Assert(m_cache.ActionHandlerAccessor.CurrentDepth == 0);
            m_hMark = m_cache.ActionHandlerAccessor.Mark();
            IActionHandler actionHandler = m_cache.ActionHandlerAccessor;

            m_suppressor = new SuppressSubTasks(m_cache);             // don't need to undo setting properties.
            // Create new archive for saving backup versions of imported book
            m_savedVersion = new ScrDraft();
            m_scr.ArchivedDraftsOC.Add(m_savedVersion);
            actionHandler.AddAction(new UndoImportObjectAction(m_savedVersion));
            m_savedVersion.Description =
                TeResourceHelper.GetResourceString("kstidSavedVersionDescriptionOriginal");
        }
Example #28
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="DraftViewBase"/> class.
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="filterInstance">The tag that identifies the book filter instance.</param>
        /// <param name="app">The application.</param>
        /// <param name="viewName">The name of the view.</param>
        /// <param name="fEditable"><c>true</c> if view is to be editable.</param>
        /// <param name="viewType">Bit-flags indicating type of view.</param>
        /// <param name="btWs">The back translation writing system (if needed).</param>
        /// ------------------------------------------------------------------------------------
        public DraftViewBase(FdoCache cache, int filterInstance, IApp app, string viewName,
                             bool fEditable, TeViewType viewType, int btWs)
            : base(cache)
        {
            InitializePersistence();

            m_filterInstance = filterInstance;
            m_app            = app;
            AccessibleName   = Name = viewName;

            m_initialEditableState = fEditable;
            m_viewType             = viewType;
            m_initialBtWs          = btWs;
            m_locationTracker      = new LocationTrackerImpl(cache, m_filterInstance, ContentType);
            m_bookFilter           = cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance);

            BackColor    = EditableColor;
            DoSpellCheck = TeProjectSettings.ShowSpellingErrors;
        }
Example #29
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets virtual property handler corresponding to filter instance.
        /// </summary>
        /// <param name="filterInstance">Number used to make filters unique for each main
        /// window</param>
        /// ------------------------------------------------------------------------------------
        public FilteredScrBooks GetFilterInstance(int filterInstance)
        {
            FilteredScrBooks bookFilter;

            // combination of cache hash code and filter instance is used as key so that
            // different filter will be used if either is different.
            if (m_filteredBooks.TryGetValue(filterInstance, out bookFilter))
            {
                // This can no longer be done. If it turns out this is needed, we need
                // to figure out a better way of doing it (possibly with an internal
                // method that doesn't take any parameters).
                //bookFilter.CheckListForDeletedBooks(ref bookFilter.m_filteredBooks);
                return(bookFilter);
            }

            bookFilter = new FilteredScrBooks(m_cache);
            m_filteredBooks[filterInstance] = bookFilter;

            return(bookFilter);
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Setup the test.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void TestSetup()
        {
            base.TestSetup();
            m_bookFilter = Cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(1);
            m_bookFilter.FilteredBooks = new IScrBook[] { m_Genesis };
            m_dummyParaDlg             = new DummyParatextDialog(Cache, m_bookFilter);

            //IScrImportSet importSet = new IScrImportSet();
            //Cache.LangProject.TranslatedScriptureOA.ImportSettingsOC.Add(importSet);
            //importSet.ParatextScrProj = "xyz";
            //importSet.ParatextBTProj = "xyzBT";
            //Cache.LangProject.TranslatedScriptureOA.DefaultImportSettings = importSet;
            IWritingSystem wsVern = Cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem;

            wsVern.Abbreviation = "xyz";

            // Initialize in-memory registry settings.
            m_dummyParaDlg.Registry.SetIntValue("ParatextOneDomainExportWhat", 0);
            m_dummyParaDlg.Registry.SetStringValue("ParatextOutputSpec", ParatextHelper.ProjectsDirectory);
            m_dummyParaDlg.Registry.SetStringValue("ParatextBTOutputSpec", ParatextHelper.ProjectsDirectory);
        }