コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Performs any needed tasks to ensure that the project is valid and has any objects
        /// required by this version of the application.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="existingProgressDlg">The existing progress dialog, if any.</param>
        /// ------------------------------------------------------------------------------------
        public static void EnsureProjectValid(FdoCache cache, IAdvInd4 existingProgressDlg)
        {
            TeScrInitializer scrInitializer = new TeScrInitializer(cache);

            scrInitializer.RemoveRtlMarksFromScrProperties();
            scrInitializer.EnsureScriptureTextsValid();
            List <string> issuesToReport = scrInitializer.FixOrcsWithoutProps();

            if (issuesToReport != null)
            {
                using (FixedOrphanFootnoteReportDlg dlg = new FixedOrphanFootnoteReportDlg(
                           issuesToReport, cache.ProjectName(), FwApp.App))
                {
                    dlg.ShowDialog();
                }
            }
        }
コード例 #2
0
ファイル: TeScrInitializer.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Performs any needed tasks to ensure that the project is valid and has any objects
		/// required by this version of the application.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="existingProgressDlg">The existing progress dialog, if any.</param>
		/// ------------------------------------------------------------------------------------
		public static void EnsureProjectValid(FdoCache cache, IAdvInd4 existingProgressDlg)
		{
			TeScrInitializer scrInitializer = new TeScrInitializer(cache);
			scrInitializer.RemoveRtlMarksFromScrProperties();
			scrInitializer.EnsureScriptureTextsValid();
			List<string> issuesToReport = scrInitializer.FixOrcsWithoutProps();
			if (issuesToReport != null)
			{
				using (FixedOrphanFootnoteReportDlg dlg = new FixedOrphanFootnoteReportDlg(
					issuesToReport, cache.ProjectName(), FwApp.App))
				{
					dlg.ShowDialog();
				}
			}
		}