Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsKey"/> class.
 /// </summary>
 /// <param name="name">The name of this settings key. Must be unique amongst the application.</param>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param>
 /// <param name="defaultValueCallback">A function that returns the default value associated to this settings key.</param>
 protected SettingsKey(UFile name, SettingsGroup group, Func<object> defaultValueCallback)
 {
     Name = name;
     DisplayName = name;
     DefaultObjectValueCallback = defaultValueCallback;
     Group = group;
     Group.RegisterSettingsKey(name, defaultValueCallback(), this);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsKey"/> class.
 /// </summary>
 /// <param name="name">The name of this settings key. Must be unique amongst the application.</param>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param>
 /// <param name="defaultValue">The default value associated to this settings key.</param>
 protected SettingsKey(UFile name, SettingsGroup group, object defaultValue)
 {
     Name = name;
     DisplayName = name;
     DefaultObjectValue = defaultValue;
     Group = group;
     Group.RegisterSettingsKey(name, defaultValue, this);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class.
 /// </summary>
 /// <param name="name">The name of this settings key. Must be unique amongst the application.</param>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param>
 /// <param name="defaultValueCallback">A function that returns the default value associated to this settings key.</param>
 public SettingsValueKey(UFile name, SettingsGroup group, Func <object> defaultValueCallback)
     : base(name, group, defaultValueCallback)
 {
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class.
 /// </summary>
 /// <param name="name">The name of the settings key. Must be unique amongst an application.</param>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param>
 /// <param name="defaultValue">The default value for this settings key.</param>
 public SettingsValueKey(UFile name, SettingsGroup group, T defaultValue)
     : base(name, group, defaultValue)
 {
 }
Example #5
0
 public SettingsCollection(SettingsGroup settingsGroup)
 {
     profile = settingsGroup.CreateSettingsProfile(false);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsProfile"/> class.
 /// </summary>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this profile.</param>
 /// <param name="parentProfile">The parent profile.</param>
 internal SettingsProfile(SettingsGroup group, SettingsProfile parentProfile)
 {
     Group = group;
     this.parentProfile = parentProfile;
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsProfile"/> class.
 /// </summary>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this profile.</param>
 /// <param name="parentProfile">The parent profile.</param>
 internal SettingsProfile(SettingsGroup group, SettingsProfile parentProfile)
 {
     Group = group;
     this.parentProfile = parentProfile;
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class.
 /// </summary>
 /// <param name="name">The name of the settings key. Must be unique amongst an application.</param>
 /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param>
 public SettingsValueKey(UFile name, SettingsGroup group) : this(name, group, default(T))
 {
 }