本文整理汇总了C#中IVwEnv.SetParagraphMark方法的典型用法代码示例。如果您正苦于以下问题:C# IVwEnv.SetParagraphMark方法的具体用法?C# IVwEnv.SetParagraphMark怎么用?C# IVwEnv.SetParagraphMark使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwEnv
的用法示例。
在下文中一共展示了IVwEnv.SetParagraphMark方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertEndOfParaMarks
/// ------------------------------------------------------------------------------------
/// <summary>
/// Insert end of paragraph marks if needed.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="paraHvo"></param>
/// ------------------------------------------------------------------------------------
protected override void InsertEndOfParaMarks(IVwEnv vwenv, int paraHvo)
{
if (Options.ShowFormatMarksSetting && m_target == LayoutViewTarget.targetDraft)
{
IStPara para = m_cache.ServiceLocator.GetInstance<IStParaRepository>().GetObject(paraHvo);
// If this is the last paragraph of a section then insert an
// end of section mark, otherwise insert a paragraph mark.
VwBoundaryMark boundaryMark = (para.IsFinalParaInText) ?
VwBoundaryMark.endOfSection : VwBoundaryMark.endOfParagraph;
vwenv.SetParagraphMark(boundaryMark);
int flid = m_cache.ServiceLocator.GetInstance<Virtuals>().StParaIsFinalParaInText;
vwenv.NoteDependency(new [] { paraHvo}, new [] { flid}, 1);
}
}
示例2: InsertEndOfParaMarks
/// ------------------------------------------------------------------------------------
/// <summary>
/// Insert end of paragraph marks if needed.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvoPara"></param>
/// ------------------------------------------------------------------------------------
protected override void InsertEndOfParaMarks(IVwEnv vwenv, int hvoPara)
{
if (Options.ShowFormatMarksSetting && m_target == LayoutViewTarget.targetDraft)
{
// Set up for an end mark.
// If this is the last paragraph of a section then insert an
// end of section mark, otherwise insert a paragraph mark.
VwBoundaryMark boundaryMark;
StTxtPara para = new StTxtPara(m_cache, hvoPara);
StText text = new StText(m_cache, para.OwnerHVO);
int[] paraArray = text.ParagraphsOS.HvoArray;
if (hvoPara == paraArray[paraArray.Length - 1])
boundaryMark = VwBoundaryMark.endOfSection; // "§"
else
boundaryMark = VwBoundaryMark.endOfParagraph; // "¶"
vwenv.SetParagraphMark(boundaryMark);
}
}
示例3: InsertEndOfParaMarks
/// ------------------------------------------------------------------------------------
/// <summary>
/// Insert end of paragraph or section marks, if needed. Highlight the markers if
/// they are part of a diff range in a paragraph split, merge or structure change.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="paraHvo"></param>
/// ------------------------------------------------------------------------------------
protected override void InsertEndOfParaMarks(IVwEnv vwenv, int paraHvo)
{
IStTxtPara para = m_cache.ServiceLocator.GetInstance<IStTxtParaRepository>().GetObject(paraHvo);
Difference rootDiff = m_Differences.CurrentDifference;
bool fParaNeedsBoundaryHighlight = NeedsBoundaryHighlight(rootDiff, para);
if (m_target == LayoutViewTarget.targetDraft && fParaNeedsBoundaryHighlight)
{
// Set up for an end mark.
// If this is the last paragraph of a section then insert an
// end of section mark, otherwise insert a paragraph mark.
VwBoundaryMark boundaryMark;
IFdoOwningSequence<IStPara> paraArray = ((IStText)para.Owner).ParagraphsOS;
if (para == paraArray[paraArray.Count - 1])
boundaryMark = VwBoundaryMark.endofSectionHighlighted; // "§"
else
boundaryMark = VwBoundaryMark.endOfParagraphHighlighted; // "¶"
vwenv.SetParagraphMark(boundaryMark);
}
}
示例4: InsertEndOfParaMarks
/// ------------------------------------------------------------------------------------
/// <summary>
/// Insert end of paragraph or section marks, if needed. Highlight the markers if
/// they are part of a diff range in a paragraph split, merge or structure change.
/// </summary>
/// <param name="vwenv"></param>
/// <param name="hvoPara"></param>
/// ------------------------------------------------------------------------------------
protected override void InsertEndOfParaMarks(IVwEnv vwenv, int hvoPara)
{
Difference rootDiff = m_Differences.CurrentDifference;
bool fParaNeedsBoundaryHighlight = NeedsBoundaryHighlight(rootDiff, hvoPara);
if (m_target == LayoutViewTarget.targetDraft && fParaNeedsBoundaryHighlight)
{
// Set up for an end mark.
// If this is the last paragraph of a section then insert an
// end of section mark, otherwise insert a paragraph mark.
VwBoundaryMark boundaryMark;
StTxtPara para = new StTxtPara(m_cache, hvoPara);
StText text = new StText(m_cache, para.OwnerHVO);
int[] paraArray = text.ParagraphsOS.HvoArray;
if (hvoPara == paraArray[paraArray.Length - 1])
{
boundaryMark = fParaNeedsBoundaryHighlight ? VwBoundaryMark.endofSectionHighlighted :
VwBoundaryMark.endOfSection; // "§"
}
else
{
boundaryMark = fParaNeedsBoundaryHighlight ? VwBoundaryMark.endOfParagraphHighlighted :
VwBoundaryMark.endOfParagraph; // "¶"
}
vwenv.SetParagraphMark(boundaryMark);
}
}