closet geek
Member
- Joined
- Apr 2, 2006
- Messages
- 21
Hi,
I have code that creates a new tab and adds it to a Form. Every time a new tab is created I would like a FileSystemWatcher event to be created to monitor the file that is loaded into a RTB on that tab.
The issue I have is the Watchers arent unique. Everytime a new tab is opened the old Watcher gets overwritten by the new one. How do I define a FileSystemWatcher which has a name which can be increased or changed everytime my "create a new tab" code is run?
Something like a simple counter that gets increased everytime the code is run, the FileSystemWatchers name could then be set to the counters current total. How would I do that? Or does anyone have a neater solution.
J# would be best, but I can probably understand C# too.
Thanks.
I have code that creates a new tab and adds it to a Form. Every time a new tab is created I would like a FileSystemWatcher event to be created to monitor the file that is loaded into a RTB on that tab.
The issue I have is the Watchers arent unique. Everytime a new tab is opened the old Watcher gets overwritten by the new one. How do I define a FileSystemWatcher which has a name which can be increased or changed everytime my "create a new tab" code is run?
Something like a simple counter that gets increased everytime the code is run, the FileSystemWatchers name could then be set to the counters current total. How would I do that? Or does anyone have a neater solution.
J# would be best, but I can probably understand C# too.
Thanks.