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


C# ITsString.get_IsRunOrc方法代码示例

本文整理汇总了C#中ITsString.get_IsRunOrc方法的典型用法代码示例。如果您正苦于以下问题:C# ITsString.get_IsRunOrc方法的具体用法?C# ITsString.get_IsRunOrc怎么用?C# ITsString.get_IsRunOrc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITsString的用法示例。


在下文中一共展示了ITsString.get_IsRunOrc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddOrcsInBaseLineToBldr

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Adds any ORCs that are found in the specified baseline string to the specified
		/// builder.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private static void AddOrcsInBaseLineToBldr(ITsStrBldr bldr, ITsString baseLine,
			int newOrcWs, bool appendOrc)
		{
			int insertedOrcCount = 0;
			for (int i = 0; i < baseLine.RunCount; i++)
			{
				if (baseLine.get_IsRunOrc(i))
				{
					// Copy the ORC making sure to change any owned footnotes to unowned and
					// changing the WS to the WS of the back translation.
					ITsPropsBldr propsBldr = baseLine.get_Properties(i).GetBldr();
					propsBldr.SetIntPropValues((int)FwTextPropType.ktptWs, 0, newOrcWs);
					int runContainingNewOrc = (appendOrc && bldr.Length > 0) ? bldr.RunCount :
						insertedOrcCount;
					int orcPos = appendOrc ? bldr.Length : insertedOrcCount;
					bldr.Replace(orcPos, orcPos, StringUtils.kszObject, propsBldr.GetTextProps());
					TsStringUtils.TurnOwnedOrcIntoUnownedOrc(bldr, runContainingNewOrc);
					insertedOrcCount++;
				}
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:27,代码来源:DataStoreInitializationServices.cs

示例2: IsLabelText

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Test whether a run in a TsString contains 'label' text which should cause a segment break.
		/// True if it has one of the interesting styles or the whole run is an ORC and
		/// fTreatOrcsAsLabels is true.
		/// Nb: this method won't detect hard line breaks. Hard line breaks are also forced
		/// (elsewhere) to be their own segment.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private static bool IsLabelText(ITsString tss, int irun, bool fTreatOrcsAsLabels)
		{
			return (IsLabelStyle(tss.Style(irun)) || (fTreatOrcsAsLabels && tss.get_IsRunOrc(irun)));
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:13,代码来源:ITextUtils.cs

示例3: CreatePuncFormsInSegmentForOrcs

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates punctuation form analyses for all of the ORCs in the specified baseLine string.
		/// </summary>
		/// <param name="segment">The segment to which we are going to add the analyses.</param>
		/// <param name="baseLine">The base line of the original segment from which we are moving
		/// the ORCs.</param>
		/// <param name="para">The paragraph that owns the given segment.</param>
		/// <param name="iInsertPos">Index (0-based) in the sequence of analyses where the ORC
		/// punctuation form(s) should be inserted.</param>
		/// ------------------------------------------------------------------------------------
		private static void CreatePuncFormsInSegmentForOrcs(ISegment segment, ITsString baseLine,
			IScrTxtPara para, int iInsertPos)
		{
			if (!para.SegmentsOS.Any(seg => seg.AnalysesRS.Count > 0))
				return;

			for (int i = 0; i < baseLine.RunCount; i++)
			{
				if (baseLine.get_IsRunOrc(i))
				{
					IPunctuationForm orcForm = para.Cache.ServiceLocator.GetInstance<IPunctuationFormFactory>().Create();
					orcForm.Form = baseLine.GetSubstring(baseLine.get_MinOfRun(i), baseLine.get_LimOfRun(i));
					segment.AnalysesRS.Insert(iInsertPos++, orcForm);
				}
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:27,代码来源:DataStoreInitializationServices.cs


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