当前位置: 首页>>代码示例>>C#>>正文


C# IVwEnv.SetParagraphMark方法代码示例

本文整理汇总了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);
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:21,代码来源:TeStVc.cs

示例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);
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:26,代码来源:TeStVc.cs

示例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);
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:28,代码来源:DiffViewVc.cs

示例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);
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:35,代码来源:DiffViewVc.cs


注:本文中的IVwEnv.SetParagraphMark方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。