ICSharpCode.TextEditor使用及扩展
2017-07-07 14:58
1241 查看
SharpDevelop (#develop)有很多“副产品”,其中最出名的应算SharpZipLib (#ziplib),纯C#的ZIP类库,而在SharpDevelop (#develop)中,“隐藏”了很多优秀的类库,其中ICSharpCode.TextEditor是表表者。
ICSharpCode.TextEditor源代码隐匿在\SharpDevelop\src\Libraries\ICSharpCode.TextEditor中,可以利用SharpDevelop (#develop)打开ICSharpCode.TextEditor.cmbx,也可以看看其例子(\SharpDevelop\samples\SharpPad中)SharpPad.cmbx。
先说说它的用法:
1:将ICSharpCode.TextEditor.dll添加到工具箱中,然后拖到界面上。
2:设置如下属性(例):
textEditorControl1.ShowEOLMarkers = false;
textEditorControl1.ShowHRuler = false;
textEditorControl1.ShowInvalidLines = false;
textEditorControl1.ShowMatchingBracket = true;
textEditorControl1.ShowSpaces = false;
textEditorControl1.ShowTabs = false;
textEditorControl1.ShowVRuler = false;
textEditorControl1.AllowCaretBeyondEOL = false;
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("HTML");
textEditorControl1.Encoding = Encoding.GetEncoding("GB2312");
3:指定内容文本
textEditorControl1.Text = "Hello World!"
再来说说他的扩展:
官方原版的是不支持T-SQL语法的,我们让他支持T-SQL语法
下载http://files.cnblogs.com/wudingfeng/ICSharpCode.TextEditor_V3.0.rar
里面有一个TSQL-Mode.xshd文件,作为资源添加到项目中,然后修改SyntaxModes.xml文件,添加一行
<Mode file = "TSQL-Mode.xshd"
name = "TSQL"
extensions = ".sql"/>
然后再编译整个项目即可生成支持T-SQL的ICSharpCode.TextEditor.
下载最新SharpDevelop
http://www.icsharpcode.com/OpenSource/SD/Download/
ICSharpCode.TextEditor源代码隐匿在\SharpDevelop\src\Libraries\ICSharpCode.TextEditor中,可以利用SharpDevelop (#develop)打开ICSharpCode.TextEditor.cmbx,也可以看看其例子(\SharpDevelop\samples\SharpPad中)SharpPad.cmbx。
先说说它的用法:
1:将ICSharpCode.TextEditor.dll添加到工具箱中,然后拖到界面上。
2:设置如下属性(例):
textEditorControl1.ShowEOLMarkers = false;
textEditorControl1.ShowHRuler = false;
textEditorControl1.ShowInvalidLines = false;
textEditorControl1.ShowMatchingBracket = true;
textEditorControl1.ShowSpaces = false;
textEditorControl1.ShowTabs = false;
textEditorControl1.ShowVRuler = false;
textEditorControl1.AllowCaretBeyondEOL = false;
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("HTML");
textEditorControl1.Encoding = Encoding.GetEncoding("GB2312");
3:指定内容文本
textEditorControl1.Text = "Hello World!"
再来说说他的扩展:
官方原版的是不支持T-SQL语法的,我们让他支持T-SQL语法
下载http://files.cnblogs.com/wudingfeng/ICSharpCode.TextEditor_V3.0.rar
里面有一个TSQL-Mode.xshd文件,作为资源添加到项目中,然后修改SyntaxModes.xml文件,添加一行
<Mode file = "TSQL-Mode.xshd"
name = "TSQL"
extensions = ".sql"/>
然后再编译整个项目即可生成支持T-SQL的ICSharpCode.TextEditor.
下载最新SharpDevelop
http://www.icsharpcode.com/OpenSource/SD/Download/
相关文章推荐
- ICSharpCode.TextEditor使用及扩展
- ICSharpCode.TextEditor扩展——增加右键菜单
- 原来设置ICSharpCode.TextEditor语法高亮这么简单
- ICSharpCode.TextEditor设置选择的文本
- ICSharpCode.TextEditor如何自定义代码折叠和高亮
- ICsharpCode.TextEditor 的用法小窥
- ICSharpCode.TextEditor设置选择的文本
- ICSharpCode.TextEditor的问题。
- 使用ICSharpCode.TextEditor制作一个语法高亮显示的XML编辑器
- 使用ICSharpCode.TextEditor制作一个语法高亮显示的XML编辑器
- 使用ICSharpCode.TextEditor制作一个语法高亮显示的XML编辑器
- ICSharpCode.SharpZipLib.dll 使用方法
- 使用ICSharpCode.TextEditor制作一个语法高亮显示的XML编辑器
- 使用ICSharpCode.TextEditor.dll 做的一个代码高亮记事本
- ICSharpCode.SharpZipLib.Zip 使用
- [转]ICSharpCode.SharpZipLib 初级使用
- ICSharpCode.SharpZipLib 使用演示
- ICSharpCode.SharpZipLib 初级使用
- ICSharpCode.SharpZipLib .dll 使用说明
- ICSharpCode.SharpZLib的使用记录