本文整理汇总了C#中IVwEnv.AddUnicodeProp方法的典型用法代码示例。如果您正苦于以下问题:C# IVwEnv.AddUnicodeProp方法的具体用法?C# IVwEnv.AddUnicodeProp怎么用?C# IVwEnv.AddUnicodeProp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwEnv
的用法示例。
在下文中一共展示了IVwEnv.AddUnicodeProp方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Display
//.........这里部分代码省略.........
case kfragSingleInterlinearAnalysisWithLabels:
/*
// This puts ten points between segments. There's always 5 points below each line of interlinear;
// if there are no freeform annotations another 5 points makes 10 between segments.
// If there are freeforms, we need the full 10 points after the last of them.
int cfreeform = vwenv.get_DataAccess().get_VecSize(hvo, ktagSegFF);
vwenv.set_IntProperty((int)FwTextPropType.ktptMarginBottom,
(int)FwTextPropVar.ktpvMilliPoint, cfreeform == 0 ? 5000 : 10000);
*/
vwenv.OpenDiv();
DisplaySingleInterlinearAnalysisWithLabels(vwenv, hvo);
vwenv.CloseDiv();
break;
// This frag is used to display a single interlin analysis that is always left-aligned, even for RTL languages
case kfragSingleInterlinearAnalysisWithLabelsLeftAlign:
vwenv.OpenDiv();
vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading, (int)FwTextPropVar.ktpvMilliPoint, m_leftPadding);
vwenv.OpenParagraph();
vwenv.OpenInnerPile();
DisplaySingleInterlinearAnalysisWithLabels(vwenv, hvo);
vwenv.CloseInnerPile();
vwenv.CloseParagraph();
vwenv.CloseDiv();
break;
//case kfragDefaultSense: // Some default sense
// // NB: If the hvo is zero, then we need to go back to the normal missing sense display, after all.
// // (hvo isn't zero, even for cases where there isn't even a default value.)
// if (hvo > 0)
// {
// // Show default sense, in some other 'guess' color.
// SetGuessing(vwenv, false);
// foreach (int wsId in m_WsList.AnalysisWsIds)
// vwenv.AddStringAltMember(LexSenseTags.kflidGloss,
// wsId, this);
// }
// else
// {
// // Give up and show the missing sense row.
// vwenv.AddString(m_tssMissingSense);
// }
// break;
case kfragWordformForm: // The form of a WviWordform.
vwenv.AddStringAltMember(WfiWordformTags.kflidForm,
m_wsVernForDisplay, this);
break;
case kfragPrefix:
vwenv.AddUnicodeProp(MoMorphTypeTags.kflidPrefix, m_wsVernForDisplay, this);
break;
case kfragPostfix:
vwenv.AddUnicodeProp(MoMorphTypeTags.kflidPostfix, m_wsVernForDisplay, this);
break;
case kfragSenseName: // The name (gloss) of a LexSense.
foreach (int wsId in m_WsList.AnalysisWsIds)
vwenv.AddStringAltMember(LexSenseTags.kflidGloss,
wsId, this);
break;
case kfragCategory: // the category of a WfiAnalysis, a part of speech;
// display the Abbreviation property inherited from CmPossibility.
foreach(var wsId in m_WsList.AnalysisWsIds)
{
vwenv.AddStringAltMember(CmPossibilityTags.kflidAbbreviation, wsId, this);
}
break;
default:
if (frag >= kfragWordGlossWs && frag < kfragWordGlossWs + m_WsList.AnalysisWsIds.Length)
{
// Displaying one ws of the form of a WfiGloss.
int ws = m_WsList.AnalysisWsIds[frag - kfragWordGlossWs];
vwenv.AddStringAltMember(WfiGlossTags.kflidForm, ws, this);
}
else if (frag >= kfragLineChoices && frag < kfragLineChoices + m_lineChoices.Count)
{
var spec = m_lineChoices[frag - kfragLineChoices];
var ws = GetRealWsOrBestWsForContext(hvo, spec);
vwenv.AddStringAltMember(spec.StringFlid, ws, this);
}
else if (frag >= kfragAnalysisCategoryChoices && frag < kfragAnalysisCategoryChoices + m_lineChoices.Count)
{
AddAnalysisPos(vwenv, hvo, hvo, frag - kfragAnalysisCategoryChoices);
}
else if (frag >= kfragMorphFormChoices && frag < kfragMorphFormChoices + m_lineChoices.Count)
{
InterlinLineSpec spec = m_lineChoices[frag - kfragMorphFormChoices];
int wsActual = GetRealWsOrBestWsForContext(hvo, spec);
DisplayMorphForm(vwenv, hvo, wsActual);
}
else if (frag >= kfragSegFfChoices && frag < kfragSegFfChoices + m_lineChoices.Count)
{
AddFreeformComment(vwenv, hvo, frag - kfragSegFfChoices);
}
else
{
throw new Exception("Bad fragment ID in InterlinVc.Display");
}
break;
}
#if DEBUG
//TimeRecorder.End("Display");
#endif
}
示例2: Display
public override void Display(IVwEnv vwenv, int hvo, int frag)
{
vwenv.AddUnicodeProp(m_flid, m_wsDefault, this);
}
示例3: Display
//.........这里部分代码省略.........
// This frag is used to display a single interlin analysis that is always left-aligned, even for RTL languages
case kfragSingleInterlinearAnalysisWithLabelsLeftAlign:
vwenv.OpenDiv();
vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading, (int)FwTextPropVar.ktpvMilliPoint, m_leftPadding);
vwenv.OpenParagraph();
vwenv.OpenInnerPile();
DisplaySingleInterlinearAnalysisWithLabels(vwenv, hvo);
vwenv.CloseInnerPile();
vwenv.CloseParagraph();
vwenv.CloseDiv();
break;
//case kfragDefaultSense: // Some default sense
// // NB: If the hvo is zero, then we need to go back to the normal missing sense display, after all.
// // (hvo isn't zero, even for cases where there isn't even a default value.)
// if (hvo > 0)
// {
// // Show default sense, in some other 'guess' color.
// SetGuessing(vwenv, false);
// foreach (int wsId in m_WsList.AnalysisWsIds)
// vwenv.AddStringAltMember((int)LexSense.LexSenseTags.kflidGloss,
// wsId, this);
// }
// else
// {
// // Give up and show the missing sense row.
// vwenv.AddString(m_tssMissingSense);
// }
// break;
case kfragWordformForm: // The form of a WviWordform.
vwenv.AddStringAltMember((int)WfiWordform.WfiWordformTags.kflidForm,
m_wsCurrentWordBundleVern, this);
break;
case kfragPrefix:
vwenv.AddUnicodeProp((int)MoMorphType.MoMorphTypeTags.kflidPrefix, m_wsCurrentWordBundleVern, this);
break;
case kfragPostfix:
vwenv.AddUnicodeProp((int)MoMorphType.MoMorphTypeTags.kflidPostfix, m_wsCurrentWordBundleVern, this);
break;
case kfragSenseName: // The name (gloss) of a LexSense.
foreach (int wsId in m_WsList.AnalysisWsIds)
vwenv.AddStringAltMember((int)LexSense.LexSenseTags.kflidGloss,
wsId, this);
break;
case kfragCategory: // the category of a WfiAnalysis, a part of speech;
// display the Abbreviation property inherited from CmPossibility.
foreach(int wsId in m_WsList.AnalysisWsIds)
{
vwenv.AddStringAltMember(
(int)CmPossibility.CmPossibilityTags.kflidAbbreviation,
wsId, this);
}
break;
default:
if (frag >= kfragWordGlossWs && frag < kfragWordGlossWs + m_WsList.AnalysisWsIds.Length)
{
// Displaying one ws of the form of a WfiGloss.
int ws = m_WsList.AnalysisWsIds[frag - kfragWordGlossWs];
vwenv.AddStringAltMember((int)WfiGloss.WfiGlossTags.kflidForm, ws, this);
}
else if (frag >= kfragLineChoices && frag < kfragLineChoices + m_lineChoices.Count)
{
InterlinLineSpec spec = m_lineChoices[frag - kfragLineChoices];
int ws = GetRealWs(hvo, spec);
// The wrong value can be displayed in at least the LexGloss and WordCat fields,
// both of which are analysis fields (at least if vern and anal ws are the same).
// See LT-8682.