Exemplo n.º 1
0
        private string GetTextFromBlockElements(bool includeVerseNumbers, bool includeAnnotations = false)
        {
            StringBuilder bldr = new StringBuilder();

            foreach (var blockElement in BlockElements)
            {
                Verse verse = blockElement as Verse;
                if (verse != null)
                {
                    if (includeVerseNumbers)
                    {
                        bldr.Append("{");
                        bldr.Append(verse.Number);
                        bldr.Append("}\u00A0");
                    }
                }
                else
                {
                    ScriptText text = blockElement as ScriptText;
                    if (text != null)
                    {
                        bldr.Append(text.Content);
                    }
                    else if (includeAnnotations)
                    {
                        ScriptAnnotation annotation = blockElement as ScriptAnnotation;
                        if (annotation != null)
                        {
                            bldr.Append(annotation.ToDisplay());
                        }
                    }
                }
            }

            return(bldr.ToString());
        }
Exemplo n.º 2
0
 public VerseAnnotation(BCVRef verse, ScriptAnnotation annotation, int offset)
 {
     m_verse      = verse;
     m_annotation = annotation;
     m_offset     = offset;
 }