Welcome to Dream.In.Code
Become a C# Expert!

Join 150,399 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 965 people online right now. Registration is fast and FREE... Join Now!




File Status Watcher - Help Needed

 
Reply to this topicStart new topic

File Status Watcher - Help Needed

davegeek
13 Mar, 2008 - 03:52 PM
Post #1

D.I.C Head
Group Icon

Joined: 30 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
Hello there.

I have got a bug in my application: when the event is fired (say, file is renamed or content was changed) the process of "watching" is stopped, so I got to click the "Watch" button over again.
Please suggest how I can workaround this issue so the monitoring and writing to the log file will be non-stop?
Installation: you have got to create "FileLogs" dir on disk c in order the program to function.
Thx a lot.

This post has been edited by davegeek: 14 Mar, 2008 - 02:36 AM


Attached File(s)
Attached File  FileWatch.zip ( 34.49k ) Number of downloads: 38
User is offlineProfile CardPM
+Quote Post

Jayman
RE: File Status Watcher - Help Needed
13 Mar, 2008 - 07:11 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,327



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
The process is not stopped, it is still running. It is only the message in your textbox that is changing.
User is offlineProfile CardPM
+Quote Post

davegeek
RE: File Status Watcher - Help Needed
14 Mar, 2008 - 01:55 AM
Post #3

D.I.C Head
Group Icon

Joined: 30 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
First of all, the message is changing in the label, not in text box.

1. But this does not help me - I kindly asked where do I have to start looking at to fix this issue?
2. Moreover, if the OnChanged event is raised, could someone tell me why there are 2 identical records in the log file instead of only 1?

This post has been edited by davegeek: 14 Mar, 2008 - 02:00 AM
User is offlineProfile CardPM
+Quote Post

davegeek
RE: File Status Watcher - Help Needed
14 Mar, 2008 - 04:09 AM
Post #4

D.I.C Head
Group Icon

Joined: 30 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
alright, I found the way how to fix this bug.
thx anyways.
User is offlineProfile CardPM
+Quote Post

zakary
RE: File Status Watcher - Help Needed
14 Mar, 2008 - 07:23 AM
Post #5

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 420



Thanked: 8 times
Dream Kudos: 175
My Contributions
Dave can you post the fix so if someone else is having the same issue they can see your fix.
User is offlineProfile CardPM
+Quote Post

davegeek
RE: File Status Watcher - Help Needed
14 Mar, 2008 - 01:01 PM
Post #6

D.I.C Head
Group Icon

Joined: 30 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
Fix is located in the zip file attached, I have deleted previous buggy version.
This project can serve for some educational purposes, but please if u distribute it then specify that it was partially taken from the Wrox's book "Visual c# 2005 for beginners", though the example in the book is reaaaaaaaaaally buggy.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 06:43PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month