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
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