コード例 #1
0
 public UserSettingBool(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, bool> loadF,
     Action <TProfile, bool> applyF) : base(id, nameF, descriptionF, group, loadF, applyF)
 {
 }
コード例 #2
0
 protected UserSettingBase(string id,
                           Func <string> nameF,
                           Func <string> descriptionF,
                           UserSettingGroup group,
                           Func <TProfile, TValue> loadF,
                           Action <TProfile, TValue> applyF,
                           Func <string> unitsF = null) : base(id, nameF, descriptionF, group, unitsF)
 {
     this.applyF = applyF;
     this.loadF  = loadF;
 }
コード例 #3
0
 protected UserSettingBase(string id,
                           Func <string> nameF,
                           Func <string> descriptionF = null,
                           UserSettingGroup group     = null,
                           Func <string> unitsF       = null)
 {
     Id           = id;
     NameF        = nameF;
     DescriptionF = descriptionF;
     Group        = group;
     UnitsF       = unitsF;
 }
コード例 #4
0
 public UserSettingEnum(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, int> loadF,
     Action <TProfile, int> applyF,
     IEnumerable <UserSettingEnumOption> options) :
     base(id, nameF, descriptionF, group, loadF, applyF)
 {
     Options = new ReadOnlyCollection <UserSettingEnumOption>(options.ToList());
 }
コード例 #5
0
 public UserSettingInt(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, int> loadF,
     Action <TProfile, int> applyF,
     Func <string> unitsF       = null,
     NumericInfoInt numericInfo = null) :
     base(id, nameF, descriptionF, group, loadF, applyF, unitsF)
 {
     NumericInfo = numericInfo;
 }
コード例 #6
0
 public UserSettingString(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, string> loadF,
     Action <TProfile, string> applyF,
     IEnumerable <Func <string, ValidationResult> > validations = null,
     Func <string> unitsF = null) : base(id, nameF, descriptionF, group, loadF, applyF, unitsF)
 {
     Validations = new List <Func <string, ValidationResult> >();
     if (validations != null)
     {
         Validations.AddRange(validations);
     }
 }
コード例 #7
0
 public UserSettingDouble(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, double> loadF,
     Action <TProfile, double> applyF,
     Func <string> unitsF          = null,
     NumericInfoDouble numericInfo = null,
     bool convertToPercentage      = false,
     int decimalDigits             = 2) :
     base(id, nameF, descriptionF, group, loadF, applyF, unitsF)
 {
     NumericInfo         = numericInfo;
     ConvertToPercentage = convertToPercentage;
     DecimalDigits       = decimalDigits;
 }
コード例 #8
0
 public UserSettingDoubleListVariableLength(
     string id,
     Func <string> nameF,
     Func <string> descriptionF,
     UserSettingGroup group,
     Func <TProfile, List <double> > loadF,
     Action <TProfile, List <double> > applyF,
     int?minimumCount              = null,
     int?maximumCount              = null,
     Func <string> unitsF          = null,
     NumericInfoDouble numericInfo = null,
     bool convertToPercentage      = false,
     int decimalDigits             = 2) :
     base(id, nameF, descriptionF, group, loadF, applyF, unitsF)
 {
     MinimumCount        = minimumCount ?? 1;
     MaximumCount        = maximumCount ?? 100;
     NumericInfo         = numericInfo;
     ConvertToPercentage = convertToPercentage;
     DecimalDigits       = decimalDigits;
 }