コード例 #1
0
 /// <summary>
 /// Creates the lexer from XML file used by the Notepad++ software.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla"/> which lexer style to set.</param>
 /// <param name="fileName">A file name to get the lexer type from.</param>
 /// <param name="definitionFile">A XML file to load the lexer style from.</param>
 /// <param name="useGlobalOverride">A flag indicating whether the style "Global override" should be set for the lexer from the XML document.</param>
 /// <param name="font">A flag indicating whether to use the defined font name from the XML document or not.</param>
 /// <returns><c>true</c> if the operation was successful, <c>false</c> otherwise.</returns>
 public static bool CreateLexerFromFile(Scintilla scintilla, string fileName, string definitionFile, bool useGlobalOverride, bool font)
 {
     return(CreateLexerFromFile(scintilla, LexerFileExtensions.LexerTypeFromFileName(fileName), definitionFile, useGlobalOverride, font, true, true, true));
 }
コード例 #2
0
 /// <summary>
 /// Creates the lexer for a given Scintilla class instance with a given language type enumeration.
 /// </summary>
 /// <param name="scintilla">A Scintilla class instance to set the lexer style for.</param>
 /// <param name="fileName">A file name to get the lexer type from.</param>
 /// <returns>True if the given lexer was found; otherwise false (a work in progress).</returns>
 public static bool CreateLexer(Scintilla scintilla, string fileName)
 {
     return(CreateLexer(scintilla, LexerFileExtensions.LexerTypeFromFileName(fileName)));
 }
コード例 #3
0
 /// <summary>
 /// Creates the lexer from XML file used by the Notepad++ software.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla"/> which lexer style to set.</param>
 /// <param name="fileName">A file name to get the lexer type from.</param>
 /// <param name="definitionFile">A XML file to load the lexer style from.</param>
 /// <returns><c>true</c> if the operation was successful, <c>false</c> otherwise.</returns>
 public static bool CreateLexerFromFile(Scintilla scintilla, string fileName, string definitionFile)
 {
     return(CreateLexerFromFile(scintilla, LexerFileExtensions.LexerTypeFromFileName(fileName), definitionFile, true, true, true, true, true));
 }
コード例 #4
0
 /// <summary>
 /// Creates the lexer from XML file used by the Notepad++ software.
 /// </summary>
 /// <param name="scintilla">The <see cref="Scintilla"/> which lexer style to set.</param>
 /// <param name="fileName">A file name to get the lexer type from.</param>
 /// <param name="definitionFile">A XML file to load the lexer style from.</param>
 /// <param name="useGlobalOverride">A flag indicating whether the style "Global override" should be set for the lexer from the XML document.</param>
 /// <param name="font">A flag indicating whether to use the defined font name from the XML document or not.</param>
 /// <param name="useWhiteSpace">A flag indicating whether to color the white space symbol.</param>
 /// <param name="useSelectionColors">A flag indicating whether to color the selection.</param>
 /// <param name="useMarginColors">A flag indicating whether to color the margin.</param>
 /// <returns><c>true</c> if the operation was successful, <c>false</c> otherwise.</returns>
 public static bool CreateLexerFromFile(Scintilla scintilla, string fileName, string definitionFile,
                                        bool useGlobalOverride, bool font, bool useWhiteSpace, bool useSelectionColors,
                                        bool useMarginColors)
 {
     return(CreateLexerFromFile(scintilla, LexerFileExtensions.LexerTypeFromFileName(fileName), definitionFile, useGlobalOverride, font, useWhiteSpace, useSelectionColors, useMarginColors));
 }