public static Setting Create(I18N.I18NString description, bool value, SettingDependency dependency = null) { var setting = new Setting() { Type = SettingType.BOOLEAN, Value = value ? "1" : "0", DefaultValue = value ? "1" : "0", Description = description, Dependency = dependency }; return(setting); }
public static Setting Create(I18N.I18NString description, string value, SettingDependency dependency = null) { var setting = new Setting() { Type = SettingType.STRING, Value = value, DefaultValue = value, Description = description, Dependency = dependency }; return(setting); }
public SettingCategory(I18N.I18NString title, I18N.I18NString description, SettingDependency dependency = null) { Title = title; Description = description; Dependency = dependency; }
public SettingCategory(I18N.I18NString title, SettingDependency dependency = null) { Title = title; Dependency = dependency; }
public static Setting Create(I18N.I18NString description, OrderedDictionary <string, I18N.I18NString> allowedValues, string defaultvalue, SettingDependency dependency = null) { var setting = new Setting() { Type = SettingType.ENUM, Value = defaultvalue, DefaultValue = defaultvalue, Description = description, Dependency = dependency }; foreach (var allowedValue in allowedValues) { setting.AllowedValues.Add(allowedValue.Key, allowedValue.Value); } return(setting); }