public override void Update() { Contents.Clear(); var hh = new HeaderHelper(); Search(Base, hh); base.Update(); }
/// <summary> /// Updates the table of contents. /// </summary> public override void Update() { this.Contents.Clear(); var hh = new HeaderHelper(); this.AppendHeaders(this.Base, hh); base.Update(); }
/// <summary> /// The update. /// </summary> public override void Update() { this.Contents.Clear(); var hh = new HeaderHelper(); this.Search(this.Base, hh); base.Update(); }
private void Search(ReportItem item, HeaderHelper hh) { var h = item as Header; if (h != null) { h.Chapter = hh.GetHeader(h.Level); Contents.Add(new ContentItem() { Chapter = h.Chapter, Title = h.Text }); } foreach (var c in item.Children) Search(c,hh); }
/// <summary> /// Appends headers (recursively) to the <see cref="Contents" /> of the object. /// </summary> /// <param name="item">The item.</param> /// <param name="hh">The header formatter.</param> private void AppendHeaders(ReportItem item, HeaderHelper hh) { var h = item as Header; if (h != null) { h.Chapter = hh.GetHeader(h.Level); this.Contents.Add(new ContentItem { Chapter = h.Chapter, Title = h.Text }); } foreach (var c in item.Children) { this.AppendHeaders(c, hh); } }
/// <summary> /// The search. /// </summary> /// <param name="item"> /// The item. /// </param> /// <param name="hh"> /// The hh. /// </param> private void Search(ReportItem item, HeaderHelper hh) { var h = item as Header; if (h != null) { h.Chapter = hh.GetHeader(h.Level); this.Contents.Add(new ContentItem { Chapter = h.Chapter, Title = h.Text }); } foreach (var c in item.Children) { this.Search(c, hh); } }