10Tec Company logo 10Tec Company: Exclusive high-quality ActiveX and .NET tools and components
Site Map
Stay Connected
Follow 10Tec on Twitter 10Tec RSS Feed More info

xDir Library - Event Diagrams

xDir implements a lot of useful callback procedures that work like events. These events allow you to control and customize files and folders search with xDir. Two following figures explain how xDir raises events.

xDir file and folder enumeration

As you can see from this picture, xDir starts files and/or folders enumeration from the folder specified in the RootFolder property just you issue the ProcessFolder method. The component raises the IXDFoundItem_Proc event for each item that matches specified search criteria, including the root folder if the EnumRootFolder property set to True.

xDir also raises the IXDPEnumCompleted event in the Pro version just it has completed the enumeration; this event is useful when you enumerate files using background process.

For each checked item (files if you have specified the xditFile constant and/or folders if you use xditFolder in the ItemTypes property) xDir uses the following schema:

check file or folder match filter criteria

The component raises the IXDCancelEnum_Proc before it checks the item to provide you with the ability to cancel the search. If you set its CancelEnum parameter passed by ref to True, xDir stops the enumeration.

Then it raises the IXDItemCheck_Proc event you can use to implement your own search criteria. The SkipItem parameter allows you to ignore further item testing.

If you have specified file or folder search criteria, xDir checks them for the current item, and if the item matches them, raises the IXDFoundItemEx_Proc event which indicates that the current item matches your search criteria. If you have not specified any search criteria and simply use xDir to enumerate files or folders in all subfolders of the root folder, xDir raises this event for each found item.

xDir also periodically fires IXDCancelEnum_Proc while it checks file contents in the case you perform context search. If xDir checks big size file (1Mb and greater) it can take long time, and this event allows you to interrupt search without any delay the user can observe.

xDir raises the corresponding events with the "Ex" suffix too. These events provide you with additional information about each checked item (file/folder attributes, creation date, file size, etc), but using these events can slow application execution down because xDir must pass additional data into your app.

The events listed here can be used to customize xDir search criteria.

Customizing xDir »

Section Contents
 
Download Demo
  Back to Top

© 10Tec Company. Last updated: 2010-Mar-13