コード例 #1
0
        /// <summary>
        /// Displays text formatted as XML.
        /// </summary>
        public static void ShowXmlText(TextBoxBase textBox, string xmlText, int rootIndentLevel,
                                       string title, params object[] titleArgs)
        {
            TextBoxDisplayHelper viewer = new TextBoxDisplayHelper(textBox);

            viewer.DisplayXmlText(xmlText, rootIndentLevel, title, titleArgs);
        }
コード例 #2
0
        /// <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(TextBoxBase textBox, int number, int indentLevel,
                                            string text, bool wrapText, params object[] args)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayNumberedText(number, indentLevel, text, wrapText, args);
        }
コード例 #3
0
        /// <summary>
        /// Displays the details of an object - either a single object or an enumeration of objects
        /// - in the specified text box.
        /// </summary>
        /// <param name="simpleDataTypesOnly">If set then only displays the values of
        /// properties or fields which are value types or strings.  If cleared then displays the
        /// details of all properties and fields of the object.
        /// </param>
        /// <remarks>If simpleDataTypesOnly is set then properties and fields which are reference
        /// types will still be listed.  However, their members will not be displayed.</remarks>
        public static void ShowObject(TextBoxBase textBox, object obj, int rootIndentLevel,
                                      bool simpleDataTypesOnly, string title, params object[] titleArgs)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayObject(obj, rootIndentLevel, simpleDataTypesOnly, title, titleArgs);
        }
コード例 #4
0
        /// <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(TextBoxBase textBox, int indentLevel, string text,
                                          bool wrapText, bool includeNewLine, params object[] args)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayHeadedText(indentLevel, text, wrapText, includeNewLine, args);
        }
コード例 #5
0
        /// <summary>
        /// Appends the specified text to the last line of text.
        /// </summary>
        /// <param name="text"></param>
        public static void ShowAppendedText(TextBoxBase textBox, string text, bool addLeadingSpace,
                                            bool includeNewLine)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayAppendedText(text, addLeadingSpace, includeNewLine);
        }
コード例 #6
0
        /// <summary>
        /// Displays the values in a data table in the specified text box.
        /// </summary>
        public static void ShowDataTable(TextBoxBase textBox, DataTable dataTable,
                                         bool displayRowState)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayDataTable(dataTable, displayRowState);
        }
コード例 #7
0
        /// <summary>
        /// Displays the specified text with a single underline.
        /// </summary>
        public static void ShowSubTitle(TextBoxBase textBox, string titleText)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplaySubTitle(titleText);
        }
コード例 #8
0
        /// <summary>
        /// Displays the details of an exception in the specified text box.
        /// </summary>
        public static void ShowException(TextBoxBase textBox, int indentLevel, Exception exception)
        {
            TextBoxDisplayHelper objectViewer = new TextBoxDisplayHelper(textBox);

            objectViewer.DisplayException(indentLevel, exception);
        }