Untergeordnete Seiten
  • Settings Modules

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Table of Contents

Settings

A Plugin can have one or more classes containing settings. Settings should only be exposed by properties, and each property must have a getter, a setter, and also a SettingAttribute in order to be loaded and saved by the ISettingsManager (by default: SettingsManager).

Example

using MediaPortal.Core.Settings;

public class MySettings
{
  private string _value;

  [Setting(SettingScope.User, true)]
  public bool Value
  {
    get { return this._value; }
    set { this._value = value; }
  }
}
  • Here, the SettingScope is set to User. An other option is Global.
    SettingScope.User means the setting can be different for each user. User specific settings are stored in a subdirectory of the directory containing all Global settings.
  • The second parameter is the default value, which will be assigned when no setting files are found.
  • The classes holding these settings don't have to be public in order to be configurable.
    See User Services > Configuration

ISettingsManager

TODO: describe ISettingsManager

SettingsManager

TODO: describe SettingsManager

   

 

This page has no comments.