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


C# SharedScrUtils.BCVRef类代码示例

本文整理汇总了C#中SILUBS.SharedScrUtils.BCVRef的典型用法代码示例。如果您正苦于以下问题:C# BCVRef类的具体用法?C# BCVRef怎么用?C# BCVRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BCVRef类属于SILUBS.SharedScrUtils命名空间,在下文中一共展示了BCVRef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FootnoteHashEntry

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="startRef">The start reference at the position where the footnote ORC is
		/// in the vernacular text</param>
		/// <param name="endRef">The end reference at the position where the footnote ORC is in
		/// the vernacular text (can be different from start ref because of verse bridges).
		/// </param>
		/// <param name="hvo">The ID of the paragraph containing the ORC for the footnote. This
		/// could also be the last paragraph where it was found if it is in the process of
		/// being deleted (in which case ORCs may still exist in the corresponding back
		/// translations).</param>
		/// ------------------------------------------------------------------------------------
		public FootnoteHashEntry(BCVRef startRef, BCVRef endRef, int hvo)
		{
			m_startRef = new BCVRef(startRef);
			m_endRef = new BCVRef(endRef);
			m_hvoPara = hvo;
			m_fFound = true;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:21,代码来源:ScrFootnote.cs

示例2: InsertErrorAnnotation

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Insert a new check result annotation at its correct position in the list.
		/// </summary>
		/// <param name="startRef">beginning reference note refers to</param>
		/// <param name="endRef">ending reference note refers to</param>
		/// <param name="beginObject">id of beginning object note refers to</param>
		/// <param name="endObject">id of ending object note refers to</param>
		/// <param name="checkId">The check id.</param>
		/// <param name="bldrQuote">Para builder to use for the cited text paragraph</param>
		/// <param name="bldrDiscussion">Para builder to use to build the Discussion
		/// paragraph</param>
		/// <returns>note inserted into annotation list</returns>
		/// ------------------------------------------------------------------------------------
		public IScrScriptureNote InsertErrorAnnotation(BCVRef startRef, BCVRef endRef,
			ICmObject beginObject, ICmObject endObject, Guid checkId,
			StTxtParaBldr bldrQuote, StTxtParaBldr bldrDiscussion)
		{
			return InsertNote(startRef, endRef, beginObject, endObject, checkId, -1,
				0, 0, bldrQuote, bldrDiscussion, null, null, GetInsertIndexForRef(startRef));
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:21,代码来源:ScrScriptureNote.cs

示例3: SendFocusMessage

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Notify all Santa Fe windows that a Scripture Reference focus change has occured.
		/// </summary>
		/// <param name="sRef">The string representation of the reference (e.g. MAT 1:1)</param>
		/// ------------------------------------------------------------------------------------
		public static void SendFocusMessage(string sRef)
		{
			BCVRef bcvRef = new BCVRef(sRef);
			if (!bcvRef.Valid)
				return;
			s_SantaFeRefKey.SetValue(null, sRef);
			PostMessage(new IntPtr(-1), s_FocusMsg, (uint)FocusTypes.ScriptureReferenceFocus, 0);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:14,代码来源:SantaFeFocusMessageHandler.cs

示例4: GetFirstNoteForReference

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Get the first annotation in the list that covers the specified reference.
		/// </summary>
		/// <param name="reference">Scripture reference to seek</param>
		/// <returns>The first note for the specified reference, if any; otherwise null</returns>
		/// ------------------------------------------------------------------------------------
		public IScrScriptureNote GetFirstNoteForReference(BCVRef reference)
		{
			foreach (IScrScriptureNote note in NotesOS)
			{
				if (note.BeginRef <= reference && note.EndRef >= reference)
					return note;
			}
			return null;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:16,代码来源:ScrScriptureNote.cs

示例5: SegmentInfo

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:SegmentInfo"/> class.
		/// </summary>
		/// <param name="sMarker">The segment marker.</param>
		/// <param name="sText">The segment text.</param>
		/// <param name="domain">The import domain.</param>
		/// <param name="reference">The current Scripture reference.</param>
		/// <param name="ws">The writing system (-1 to indicate the default WS).</param>
		/// ------------------------------------------------------------------------------------
		internal SegmentInfo(string sMarker, string sText, ImportDomain domain,
			BCVRef reference, int ws)
		{
			m_sMarker = sMarker;
			m_sText = sText;
			m_domain = domain;
			m_ref = reference;
			m_ws = ws;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:19,代码来源:TeImportManagerTests.cs

示例6: BtFootnoteBldrInfo

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="ws"></param>
		/// <param name="bldr"></param>
		/// <param name="styleId"></param>
		/// <param name="ichOffset"></param>
		/// <param name="reference"></param>
		/// ------------------------------------------------------------------------------------
		public BtFootnoteBldrInfo(int ws, ITsStrBldr bldr, string styleId, int ichOffset,
			BCVRef reference)
		{
			this.ws = ws;
			this.bldr = bldr;
			this.styleId = styleId;
			this.ichOffset = ichOffset;
			this.reference = new BCVRef(reference);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:19,代码来源:TeImport.cs

示例7: VerifyParaDiff

		/// <summary>overload for same end ref</summary>
		public static void VerifyParaDiff(Difference diff,
			BCVRef startAndEnd, DifferenceType type,
			StTxtPara paraCurr, int ichMinCurr, int ichLimCurr,
			StTxtPara paraRev, int ichMinRev, int ichLimRev)
		{
			VerifyParaDiff(diff, startAndEnd, startAndEnd, type,
				paraCurr, ichMinCurr, ichLimCurr,
				paraRev, ichMinRev, ichLimRev);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:10,代码来源:DiffTestHelper.cs

示例8: SCTextSegment

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="SCTextSegment"/> class.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public SCTextSegment(string text, string marker, string literalVerse,
			BCVRef firstRef, BCVRef lastRef, string filename, int lineNumber)
		{
			m_marker = marker;
			m_text = text;
			m_firstRef = new BCVRef(firstRef);
			m_lastRef = new BCVRef(lastRef);
			m_filename = filename;
			m_lineNumber = lineNumber;
			m_literalVerse = literalVerse;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:16,代码来源:SCTextSegment.cs

示例9: DummyPictureCheckingToken

		public DummyPictureCheckingToken(ICmObject obj, int ws, string icuLocale)
		{
			m_startRef = m_endRef = new BCVRef(1, 3, 34);
			m_fNoteStart = false;
			m_fParagraphStart = false;
			m_icuLocale = icuLocale;
			m_object = obj;
			m_sText = "La biblioteque in Monroe";
			m_paraStyleName = ScrStyleNames.Figure;
			m_textType = TextType.Other;
			Ws = ws;
			m_flid = CmPictureTags.kflidCaption;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:13,代码来源:FdoScriptureTests.cs

示例10: GetInsertIndexForRef

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Gets the insert index where a new annotation is inserted when the annotation's
		/// reference is that specified. The index will be at the end of those for the
		/// specified reference.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private int GetInsertIndexForRef(BCVRef startRef)
		{
			IFdoOwningSequence<IScrScriptureNote> notes = NotesOS;

			for (int i = notes.Count - 1; i >= 0; i--)
			{
				IScrScriptureNote note = notes[i];
				if (note.BeginRef <= startRef)
					return i + 1;
			}

			return 0;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:20,代码来源:ScrScriptureNote.cs

示例11: DummyParaCheckingToken

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DummyParaCheckingToken"/> class.
		/// </summary>
		/// <param name="obj">The obj.</param>
		/// <param name="ws">The writing system</param>
		/// <param name="paraOffset">The para offset.</param>
		/// <param name="startRef">The start reference.</param>
		/// <param name="endRef">The end reference.</param>
		/// ------------------------------------------------------------------------------------
		public DummyParaCheckingToken(ICmObject obj, int ws, int paraOffset,
			BCVRef startRef, BCVRef endRef)
		{
			m_startRef = startRef;
			m_endRef = endRef;
			m_fNoteStart = false;
			m_fParagraphStart = false;
			m_icuLocale = null;
			m_object = obj;
			m_sText = "This is lousy text and it is bad, it is";
			m_paraStyleName = ScrStyleNames.NormalParagraph;
			m_textType = TextType.Verse;
			Ws = ws;
			m_flid = (int)StTxtPara.StTxtParaTags.kflidContents;
			m_paraOffset = paraOffset;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:26,代码来源:FdoScriptureTests.cs

示例12: TextEnum

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create a text segment enumerator for importing a project
		/// </summary>
		/// <param name="firstRef">start reference for importing</param>
		/// <param name="lastRef">end reference for importing</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public ISCTextEnum TextEnum(BCVRef firstRef, BCVRef lastRef)
		{
			try
			{
				if (m_encConverters == null)
					m_encConverters = new EncConverters();
			}
			catch (DirectoryNotFoundException ex)
			{
				string message = string.Format(ScriptureUtilsException.GetResourceString(
						"kstidEncConverterInitError"), ex.Message);
				throw new EncodingConverterException(message,
					"/Beginning_Tasks/Import_Standard_Format/Unable_to_Import/Encoding_converter_not_found.htm");
			}

			// get the enumerator that will return text segments
			return new SCTextEnum(m_settings, m_domain, firstRef, lastRef, m_encConverters);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:26,代码来源:SCScriptureText.cs

示例13: Initialize

		public override void Initialize()
		{
			base.Initialize();

			m_styleSheet = new FwStyleSheet();
			m_styleSheet.Init(Cache, m_scr.Hvo, (int)Scripture.ScriptureTags.kflidStyles);
			InitWsInfo();

			DummyTeImporter.s_translatorNoteDefn = m_scrInMemoryCache.m_translatorNoteDefn;
			DummyTeImporter.s_consultantNoteDefn = m_scrInMemoryCache.m_consultantNoteDefn;

			m_titus = new BCVRef(56001001);
			m_settings = new DummyScrImportSet();
			m_scr.ImportSettingsOC.Add(m_settings);
			m_settings.ImportTypeEnum = TypeOfImport.Other;
			m_settings.StartRef = m_titus;
			m_settings.EndRef = m_titus;
			m_settings.ImportTranslation = true;
			InitializeImportSettings();

			m_importer = new DummyTeImporter(m_settings, Cache, m_styleSheet, m_scrInMemoryCache);
			m_importer.Initialize();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:23,代码来源:TeImportTestsBase.cs

示例14: ValidBCVRefs

		public void ValidBCVRefs()
		{
			BCVRef bcvRef = new BCVRef(1, 2, 3, 0);
			Assert.IsTrue(bcvRef.Valid);
			Assert.AreEqual(1002003, (int)bcvRef);
			Assert.AreEqual(1, bcvRef.Book);
			Assert.AreEqual(2, bcvRef.Chapter);
			Assert.AreEqual(3, bcvRef.Verse);

			bcvRef = new BCVRef(4005006);
			Assert.IsTrue(bcvRef.Valid);
			Assert.AreEqual(4005006, (int)bcvRef);
			Assert.AreEqual(4, bcvRef.Book);
			Assert.AreEqual(5, bcvRef.Chapter);
			Assert.AreEqual(6, bcvRef.Verse);

			bcvRef = new BCVRef();
			Assert.IsFalse(bcvRef.Valid);
			Assert.AreEqual(0, (int)bcvRef);
			Assert.AreEqual(0, bcvRef.Book);
			Assert.AreEqual(0, bcvRef.Chapter);
			Assert.AreEqual(0, bcvRef.Verse);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:23,代码来源:BCVRefTests.cs

示例15: SCTextEnum

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="SCTextEnum"/> class.
		/// </summary>
		/// <param name="settings">The import settings</param>
		/// <param name="domain">The source domain</param>
		/// <param name="startRef">first reference to retrieve</param>
		/// <param name="endRef">last reference to retrieve</param>
		/// <param name="encConverters">The encoding converters repository</param>
		/// ------------------------------------------------------------------------------------
		public SCTextEnum(IScrImportSet settings, ImportDomain domain,
			BCVRef startRef, BCVRef endRef, IEncConverters encConverters)
		{
			m_settings = settings;
			m_domain = domain;
			m_startRef = new BCVRef(startRef);
			m_endRef = new BCVRef(endRef);
			m_mappingSet = m_settings.GetMappingSetForDomain(domain);

			// Gets the set of encoding converters
			m_encConverters = encConverters;

			// make a list of all of the begin and end markers for inline markers
			// Also build the map of encoding converters
			m_InlineBeginAndEndMarkers = new List<string>();
			foreach (ImportMappingInfo mapping in m_settings.GetMappingListForDomain(domain))
			{
				if (mapping.IsInline || m_settings.ImportTypeEnum == TypeOfImport.Paratext5)
				{
					m_InlineBeginAndEndMarkers.Add(mapping.BeginMarker);
					if (mapping.IsInline)
						m_InlineBeginAndEndMarkers.Add(mapping.EndMarker);
				}
			}

			m_InlineBeginAndEndMarkers.Sort(new StrLengthComparer(false));

			// Build a list of all of the characters that inline markers start with
			Set<char> tempCharList = new Set<char>();
			foreach (string marker in m_InlineBeginAndEndMarkers)
				tempCharList.Add(marker[0]); // Set ignores duplicates.

			m_InlineMarkerStartChars = tempCharList.ToArray();
			// Get the import file source that will provide the files to import.
			m_importSource = settings.GetImportFiles(domain);
			m_importSourceEnum = m_importSource.GetEnumerator();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:47,代码来源:SCTextEnum.cs


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