如何保存VSTO插件的首选项?

时间:2021-09-03 20:45:49

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.

我为MS Project 2007编写了一个VSTO插件,它基本上只是将项目数据发布到我们的Sharepoint门户。为此,用户每次想要发布时都必须在我们的插件中输入sharepoint站点名称。

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.

如何保留此信息,以便用户只需输入一次信息?理想情况下,我想将其保存为Project文件的一部分,以便它可以从用户移植到用户。如果那是不可能的,我会坚持只持久地在一个用户的机器上。

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.

到目前为止,我所拥有的最佳解决方案是在User的临时目录中存储项目文件名到Sharepoint站点的映射,但这似乎不是最干净的方法。

1 个解决方案

#1


Maybe you could store it using IsolatedStorage: http://msdn.microsoft.com/en-us/library/3ak841sy.aspx

也许你可以使用IsolatedStorage存储它:http://msdn.microsoft.com/en-us/library/3ak841sy.aspx

#1


Maybe you could store it using IsolatedStorage: http://msdn.microsoft.com/en-us/library/3ak841sy.aspx

也许你可以使用IsolatedStorage存储它:http://msdn.microsoft.com/en-us/library/3ak841sy.aspx