예제 #1
0
 public void FormatInline(FlowDocument doc, Inline inline, StringBuilder buf, int indent)
 {
     // indent
      buf.Append (' ', indent);
      buf.AppendFormat (
     "{0} {1} to {2}",
     inline.GetType ().Name + inline.GetHashCode (),
     inline.ContentStart.CompareTo (doc.ContentStart),
     inline.ContentEnd.CompareTo (doc.ContentStart));
      if (inline is Run)
      {
     buf.Append ("  \"" + ((Run)inline).Text + "\"");
      }
      buf.AppendLine ();
      if (inline is Underline)
      {
     FormatInlines (doc, ((Underline)inline).Inlines,  buf, indent + 3);
      }
      if (inline is Italic)
      {
     FormatInlines (doc, ((Italic)inline).Inlines,  buf, indent + 3);
      }
 }