C # Open / SaveFileDialog with a different file system

I would love to have standard windows open and save file dialogs, however the particular application I'm using it for is the remote filesystem (basically, I would like to somehow just provide an IFileSystem interface for SaveFileDialog and magically get it changes the files it sees by providing them). Does anyone know of a complete implementation of those dialogs that support this functionality? Is there a way to do this with standard C # / windows dialog boxes?

If not, I implement the dialogue myself. I will still love any resources for implementing these dialogs, even if they do not support this functionality, just so I can separate them and add this functionality.

Thank!

0


source to share


2 answers


The only choice is to implement your own namespace extension. It can be registered as a child "My Computer", so it looks like a different drive. Beware: this is a tedious job and due to a limitation of the .NET Framework (<4.0) it must be written in C / C ++.



Here's an example.

+2


source


These classes are very thin wrappers around calls to native Windows shell api functions. GetOpenFileName () for XP and earlier, IFileOpenDialog COM interface for Vista and above. If you can't see the filesystem in explorer, these wrappers won't be useful at all.



+1


source







All Articles