////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public static SyntaxHighlight SyntaxHighlightBlock(string text, HashSet<string> classes, Font font = null)
        ///
        /// \brief Syntax highlight block.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 10/12/2017
        ///
        /// \param text     (string) - The text.
        /// \param classes  (HashSet&lt;string&gt;) - The classes.
        /// \param font    (Optional)  (Font) - The font.
        ///
        /// \return A SyntaxHighlight.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public static SyntaxHighlight SyntaxHighlightBlock(string text, HashSet <string> classes, Font font = null)
        {
            SyntaxHighlight syntaxHighlight = new SyntaxHighlight(text, classes);

            font.SetFont(syntaxHighlight);
            return(syntaxHighlight);
        }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public static SyntaxHighlight SyntaxHighlightBlock(string text, HashSet<string> classes, Font font = null)
        ///
        /// \brief Syntax highlight block.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 10/12/2017
        ///
        /// \param text     (string) - The text.
        /// \param classes  (HashSet&lt;string&gt;) - The classes.
        /// \param font    (Optional)  (Font) - The font.
        ///
        /// \return A SyntaxHighlight.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public static SyntaxHighlight SyntaxHighlightBlock(string text, HashSet <string> classes, Font font = null)
        {
            SyntaxHighlight syntaxHighlight = new SyntaxHighlight(text, classes);

            if (font is null)
            {
                font = new Font();
            }
            font.fontSize = 12;
            font.SetFont(syntaxHighlight);
            return(syntaxHighlight);
        }