Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b341de

Browse files
committed
FoldingStrategy, SyntaxHighlighting as properties
* Exposed FoldingStrategy and SyntaxHighlighting as design-time properties * Set version to 1.0.0.2
1 parent 4db4cbd commit 3b341de

File tree

5 files changed

+77
-18
lines changed

5 files changed

+77
-18
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<id>ICSharpCode.TextEditorEx</id>
5+
<version>1.0.0.2</version>
6+
<authors>Stef Heyenrath</authors>
7+
<owners>Stef Heyenrath</owners>
8+
<licenseUrl>http://www.opensource.org/licenses/lgpl-2.1.php</licenseUrl>
9+
<projectUrl>http://github.com/StefH/ICSharpCode.TextEditorEx</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<description>An extension on the ICSharpCode Text Editor which supports
12+
* search &amp; replace
13+
* go to linenumber
14+
* XML folding</description>
15+
<summary>An extension on the ICSharpCode Text Editor which supports search/replace, go to linenumber and XML folding.</summary>
16+
<releaseNotes>Exposed FoldingStrategy and SyntaxHighlighting as design-time properties.</releaseNotes>
17+
<language>en-US</language>
18+
<dependencies>
19+
<dependency id="ICSharpCode.TextEditor" version="3.2.1.6466" />
20+
</dependencies>
21+
</metadata>
22+
<files>
23+
<file src="lib\net40\ICSharpCode.TextEditorEx.dll" target="lib\net40\ICSharpCode.TextEditorEx.dll" />
24+
</files>
25+
</package>

ICSharpCode.TextEditorEx/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.1")]
35-
[assembly: AssemblyFileVersion("1.0.0.1")]
34+
[assembly: AssemblyVersion("1.0.0.2")]
35+
[assembly: AssemblyFileVersion("1.0.0.2")]

ICSharpCode.TextEditorEx/TextEditorControlEx.cs

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ namespace ICSharpCode.TextEditor
1313
[ToolboxItem(true)]
1414
public class TextEditorControlEx : TextEditorControl
1515
{
16-
private string _foldingStrategy;
17-
1816
public TextEditorControlEx()
1917
{
2018
var findForm = new FindAndReplaceForm();
@@ -27,6 +25,40 @@ public TextEditorControlEx()
2725
editactions[Keys.Control | Keys.G] = new GoToLineNumberAction();
2826
}
2927

28+
private string _foldingStrategy;
29+
[Category("Appearance")]
30+
[Description("Set the Folding Strategy. Currently only XML is supported.")]
31+
public string FoldingStrategy
32+
{
33+
get
34+
{
35+
return _foldingStrategy;
36+
}
37+
set
38+
{
39+
SetFoldingStrategy(value);
40+
OptionsChanged();
41+
}
42+
}
43+
44+
private string _syntaxHighlighting;
45+
[Category("Appearance")]
46+
[Description("Sets the Syntax Highlighting.")]
47+
public string SyntaxHighlighting
48+
{
49+
get
50+
{
51+
return _syntaxHighlighting;
52+
}
53+
set
54+
{
55+
_syntaxHighlighting = value;
56+
SetHighlighting(_syntaxHighlighting);
57+
OptionsChanged();
58+
}
59+
}
60+
61+
3062
/// <summary>
3163
/// Sets the text and refreshes the control.
3264
/// </summary>

WinFormTestXmlEditor/MainForm.Designer.cs

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WinFormTestXmlEditor/MainForm.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ public MainForm()
99
{
1010
InitializeComponent();
1111

12-
textEditorControl1.SetHighlighting("XML");
13-
textEditorControl1.SetFoldingStrategy("XML");
12+
//textEditorControl1.SetHighlighting("XML");
13+
//textEditorControl1.SetFoldingStrategy("XML");
1414
textEditorControl1.Font = new Font("Courier New", 8.25f, FontStyle.Regular);
1515

16-
UpdateAndCheckFoldings();
16+
//UpdateAndCheckFoldings();
1717
}
1818

1919
private void textEditorControl1_TextChanged(object sender, System.EventArgs e)

0 commit comments

Comments
 (0)