如何保存 VSTO 插件的首选项?
我为 MS Project 2007 编写了一个 VSTO 插件,它基本上只是将项目数据发布到我们的 Sharepoint 门户。 为此,用户每次想要发布时都必须在我们的插件中输入共享点站点名称。
如何保留此信息以便用户只需输入一次信息? 理想情况下,我想将其保存为项目文件的一部分,以便用户之间可以移植。 如果这是不可能的,我会满足于将其保留在单个用户的计算机上。
到目前为止,我拥有的最佳解决方案是将项目文件名到 Sharepoint 站点的映射存储在用户的临时目录中,但这似乎不是最干净的方法。
I've written a VSTO plugin for MS Project 2007 which basically just publishes Project data to our Sharepoint portal. To do this, the user has to enter in the sharepoint site name into our plugin everytime that they want to publish.
How do I persist this information so that the user only has to enter the information once? Ideally, I'd like to save it as part of the Project file so that it's portable from user to user. If that's not possible, I'll settle for it just persisting on a single user's machine.
The best solution I have so far, is to just store a mapping of Project filenames to Sharepoint sites in the User's temp directory, but that just doesn't seem like the cleanest way to do things.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许你可以使用IsolatedStorage来存储它:
http://msdn.microsoft.com/en-us/library/3ak841sy.aspx
Maybe you could store it using IsolatedStorage:
http://msdn.microsoft.com/en-us/library/3ak841sy.aspx