Catch events in my code when VS discovers that the file has been modified outside of the source editor
-
I did an WinForm Applicaiton with C# code which permit the user to open a file and edit it. I want to add a functionality like VS that detect if the file openend by user is modified outside my application with a dialog : "Do you want to reload it? Yes, No?". There exist such method to do it? I think if I can catch events in my code when VS discovers that the file has been modified outside of the source editor? Thank you for your answers!!!
-
I did an WinForm Applicaiton with C# code which permit the user to open a file and edit it. I want to add a functionality like VS that detect if the file openend by user is modified outside my application with a dialog : "Do you want to reload it? Yes, No?". There exist such method to do it? I think if I can catch events in my code when VS discovers that the file has been modified outside of the source editor? Thank you for your answers!!!
Have a look at the FileSystemWatcher
Dave
Tip: Passing values between objects using events (C#) BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
Have a look at the FileSystemWatcher
Dave
Tip: Passing values between objects using events (C#) BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)I have tested the FileSytemWatcher, but when I modified the file in my application, the event is catched also! so I can not distinct that the file is modified inside of my applicaion or outside?
-
I have tested the FileSytemWatcher, but when I modified the file in my application, the event is catched also! so I can not distinct that the file is modified inside of my applicaion or outside?