本文整理汇总了C#中ITsString.get_WritingSystemAt方法的典型用法代码示例。如果您正苦于以下问题:C# ITsString.get_WritingSystemAt方法的具体用法?C# ITsString.get_WritingSystemAt怎么用?C# ITsString.get_WritingSystemAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITsString
的用法示例。
在下文中一共展示了ITsString.get_WritingSystemAt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
/// <summary>
/// Create a new sense and add it to the given entry.
/// </summary>
/// <param name="entry"></param>
/// <param name="sandboxMSA"></param>
/// <param name="gloss"></param>
/// <returns></returns>
public ILexSense Create(ILexEntry entry, SandboxGenericMSA sandboxMSA, ITsString gloss)
{
var sense = new LexSense();
entry.SensesOS.Add(sense);
sense.SandboxMSA = sandboxMSA;
if (gloss != null)
{
sense.Gloss.set_String(gloss.get_WritingSystemAt(0), gloss);
}
return sense;
}
示例2: GetWsAtOffset
/// ------------------------------------------------------------------------------------
/// <summary>
/// Get the ws at the given (ich) char offset in the tss.
/// </summary>
/// <param name="tss">The TSS.</param>
/// <param name="ich">char offset</param>
/// ------------------------------------------------------------------------------------
public static int GetWsAtOffset(ITsString tss, int ich)
{
return tss == null ? 0 : tss.get_WritingSystemAt(ich);
}
示例3: GetInspectorObjectsForUniRuns
/// ------------------------------------------------------------------------------------
/// <summary>
/// Condenses the 'Run' information for MultiUnicodeAccessor entries because
/// there will only be 1 run,
/// </summary>
/// ------------------------------------------------------------------------------------
protected virtual List<IInspectorObject> GetInspectorObjectsForUniRuns(ITsString obj, IInspectorObject ioParent, int level)
{
List<IInspectorObject> list = new List<IInspectorObject>();
if (obj != null)
{
IInspectorObject ino = CreateInspectorObject(obj, ioParent.OwningObject, ioParent, level);
ino.DisplayName = "Writing System";
ino.DisplayValue = obj.get_WritingSystemAt(0).ToString();
ino.HasChildren = false;
list.Add(ino);
TsStringRunInfo tss = new TsStringRunInfo(0, obj, m_cache);
ino = CreateInspectorObject(tss, obj, ioParent, level);
ino.DisplayName = "Text";
ino.DisplayValue = tss.Text;
ino.HasChildren = false;
list.Add(ino);
}
return list;
}
示例4: SetTextBoxValue
private void SetTextBoxValue(ITsString tss, FwTextBox textBox, ComboBox comboBox, bool vern)
{
if (tss != null)
{
int ws = tss.get_WritingSystemAt(0);
comboBox.SelectedItem = m_cache.ServiceLocator.WritingSystemManager.Get(ws);
textBox.Tss = tss;
}
else
{
comboBox.SelectedItem = vern ? m_cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem
: m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem;
}
}
示例5: AddStringValue
protected void AddStringValue(FeatureSystem featSys, FeatureStruct fs, ITsString tss, string id)
{
if (tss != null)
{
var feat = featSys.GetFeature<StringFeature>(string.Format("{0}-{1}", id, tss.get_WritingSystemAt(0).ToString(CultureInfo.InvariantCulture)));
fs.AddValue(feat, tss.Text);
}
}