本文整理汇总了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;
}