本文整理汇总了C#中SIL.FieldWorks.FDO.Cellar.StTxtPara.GetTrans方法的典型用法代码示例。如果您正苦于以下问题:C# StTxtPara.GetTrans方法的具体用法?C# StTxtPara.GetTrans怎么用?C# StTxtPara.GetTrans使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SIL.FieldWorks.FDO.Cellar.StTxtPara
的用法示例。
在下文中一共展示了StTxtPara.GetTrans方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTransToMockedParagraph
/// ------------------------------------------------------------------------------------
/// <summary>
/// Add an empty translation of the specified type to the paragraph, or return the
/// existing one.
/// </summary>
/// <param name="owner">the owning paragraph</param>
/// <param name="transType">The type of translation to create</param>
/// <param name="wsTrans">The writing system of the translation</param>
/// <returns></returns>
/// ------------------------------------------------------------------------------------
public ICmTranslation AddTransToMockedParagraph(StTxtPara owner, Guid transType,
int wsTrans)
{
CheckDisposed();
ICmTranslation trans = owner.GetTrans(transType);
if (trans == null)
{
int hvo = m_cacheBase.NewHvo(CmTranslation.kClassId);
m_cacheBase.AppendToFdoVector(owner.Hvo,
(int)StTxtPara.StTxtParaTags.kflidTranslations, hvo);
m_cacheBase.SetBasicProps(hvo, owner.Hvo, (int)CmTranslation.kClassId,
(int)StTxtPara.StTxtParaTags.kflidTranslations, 1);
trans = new CmTranslation(Cache, hvo);
trans.TypeRA = m_lp.TranslationTagsOA.LookupPossibilityByGuid(transType);
}
trans.Translation.GetAlternative(wsTrans).Text = string.Empty;
return trans;
}