C#打开/ SaveFileDialog与不同的文件系统 [英] C# Open/SaveFileDialog with a different file system

查看:291
本文介绍了C#打开/ SaveFileDialog与不同的文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要打开标准窗口并保存文件对话框,但是我使用的特定应用程序是一个远程文件系统(基本上,我想以某种方式只提供一个IFileSystem接口SaveFileDialog并拥有它神奇地改变它提供他们看到的文件)。有谁知道这些支持这个功能的对话框的完整实现吗?有没有办法用标准的C#/ Windows对话框来做到这一点?



如果没有,我将自己实现对话框。即使他们不支持这个功能,我仍然会喜欢任何资源来实现这些对话框,只是我可以把它们分开并自己添加这个功能。



谢谢!

解决方案

唯一的选择是实现自己的Shell命名空间扩展。它可能被注册为我的电脑的孩子,所以它看起来像另一个驱动器。
请注意:这是一项单调乏味的工作,由于.NET框架的限制(<4.0),必须用C / C ++编写。

一个href =http://www.codeproject.com/Articles/7973/An-almost-complete-Namespace-Extension-Sample =nofollow>这里就是这个例子。


I'd like the standard windows open and save file dialogs, however, the particular application I am using it for is a remote file system (basically, I'd love to somehow just provide a IFileSystem interface to SaveFileDialog and have it magically change the files it sees by me providing them). Does anyone know of a complete implementation of those dialogs that supports this functionality? Is there any way to do it with the standard C#/windows dialogs?

If not, I will be implementing the dialog myself. I would still love any resources to implementations of these dialogs, even if they don't support this functionality, just so I could rip them apart and add that functionality myself.

Thanks!

解决方案

The only choice is to implement your own Shell Namespace Extension. It may be registered as a "My Computer" child so it looks like another drive. Beware: this is a tedious work and due to .NET framework limitation (<4.0), it has to be written in C/C++.

Here is the example.

这篇关于C#打开/ SaveFileDialog与不同的文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆