示例#1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes the Scripture object, along with styles, book names and abbreviations.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void InitializeScriptureAndStyles(IProgress progressDlg)
        {
            m_scr = m_cache.LanguageProject.TranslatedScriptureOA = m_cache.ServiceLocator.GetInstance <IScriptureFactory>().Create();

            //Initialize factory styles
            TeStylesXmlAccessor.CreateFactoryScrStyles(progressDlg, m_scr);

            //Initialize Scripture Book Ref info
            TeScrBookRefsInit.SetNamesAndAbbreviations(progressDlg, m_cache);
        }
示例#2
0
        /// --------------------------------------------------------------------------------
        /// <summary>
        /// Ensures all of the project components are valid.
        /// </summary>
        /// --------------------------------------------------------------------------------
        public static void EnsureProjectComponentsValid(FdoCache cache, FwApp app,
                                                        IThreadedProgress existingProgressDlg)
        {
            EnsureProjectValid(cache, app, existingProgressDlg);

            // TE-8621: Don't try to upgrade the database unless we're the project server and no one is connected
            if (!cache.ProjectId.IsLocal || cache.NumberOfRemoteClients > 0)
            {
                return;
            }

            ILangProject lp = cache.LangProject;

            TeScrBookRefsInit.EnsureFactoryScrBookRefs(cache, existingProgressDlg);
            TePublicationsInit.EnsureFactoryPublications(lp, existingProgressDlg);
            TeStylesXmlAccessor.EnsureCurrentStylesheet(cache, existingProgressDlg, app);
            TeScrNoteCategoriesInit.EnsureCurrentScrNoteCategories(lp, existingProgressDlg);
            TeKeyTermsInit.EnsureCurrentKeyTerms(lp, app, existingProgressDlg);
        }
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// Sets localized names and abbreviations for ScrBookRefs using values from the XML file.
        /// </summary>
        /// <param name="progressDlg">Progress dialog so the user can cancel</param>
        /// <param name="cache">The cache</param>
        /// -------------------------------------------------------------------------------------
        internal static void SetNamesAndAbbreviations(IProgress progressDlg, FdoCache cache)
        {
            TeScrBookRefsInit scrRefInit = new TeScrBookRefsInit(cache);

            scrRefInit.SetNamesAndAbbreviations(progressDlg, scrRefInit.LoadDoc());
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Ensures that the ScrBookRefs have the current versions of all localized names and
        /// abbreviations
        /// </summary>
        /// <param name="cache">The cache</param>
        /// <param name="existingProgressDlg">The existing progress dialog, if any.</param>
        /// ------------------------------------------------------------------------------------
        public static void EnsureFactoryScrBookRefs(FdoCache cache, IProgress existingProgressDlg)
        {
            TeScrBookRefsInit scrRefInit = new TeScrBookRefsInit(cache);

            scrRefInit.EnsureCurrentResource(existingProgressDlg);
        }
示例#5
0
		/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Sets localized names and abbreviations for ScrBookRefs using values from the XML file.
		/// </summary>
		/// <param name="progressDlg">Progress dialog so the user can cancel</param>
		/// <param name="cache">The cache</param>
		/// -------------------------------------------------------------------------------------
		internal static void SetNamesAndAbbreviations(IProgress progressDlg, FdoCache cache)
		{
			TeScrBookRefsInit scrRefInit = new TeScrBookRefsInit(cache);
			scrRefInit.SetNamesAndAbbreviations(progressDlg, scrRefInit.LoadDoc());
		}
示例#6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Ensures that the ScrBookRefs have the current versions of all localized names and
		/// abbreviations
		/// </summary>
		/// <param name="cache">The cache</param>
		/// <param name="existingProgressDlg">The existing progress dialog, if any.</param>
		/// ------------------------------------------------------------------------------------
		public static void EnsureFactoryScrBookRefs(FdoCache cache, IThreadedProgress existingProgressDlg)
		{
			TeScrBookRefsInit scrRefInit = new TeScrBookRefsInit(cache);
			scrRefInit.EnsureCurrentResource(existingProgressDlg);
		}