Click here to Skip to main content
15,889,372 members
Home / Discussions / C#
   

C#

 
QuestionMDI application childform maximize Pin
sinosoidal10-Apr-07 6:33
sinosoidal10-Apr-07 6:33 
AnswerRe: MDI application childform maximize Pin
il_masacratore11-Apr-07 21:29
il_masacratore11-Apr-07 21:29 
QuestionString Manipulation Question Pin
JMOdom10-Apr-07 6:20
JMOdom10-Apr-07 6:20 
AnswerRe: String Manipulation Question Pin
Are Jay10-Apr-07 8:47
Are Jay10-Apr-07 8:47 
QuestionC# accessing Excel Pin
shamidi10-Apr-07 5:55
shamidi10-Apr-07 5:55 
AnswerRe: C# accessing Excel Pin
led mike10-Apr-07 7:39
led mike10-Apr-07 7:39 
QuestionFileWatcher Pin
LCI10-Apr-07 5:32
LCI10-Apr-07 5:32 
AnswerRe: FileWatcher Pin
vineas10-Apr-07 5:48
vineas10-Apr-07 5:48 
If 10 files get dropped there, you should have 10 calls to your handler. I can't remember exactly (it's been a while), but I'm pretty sure the calls come back via the thread pool so even if you wanted to process them all from one of the handler calls, you'd have to make sure that only one of the calls is actually processing the files, and not the others, with a lock or mutex of some sort.


If this is for sure how you want to handle it (process from a single handler call), you could do something like this (after first making sure the code is only running on one of the handlers).

<code>
void watcher_Changed(object sender, FileSystemEventArgs e)
{
	// TODO: Make sure that this is the only handler running on these files

	string[] fileList = Directory.GetFiles(Path.GetDirectoryName(e.FullPath), "*.xml");
	foreach (string file in fileList)
		// do the processing
}
</code>


-----
In the land of the blind, the one eyed man is king.

QuestionUser Control - comments for public properties in form designer Pin
peterchen10-Apr-07 5:13
peterchen10-Apr-07 5:13 
AnswerRe: User Control - comments for public properties in form designer Pin
Martin#10-Apr-07 5:40
Martin#10-Apr-07 5:40 
QuestionListview and remove or disallow duplicates Pin
Saamir10-Apr-07 5:07
Saamir10-Apr-07 5:07 
AnswerRe: Listview and remove or disallow duplicates Pin
Saamir10-Apr-07 6:51
Saamir10-Apr-07 6:51 
QuestionReference type or not Pin
hamidkhan10-Apr-07 4:38
hamidkhan10-Apr-07 4:38 
AnswerRe: Reference type or not Pin
Guffa10-Apr-07 7:08
Guffa10-Apr-07 7:08 
QuestionRe: Reference type or not Pin
hamidkhan10-Apr-07 7:28
hamidkhan10-Apr-07 7:28 
AnswerRe: Reference type or not Pin
Guffa10-Apr-07 8:16
Guffa10-Apr-07 8:16 
QuestionCombobox value Pin
msogun10-Apr-07 4:26
msogun10-Apr-07 4:26 
AnswerRe: Combobox value Pin
mark_w_10-Apr-07 5:39
mark_w_10-Apr-07 5:39 
QuestionDataGridView validation Pin
7110-Apr-07 3:56
7110-Apr-07 3:56 
AnswerRe: DataGridView validation Pin
Sathesh Sakthivel10-Apr-07 4:17
Sathesh Sakthivel10-Apr-07 4:17 
AnswerRe: DataGridView validation Pin
sundeeppatil10-Apr-07 11:18
sundeeppatil10-Apr-07 11:18 
QuestionHelp regarding password char in textbox Pin
anu8110-Apr-07 3:56
anu8110-Apr-07 3:56 
AnswerRe: Help regarding password char in textbox Pin
gauthee10-Apr-07 4:05
gauthee10-Apr-07 4:05 
GeneralRe: Help regarding password char in textbox Pin
anu8110-Apr-07 4:14
anu8110-Apr-07 4:14 
GeneralRe: Help regarding password char in textbox Pin
althamda10-Apr-07 5:13
althamda10-Apr-07 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.