当前位置: 首页>>代码示例>>C#>>正文


C# FdoCache.LoadAllOfAnOwningAtomicProp方法代码示例

本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.LoadAllOfAnOwningAtomicProp方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.LoadAllOfAnOwningAtomicProp方法的具体用法?C# FdoCache.LoadAllOfAnOwningAtomicProp怎么用?C# FdoCache.LoadAllOfAnOwningAtomicProp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SIL.FieldWorks.FDO.FdoCache的用法示例。


在下文中一共展示了FdoCache.LoadAllOfAnOwningAtomicProp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PreloadData

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Preloads the data used by TE.
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="splashScreen">The splash screen (can be null).</param>
		/// ------------------------------------------------------------------------------------
		public static void PreloadData(FdoCache cache, IFwSplashScreen splashScreen)
		{
			if (splashScreen != null)
			{
				splashScreen.ProgressBar.SetRange(0, 21); // we call 21 x UpdateProgress() below
				splashScreen.ProgressBar.StepSize = 1;
				splashScreen.ProgressBar.Position = 0;
			}

			// Preload all vectors for scripture
			// NOTE: splitting up the loading of flids off of the same object type (e.g. StText)
			// lets us create a smoother progress bar and doesn't seem to produce any noticable
			// performance hit!
			cache.PreloadIfMissing(cache.LangProject.TranslatedScriptureOAHvo,
				(int)Scripture.ScriptureTags.kflidScriptureBooks, 0);
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)ScrBook.ScrBookTags.kflidSections, "ScrBook");
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)Scripture.ScriptureTags.kflidStyles, "Scripture");
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningAtomicProp((int)ScrSection.ScrSectionTags.kflidHeading, "ScrSection");
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningAtomicProp((int)ScrSection.ScrSectionTags.kflidContent, "ScrSection");
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)StText.StTextTags.kflidParagraphs, "StText",
				new int[] { (int)ScrBook.ScrBookTags.kflidFootnotes });
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)StText.StTextTags.kflidParagraphs, "StText",
				new int[] { (int)ScrBook.ScrBookTags.kflidTitle });
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)StText.StTextTags.kflidParagraphs, "StText",
				new int[] { (int)ScrSection.ScrSectionTags.kflidHeading });
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)StText.StTextTags.kflidParagraphs, "StText",
				new int[] { (int)ScrSection.ScrSectionTags.kflidContent });
			UpdateProgress(splashScreen);
			cache.LoadAllOfAnOwningVectorProp((int)StTxtPara.StTxtParaTags.kflidTranslations, "StTxtPara");
			UpdateProgress(splashScreen);

			// also preload all scripture, sections, paragraphs and footnotes
			CmObject.LoadDataForFlids(typeof(Scripture), cache, null,
				LangProject.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StStyle), cache,
				new int[] { (int)LangProject.LangProjectTags.kflidTranslatedScripture },
				Scripture.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(ScrSection), cache,
				new int[] { (int)Scripture.ScriptureTags.kflidScriptureBooks },
				ScrBook.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StFootnote), cache,
				new int[] { (int)Scripture.ScriptureTags.kflidScriptureBooks },
				ScrBook.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StTxtPara), cache,
				new int[] { (int)ScrBook.ScrBookTags.kflidFootnotes }, StText.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StTxtPara), cache,
				new int[] { (int)ScrBook.ScrBookTags.kflidTitle }, StText.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StTxtPara), cache,
				new int[] { (int)ScrSection.ScrSectionTags.kflidHeading }, StText.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(StTxtPara), cache,
				new int[] { (int)ScrSection.ScrSectionTags.kflidContent }, StText.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(CmTranslation), cache,
				new int[] { (int)CmTranslation.CmTranslationTags.kflidStatus }, CmTranslation.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(CmTranslation), cache,
				new int[] { (int)CmTranslation.CmTranslationTags.kflidTranslation }, CmTranslation.FullViewName);
			UpdateProgress(splashScreen);
			CmObject.LoadDataForFlids(typeof(CmTranslation), cache,
				new int[] { (int)CmTranslation.CmTranslationTags.kflidType }, CmTranslation.FullViewName);
			UpdateProgress(splashScreen);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:84,代码来源:TeScrInitializer.cs


注:本文中的SIL.FieldWorks.FDO.FdoCache.LoadAllOfAnOwningAtomicProp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。