Exemplo n.º 1
0
        }         // ApplicationSettings

        // ----------------------------------------------------------------------
        public ApplicationSettings(string settingsKey, object obj) :
            base(settingsKey)
        {
            settings = new SettingCollection(this);

            // provider
            defaultProvider = new LocalFileSettingsProvider();
            defaultProvider.Initialize("LocalFileSettingsProvider", new NameValueCollection());
            base.Providers.Add(defaultProvider);

            // upgrade
            upgradeSettings = new ValueSetting(UpgradeSettingsKey, typeof(bool), true);
            UseAutoUpgrade  = true;

            if (obj != null)
            {
                Settings.AddAll(obj);
            }
        }         // ApplicationSettings
Exemplo n.º 2
0
		} // ApplicationSettings

		// ----------------------------------------------------------------------
		public ApplicationSettings( string settingsKey, object obj ) :
			base( settingsKey )
		{
			settings = new SettingCollection( this );

			// provider
			defaultProvider = new LocalFileSettingsProvider();
			defaultProvider.Initialize( "LocalFileSettingsProvider", new NameValueCollection() );
			base.Providers.Add( defaultProvider );

			// upgrade
			upgradeSettings = new ValueSetting( UpgradeSettingsKey, typeof( bool ), true );
			UseAutoUpgrade = true;

			if ( obj != null )
			{
				Settings.AddAll( obj );
			}
		} // ApplicationSettings