Beispiel #1
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// If the current stylesheet version in the Db doesn't match that of the current XML
        /// file, update the DB.
        /// </summary>
        /// <param name="lp">The language project</param>
        /// <param name="progressDlg">The progress dialog from the splash screen</param>
        /// -------------------------------------------------------------------------------------
        public static void EnsureCurrentStylesheet(ILangProject lp, IAdvInd4 progressDlg)
        {
            TeStylesXmlAccessor acc = new TeStylesXmlAccessor(lp.TranslatedScriptureOA);

            acc.EnsureCurrentResource(progressDlg);

            if (acc.UserModifiedStyles.Count > 0)
            {
                using (FwStylesModifiedDlg dlg = new FwStylesModifiedDlg(acc.UserModifiedStyles,
                                                                         lp.Cache.ProjectName(), FwApp.App))
                {
                    dlg.ShowDialog();
                }
            }
        }
Beispiel #2
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// If the current stylesheet version in the Db doesn't match that of the current XML
        /// file, update the DB.
        /// </summary>
        /// <param name="cache">The FDO cache</param>
        /// <param name="progressDlg">The progress dialog from the splash screen</param>
        /// <param name="helpTopicProvider">A Help topic provider that can serve up a help topic
        /// that only exists in TE Help.</param>
        /// -------------------------------------------------------------------------------------
        public static void EnsureCurrentStylesheet(FdoCache cache, IProgress progressDlg,
                                                   IHelpTopicProvider helpTopicProvider)
        {
            TeStylesXmlAccessor acc = new TeStylesXmlAccessor(cache.LangProject.TranslatedScriptureOA);

            acc.EnsureCurrentResource(progressDlg);

            if (acc.UserModifiedStyles.Count > 0)
            {
                using (FwStylesModifiedDlg dlg = new FwStylesModifiedDlg(acc.UserModifiedStyles,
                                                                         cache.ProjectId.UiName, helpTopicProvider))
                {
                    dlg.ShowDialog();
                }
            }
        }
Beispiel #3
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// If the current stylesheet version in the Db doesn't match that of the current XML
        /// file, update the DB.
        /// </summary>
        /// <param name="cache">The FDO cache</param>
        /// <param name="progressDlg">The progress dialog from the splash screen</param>
        /// <param name="helpTopicProvider">A Help topic provider that can serve up a help topic
        /// that only exists in TE Help.</param>
        /// -------------------------------------------------------------------------------------
        public static void EnsureCurrentStylesheet(FdoCache cache, IThreadedProgress progressDlg,
                                                   IHelpTopicProvider helpTopicProvider)
        {
            TeStylesXmlAccessor acc = new TeStylesXmlAccessor(cache.LangProject.TranslatedScriptureOA);

            acc.EnsureCurrentResource(progressDlg);

            // This class is used specifically for TE styles; FLEx *should* use a different class,
            // but per LT-14704, that is not the case. So always checking for current styles, but
            // suppressing a potentially confusing dialog when TE is not installed.
            if (acc.UserModifiedStyles.Count > 0 && FwUtils.IsTEInstalled)
            {
                using (FwStylesModifiedDlg dlg = new FwStylesModifiedDlg(acc.UserModifiedStyles,
                                                                         cache.ProjectId.UiName, helpTopicProvider))
                {
                    dlg.ShowDialog();
                }
            }
        }