Preferences File 
Author Message
 Preferences File

What's the best way to store user preferences in an application? Create an
XML file and store at Program Files/Company Name/Product Name? Use a generic
text file? Binary Serialize an object with prefs stored in it?
Thanks in Advance!
Steve


Mon, 21 Feb 2005 03:40:57 GMT  
 Preferences File
It really depends on what you want to do and how secure it needs to be.
Another option is to store the options in the registry.  Settings stored
under CURRENT_USER would be user specific and LOCAL_MACHINE would be all
users.  XML would be fine as long as you don't mind a user changing the
settings in Notepad.  Serialization works pretty slick as long as multiple
assemblies don't need to access the serialized file.

It just really depends...


Quote:
> What's the best way to store user preferences in an application? Create an
> XML file and store at Program Files/Company Name/Product Name? Use a
generic
> text file? Binary Serialize an object with prefs stored in it?
> Thanks in Advance!
> Steve



Mon, 21 Feb 2005 04:35:01 GMT  
 Preferences File
Steve,
    I keep user settings in an XML file which is stored under
IsolatedStorage for each user they are loaded and stored with their own
class.  If the user doesn't have an instance of the settings file I keep a
default file in the Application directory to load.  User changes are then
serialized back to IsolatedStorage.

Ron Allen

Quote:
> What's the best way to store user preferences in an application? Create an
> XML file and store at Program Files/Company Name/Product Name? Use a
generic
> text file? Binary Serialize an object with prefs stored in it?
> Thanks in Advance!
> Steve



Mon, 21 Feb 2005 04:39:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. User Preferences located in a seperate file

2. Application preferences and settings

3. New Syntax Preferences?

4. changing per-contact mail format preference setting

5. Printing Preferences

6. resetting local profile preferences

7. Use of app.config and saving user preferences...

8. Advice on saving array of users preferences

9. User Preferences

10. Programmtically changing IE Preferences

11. managing user preferences...opinions needed

12. Saving Preferences

 

 
Powered by phpBB® Forum Software