I know I can browse through files when they exist by using a FileDialog. I am tracking the changes that are made in a directory and every time there has been a change I save that file in a database. I record the file path, date modified, date entered to the database and a file id to identify each file.
So my database contains a big list of files (about 50,000). When I browse through a file I place that list of files in a listview. If I want to recover a file I would have to browse through that listview which is not hard because I have added a search fea开发者_StackOverflow社区ture in order to filter results.
But I would like to enable the user to browse through the file just as you would do it in Windows. In other words you would have to double click a folder in the listview to see its contents. I managed to do that by creating an event that when you double click a folder in the listview it will just show the files which parent directory is the one that has been double clicked. In other words by double clicking a folder you will see the contents of that directory. The only problem with this technique is that it is slow. Every time double click on a folder it takes about 2 seconds. At the begining it is fast but it tends to slow down. It would be nice if I could speed up this process. I have sorted the files to speed up this process and create a loop instead of a query but it still takes time.
Or maybe I have to modify my database to speed up this process. Since I am tracking a lot of changes I would like the database to be as small as possible. But if I have to add a few columns to make this work then I'll modify it.
This sounds like something i'd do with sharepoint (2010 foundation, it's free) document libraries. Maybe an option?
精彩评论