/// ------------------------------------------------------------------------------------ /// <summary> /// Insert a new note 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 to which annotation refers</param> /// <param name="endObject">id of ending object to which annotation refers</param> /// <param name="guidNoteType">The GUID representing the CmAnnotationDefn to use for /// the type</param> /// <param name="startOffset">The starting character offset.</param> /// <param name="endOffset">The ending character offset.</param> /// <param name="bldrQuote">Para builder to use to build the Quote paragraph</param> /// <param name="bldrDiscussion">Para builder to use to build the Discussion /// paragraph</param> /// <param name="bldrRecommendation">Para builder to use to build the /// Recommendation paragraph</param> /// <param name="bldrResolution">Para builder to use to build the Resolution /// paragraph</param> /// <param name="insertIndex">index where annotation is to be inserted into /// annotation list</param> /// <returns>note inserted into annotation list</returns> /// ------------------------------------------------------------------------------------ public IScrScriptureNote InsertNote(BCVRef startRef, BCVRef endRef, ICmObject beginObject, ICmObject endObject, Guid guidNoteType, int startOffset, int endOffset, StTxtParaBldr bldrQuote, StTxtParaBldr bldrDiscussion, StTxtParaBldr bldrRecommendation, StTxtParaBldr bldrResolution, int insertIndex) { IScrScriptureNote annotation = new ScrScriptureNote(); NotesOS.Insert(insertIndex, annotation); // Initialize the annotation. ((ScrScriptureNote)annotation).InitializeNote(guidNoteType, startRef, endRef, beginObject, endObject, startOffset, endOffset, bldrQuote, bldrDiscussion, bldrRecommendation, bldrResolution); annotation.SourceRA = annotation.AnnotationType == NoteType.CheckingError ? m_cache.LangProject.DefaultComputerAgent : m_cache.LangProject.DefaultUserAgent; return(annotation); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Insert a new note 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 to which annotation refers</param> /// <param name="endObject">id of ending object to which annotation refers</param> /// <param name="guidNoteType">The GUID representing the CmAnnotationDefn to use for /// the type</param> /// <param name="startOffset">The starting character offset.</param> /// <param name="endOffset">The ending character offset.</param> /// <param name="bldrQuote">Para builder to use to build the Quote paragraph</param> /// <param name="bldrDiscussion">Para builder to use to build the Discussion /// paragraph</param> /// <param name="bldrRecommendation">Para builder to use to build the /// Recommendation paragraph</param> /// <param name="bldrResolution">Para builder to use to build the Resolution /// paragraph</param> /// <param name="insertIndex">index where annotation is to be inserted into /// annotation list</param> /// <returns>note inserted into annotation list</returns> /// ------------------------------------------------------------------------------------ public IScrScriptureNote InsertNote(BCVRef startRef, BCVRef endRef, ICmObject beginObject, ICmObject endObject, Guid guidNoteType, int startOffset, int endOffset, StTxtParaBldr bldrQuote, StTxtParaBldr bldrDiscussion, StTxtParaBldr bldrRecommendation, StTxtParaBldr bldrResolution, int insertIndex) { IScrScriptureNote annotation = new ScrScriptureNote(); NotesOS.Insert(insertIndex, annotation); // Initialize the annotation. ((ScrScriptureNote)annotation).InitializeNote(guidNoteType, startRef, endRef, beginObject, endObject, startOffset, endOffset, bldrQuote, bldrDiscussion, bldrRecommendation, bldrResolution); annotation.SourceRA = annotation.AnnotationType == NoteType.CheckingError ? m_cache.LangProject.DefaultComputerAgent : m_cache.LangProject.DefaultUserAgent; return annotation; }