Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
Questioncode performance. Pin
uglyeyes10-Aug-06 15:32
uglyeyes10-Aug-06 15:32 
AnswerRe: code performance. Pin
Ennis Ray Lynch, Jr.10-Aug-06 15:45
Ennis Ray Lynch, Jr.10-Aug-06 15:45 
GeneralRe: code performance. Pin
uglyeyes10-Aug-06 16:19
uglyeyes10-Aug-06 16:19 
GeneralRe: code performance. Pin
Dave Kreskowiak10-Aug-06 16:43
mveDave Kreskowiak10-Aug-06 16:43 
GeneralRe: code performance. Pin
Paul Conrad10-Aug-06 19:34
professionalPaul Conrad10-Aug-06 19:34 
GeneralOften Pin
Ennis Ray Lynch, Jr.10-Aug-06 17:14
Ennis Ray Lynch, Jr.10-Aug-06 17:14 
QuestionTransparent TabControl Help! Pin
Limey42010-Aug-06 15:17
Limey42010-Aug-06 15:17 
QuestionHow to detect File Transfer End on File Watcher Pin
Bharat Gadhia10-Aug-06 14:03
Bharat Gadhia10-Aug-06 14:03 
I have created a File Watcher program. This has on event which is raised when a file is added to a folder. I want to receive a message or a hint that file transer to that folder is complete. I get the message at the begging of the file transfer that is when file starts droping to that folder. How can I achieve that at the end of file transfer I get the message ?

I am trying to use follwoing eventhandler, but it does not tell me when File trnasfer is complete.

private void FileAdded(object source, Utils.FileWatcherEventArgs e)
{
try
{
string path = "c:\\Temp\\xyz.txt";
if (File.Exists(path))
{
using (StreamReader sr = new StreamReader(path))
{
sr.BaseStream.Seek(0, SeekOrigin.End
if(sr.Peek()!= -1)
{
MessageBox.Show("File Transfer Complete");
}

}
}
}
catch(Exception ex)
{
Console.WriteLine("The process failed: {0}", ex.ToString());
}
}




In life, failures teach you as much as — or perhaps more than — successes.
Thank you very much for the help.
Bharat.

AnswerRe: How to detect File Transfer End on File Watcher Pin
Dave Kreskowiak10-Aug-06 16:46
mveDave Kreskowiak10-Aug-06 16:46 
QuestionPrint the dataGrid Pin
kalyanPaladugu10-Aug-06 12:03
kalyanPaladugu10-Aug-06 12:03 
QuestionProject settings Pin
allenmpcx10-Aug-06 12:03
allenmpcx10-Aug-06 12:03 
AnswerRe: Project settings Pin
Christian Graus10-Aug-06 12:18
protectorChristian Graus10-Aug-06 12:18 
GeneralRe: Project settings Pin
allenmpcx10-Aug-06 12:48
allenmpcx10-Aug-06 12:48 
GeneralRe: Project settings Pin
Christian Graus10-Aug-06 12:58
protectorChristian Graus10-Aug-06 12:58 
GeneralRe: Project settings Pin
allenmpcx10-Aug-06 14:39
allenmpcx10-Aug-06 14:39 
Questioncreating DSN for mySQL Pin
pnpfriend10-Aug-06 10:18
pnpfriend10-Aug-06 10:18 
AnswerRe: creating DSN for mySQL Pin
led mike10-Aug-06 10:40
led mike10-Aug-06 10:40 
QuestionDebugging c# in VS2005 - Break When Value Changes Pin
bearfx10-Aug-06 10:07
bearfx10-Aug-06 10:07 
AnswerRe: Debugging c# in VS2005 - Break When Value Changes Pin
led mike10-Aug-06 10:14
led mike10-Aug-06 10:14 
AnswerRe: Debugging c# in VS2005 - Break When Value Changes Pin
Christian Graus10-Aug-06 12:21
protectorChristian Graus10-Aug-06 12:21 
QuestionDataGrid column, row, and cell styles Pin
spin vector10-Aug-06 9:52
spin vector10-Aug-06 9:52 
AnswerRe: DataGrid column, row, and cell styles Pin
kalyanPaladugu10-Aug-06 12:11
kalyanPaladugu10-Aug-06 12:11 
GeneralRe: DataGrid column, row, and cell styles Pin
spin vector11-Aug-06 1:20
spin vector11-Aug-06 1:20 
QuestionData Display dilemma [modified] Pin
sykiemikey10-Aug-06 8:26
sykiemikey10-Aug-06 8:26 
AnswerRe: Data Display dilemma Pin
led mike10-Aug-06 9:11
led mike10-Aug-06 9:11 

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.