/// <summary> /// Start a named section /// </summary> /// <param name="heading">The title of the section</param> public void StartSection(string heading) { textBox.SelectionFont = HeaderFonts[Math.Max(0, Math.Min(HeaderFont, HeaderFonts.GetUpperBound(0)))]; textBox.SelectedText = heading + "\n"; ++HeaderFont; textBox.SelectionIndent += indent; }
/// <summary> /// Add a section to the debug output /// </summary> /// <param name="heading">The heading for the section</param> /// <param name="text">The body of the section</param> public void AddSection(string heading, string text) { textBox.SelectionFont = HeaderFonts[Math.Max(0, Math.Min(HeaderFont, HeaderFonts.GetUpperBound(0)))]; textBox.SelectedText = heading + "\n"; textBox.SelectionFont = body; textBox.SelectionIndent += indent; textBox.SelectedText = text + "\n\n"; textBox.SelectionIndent -= indent; }