Skip to content

Commit 2d0660c

Browse files
AfterSelect event definition added.
1 parent 660ae69 commit 2d0660c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

DirectoryTree/DirectoryTreeControl.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System.IO;
1212
using System.Collections.Generic;
1313
using System;
14+
using System.ComponentModel;
1415

1516
namespace DirectoryTree
1617
{
@@ -20,6 +21,18 @@ public partial class DirectoryTreeControl : UserControl
2021
private DirectoryInfo selDir;
2122
private bool initialized;
2223

24+
/// <summary>
25+
/// Represents the method that will handle the events of a DirectoryTree.DirectoryTreeControl
26+
/// </summary>
27+
/// <param name="sender"></param>
28+
/// <param name="e"></param>
29+
public delegate void DirectoryTreeEventHandler(object sender, TreeViewEventArgs e);
30+
31+
[Browsable(true)]
32+
[Category("Actions")]
33+
[Description("Occurs when the directory selection has been changed.")]
34+
public event DirectoryTreeEventHandler AfterSelect;
35+
2336
public DirectoryTreeControl()
2437
{
2538
InitializeComponent();
@@ -135,6 +148,8 @@ private void TvDirView_AfterSelect(object sender, TreeViewEventArgs e)
135148
{
136149
initialized = false;
137150
SelectedPath = tvDirView.SelectedNode.FullPath;
151+
152+
AfterSelect?.Invoke(this, e);
138153
}
139154
else
140155
initialized = true;

0 commit comments

Comments
 (0)