Use ICSharpCode. TextEditor to highlight text Syntax of multiple file types (including T-SQL script syntax highlighting not officially included) (including VS. NET2003 solution)
SharpDevelop (# develop) has many "by-products". Among them, the most famous class libraries are SharpZipLib (# ziplib) and pure C #. In SharpDevelop (# develop, "hides" many excellent class libraries, including ICSharpCode. textEditor is the table creator.
ICSharpCode. the source code of TextEditor is hidden in \ SharpDevelop \ src \ Libraries \ ICSharpCode. in TextEditor, you can use SharpDevelop (# develop) to open ICSharpCode. textEditor. cmbx, you can also look at its example (\ SharpDevelop \ samples \ SharpPad) SharpPad. cmbx.
OnSimple ms SQL database table content script generator, supporting multi-level Association (including source code) (Update: re-purchase code, add special support for NVARCHAR, result saving, SQL syntax highlighting)To implement syntax highlighting for the T-SQL, but ICsharpCode does not officially include support for the T-SQL.
So I think, since it is open source, and open the format, there should be developers have the same requirements as me, will write a T-SQL syntax highlighting file (tsql-mode.xshd ), I guess the file name because I analyzed ICSharpCode. after the naming rules of the TextEditor syntax file are derived, and then google, there is still the source code (\ SharpDevelop \ src \ Libraries \ ICSharpCode. in TextEditor), used as the resource compilation, but before compilation, modify SyntaxModes. add the following content at the end of the xml file:
<Mode file = "TSQL-Mode.xshd"
Name = "TSQL"
Extensions = ". SQL"/>
Compile ICSharpCode. TextEditor. dll and reference it.
Advantages of ICSharpCode. TextEditor:
1. provides most of the excellent text editor functions;
2. high scalability: support for any new file format/syntax;
3. Efficiency: the syntax highlighting speed is very fast, regardless of the file size. I used a 6 m SQL file for testing. When a syntax highlighting tool crashed, ICSharpCode. TextEditor completed the work in an instant.
Some friends may need direct source code, so I have created a special solution for VS. NET2003, Which is packed and uploaded for your convenience.
Click here to download: ICSharpCode.TextEditor.zip
Http://www.cnblogs.com/unruledboy/archive/2005/07/19/TSQLSyntaxHighlight.html