问题描述
我打算在我的应用程序中添加一个Preferences表单,并使用
Property Grid向用户显示首选项。您认为
是将这些首选项保存到XML文件的最佳方式?使用
CAB(配置应用程序块)?将首选项保存在类
对象中并将它们序列化为XML文件?把它们直接写到
的XML文件中?其他方式???
只想一起思考...想要一种简单易用的方式和b / b
灵活(即可以添加/删除首选项)以后没有太多的麻烦
或让用户放弃所有他们的偏好并重新开始)。
想法?
Tom
CAB(配置应用程序块)?将首选项保存在类对象中并将它们序列化为XML文件?将它们直接写入
到XML文件?其他方式???
只是想要一起思考...想要一种简单灵活的方式(即可以在以后添加/删除首选项而不需要大量的
麻烦或让用户放弃所有偏好并重新开始)。
想法?
Tom
Tom,
这个MSDN Mag有几个好主意。文章:
讨论使用隔离存储,注册等...我个人喜欢
使用XML,因为它比其他
存储(INI,IS或注册表)更加便携和可扩展。另外,我通常使用XML Serializer和
创建对象来表示设置。但这只是我的偏好。
无论你做什么,要记住的关键点是存储,运行时
表示和演示给用户(结合
设置的存储方式)。
Jeremy
I am planning on adding a Preferences form to my application and using the
Property Grid to display the preferences to the user. What do you think
would be the best way to save these preferences out to an XML file? Use the
CAB (Configuration Application Block)? Save the preferences in a class
object and serialize them out the the XML file? Write them out directly to
the XML file? Other ways???
Just want to get some thoughts together... want a way that is easy and
flexible (i.e. can add/remove preferences later on without a lot of hassle
or making the user ditch all their preferences and start over).
Thoughts?
Tom
the
Tom,
There are several good ideas in this MSDN Mag. article:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
It discusses using isolated storage, registery, etc... I personally like
using XML because it''s so much more portable and expandable than other
storage (INI, IS or Registry). Also, I usually use the XML Serializer and
create objects to represent the settings. But that''s just my preference.
Whatever you do, the key points to keep in mind are storage, run-time
representation, and presentation to the user (in conjunction with how the
settings are stored).
Jeremy
这篇关于保存用户首选项的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!