a C# implementation of SettingsProvider for portable applications
C#
Switch branches/tags
Nothing to show
Latest commit 5a33ea3 May 14, 2014 @crdx update LICENCE.md
Permalink
Failed to load latest commit information.
src store settings in a setting node rather than a node named after the s… Oct 23, 2012
static add screenshot to readme Oct 23, 2012
.gitattributes initial commit Oct 22, 2012
.gitignore
LICENCE.md
README.md update README.md with relative urls Apr 13, 2013

README.md

PortableSettingsProvider

PortableSettingsProvider is a C# implementation of SettingsProvider for portable applications.

Usage

  1. Add src/PortableSettingsProvider.cs to your project.

  2. For each setting that should be portable, set the Provider property to the PortableSettingsProvider class, with a namespace qualifier if required. (By default this would be crdx.Settings.PortableSettingsProvider, but feel free to change the namespace and/or class name if you want.)

    The Properties Dialog

  3. Optionally, set the Roaming property to True for global settings, or False for local settings. (See Types below for an explanation.)

    Visual Studio currently defaults this to False.

  4. Read and write your application settings as you normally would.

Types

Two types of settings are supported: global (roaming) and local.

Global (aka "Roaming")

Global settings are not tied to the current computer and are available to all running instances of the application, regardless of where it's running from.

Local

Local settings are tied to the computer on which the application is running. The computer name is used as the unique identifier.

File format

The application settings are stored in an XML file in the same directory as the application. The filename is the same as the application's executable, with the file extension settings.

Global settings are stored in the /settings/globalSettings node.

Local settings are stored in the /settings/localSettings/[ComputerName] node.

Bugs or contributions

Open an issue or send a pull request.

Licence

MIT.