Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well it depends on a lot of things.</p> <p>The main issue is going to be one of efficiency.</p> <p>The file system watcher <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx" rel="nofollow">MSDN HERE</a> will get you the events of the files being created, but then you will have to deal with all of the <em>potential</em> scenarios, like someone putting in files another type in the directory, multiple files at once, etc.</p> <p>If I were designing such a thing I would consider a multithreaded app and some queueing.</p> <p>Part#2...</p> <p>It will not modify the integer, it will notify you when the files are created / deleted etc. Keeping count of those events will allow you to keep track of the files themselves. Persisting the setting would require something external to the running application such as a registry key or disk file. By queuing events from the file system watcher, you can control access to that persisted file in a clean organized manner ensuring that it always corresponds to the operation at hand, not just a file creation or deletion event.</p> <p>Essentially every time the app loads get the last value from the file, as an operation process increment / decrement the value that is in memory and write it back out to that file. The value would be an integer in memory and simply incremented or decremented with a ++ or – as detailed <a href="http://msdn.microsoft.com/en-us/library/dy3d35h8%28v=VS.100%29.aspx" rel="nofollow">here</a> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload