/// <summary> /// Appends the specified text to the last line of text. /// </summary> /// <param name="text"></param> public static void ShowAppendedText(RichTextBox textBox, string text, bool addLeadingSpace, bool includeNewLine) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayAppendedText(text, addLeadingSpace, includeNewLine); }
/// <summary> /// Displays the values in a data table in the specified rich text box. /// </summary> public static void ShowDataTable(RichTextBox textBox, DataTable dataTable, bool displayRowState) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayDataTable(dataTable, displayRowState); }
/// <summary> /// Displays text formatted as JSON. /// </summary> public static void ShowJsonText(RichTextBox textBox, string jsonText, int rootIndentLevel, string title, params object[] titleArgs) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayJsonText(jsonText, rootIndentLevel, title, titleArgs); }
/// <summary> /// Displays the details of an object - either a single object or an enumeration of objects /// - in the specified rich text box. /// </summary> public static void ShowObject(RichTextBox textBox, object obj, int rootIndentLevel, string title, params object[] titleArgs) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayObject(obj, rootIndentLevel, title, titleArgs); }
/// <summary> /// Displays the specified text as a numbered paragraph, of the form "n) text", where n /// is the paragraph number. /// </summary> public static void ShowNumberedText(RichTextBox textBox, int number, int indentLevel, string text, bool wrapText, params object[] args) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayNumberedText(number, indentLevel, text, wrapText, args); }
/// <summary> /// Displays the specified text indented by the specified number of tabs. Similar to /// DisplayIndentedText but if the text is of the form "header: text" then the header may /// be formatted differently from the remaining text. /// </summary> public static void ShowHeadedText(RichTextBox textBox, int indentLevel, string text, bool wrapText, bool includeNewLine, params object[] args) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayHeadedText(indentLevel, text, wrapText, includeNewLine, args); }
/// <summary> /// Displays the details of an exception in the specified rich text box. /// </summary> public static void ShowException(RichTextBox textBox, int indentLevel, Exception exception) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplayException(indentLevel, exception); }
/// <summary> /// Displays the specified text with a single underline. /// </summary> public static void ShowSubTitle(RichTextBox textBox, string titleText) { RichTextBoxDisplayHelper viewer = new RichTextBoxDisplayHelper(textBox); viewer.DisplaySubTitle(titleText); }