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


C# FdoCache.SetMultiUnicodeAlt方法代码示例

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


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

示例1: CreateWritingSystem

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new writing system
		/// </summary>
		/// <param name="fdoCache">The FDO cache</param>
		/// <param name="hvo">The HVO of the new writing system</param>
		/// <param name="icuLocale">The ICU locale</param>
		/// <param name="wsHvos">Array of writing system codes for the names of this new
		/// writing system.</param>
		/// <param name="names">Array of names for this writing system. Each member of this
		/// array is the name of the writing system in the corresponding language/ws in
		/// <paramref name="wsHvos"/></param>
		/// <returns>A new writing system object</returns>
		/// ------------------------------------------------------------------------------------
		public LgWritingSystem CreateWritingSystem(FdoCache fdoCache, int hvo, string icuLocale,
			int[] wsHvos, string[] names)
		{
			CheckDisposed();
			LgWritingSystem ws = new LgWritingSystem(fdoCache, hvo);
			ws.ICULocale = icuLocale;
			System.Diagnostics.Debug.Assert(wsHvos.Length == names.Length);

			for (int i = 0; i < wsHvos.Length; i++)
			{
				fdoCache.SetMultiUnicodeAlt(hvo,
					(int)LgWritingSystem.LgWritingSystemTags.kflidName, wsHvos[i],
					names[i]);
				if (Cache.LanguageWritingSystemFactoryAccessor.BypassInstall)
				{
					IWritingSystem lgws = Cache.LanguageWritingSystemFactoryAccessor.get_EngineOrNull(hvo);
					string displayName = lgws.get_Name(wsHvos[i]);
					if (String.IsNullOrEmpty(displayName))
						lgws.set_Name(wsHvos[i], names[i]);
					lgws.Dirty = false;
				}
			}

			return ws;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:39,代码来源:InMemoryFdoCache.cs


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