TCnFileSystemWatcher.EnableRaisingEvents Property

Gets or sets a value indicating whether the component is enabled.

Namespace: CNClrLib.Component.FileSystemWatcher
published
 property EnableRaisingEvents: Boolean read GetEnableRaisingEvents write SetEnableRaisingEvents default False;

Property Value

Type: Boolean

true if the component is enabled; otherwise, false. The default is false.

ObjectDisposedException
The FileSystemWatcher object has been disposed.
PlatformNotSupportedException
The current operating system is not Microsoft Windows NT or later.
FileNotFoundException
The directory specified in Path could not be found.
ArgumentException
Path has not been set or is invalid.

The component will not raise events unless you set EnableRaisingEvents to true.

Note

The component will not watch the specified directory until the Path property has been set and EnableRaisingEvents is true.