コード例 #1
0
ファイル: SettingsKey.cs プロジェクト: robterrell/paradox
 /// <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);
 }
コード例 #2
0
ファイル: SettingsKey.cs プロジェクト: robterrell/paradox
 /// <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);
 }
コード例 #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)
 {
 }
コード例 #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)
 {
 }
コード例 #5
0
 public SettingsCollection(SettingsGroup settingsGroup)
 {
     profile = settingsGroup.CreateSettingsProfile(false);
 }
コード例 #6
0
ファイル: SettingsProfile.cs プロジェクト: Hengle/xenko
 /// <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;
 }
コード例 #7
0
ファイル: SettingsProfile.cs プロジェクト: ItayGal2/paradox
 /// <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;
 }
コード例 #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))
 {
 }