Framework 2.0: Application settings per library and per user

  • Thread starter Thread starter StealthyMark
  • Start date Start date
S

StealthyMark

I'm developing a library intended to be used by several applications. This
library contains some Forms. I want to persist settings like window size,
splitter positions etc.

Currently, I'm using an autogenerated *.settings file. Visual Studio
generates a wrapper class for the
System.Configuration.ApplicationSettingsBase. In the form designer, I'm
binding some control properties to some properties in the settings class.
The settings are automatically saved to
%LocalApplicationData%\%CompanyAttribute%\%AssemblyNameFileName%_CrypticValue\%FileVersionAttribute%\user.config

%LocalApplicationData% The path to the non-roaming user data directory.

The following informations are extracted from the *application* using the
library
%CompanyAttribute% The value of the Company attribute
%AssemblyNameFileName% The name of the application
%FileVersionAttribute% The value of the FileVersion attribute

That works quite good, except for two problems.

First and most important I'd like to persist the settings globally for the
library, equal for all applications, unique for each user. How to achieve
that? Any hints?

Second, is there a way *in the settings editor* to specify whether the
property is Roaming or not? There is an attribute,
System.Configuration.SettingsManageability. But you have to apply that in
the autogenerated *.Designer.cs file... which is overwritten by the
designer.

Mark Rockmann
 
Hi

Since VS.NET 2005(Whidbey) has not been released, so far for Whidbey issue,
we have a definitely newsgroup about Whidbey.
Welcome to the Microsoft Visual Studio 2005 Newsgroups
http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slcid=us

Or post in the newsgroup below.
microsoft.beta.whidbey.*

Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top