12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- namespace InABox.Core
- {
- public class DFLayoutOptionFieldProperties : DFLayoutFieldProperties<string>
- {
- public DFLayoutOptionFieldProperties()
- {
- Options = "";
- OptionType = DFLayoutOptionType.Combo;
- }
- [MemoEditor]
- [EditorSequence(1)]
- public string Options { get; set; }
- [EnumLookupEditor(typeof(DFLayoutOptionType))]
- [EditorSequence(2)]
- public DFLayoutOptionType OptionType { get; set; }
- protected override void LoadProperties()
- {
- base.LoadProperties();
- Options = GetProperty("Options", "");
- OptionType = GetProperty("OptionType", DFLayoutOptionType.Combo);
- }
- protected override void SaveProperties()
- {
- base.SaveProperties();
- SetProperty("Options", Options);
- SetProperty("OptionType", OptionType);
- }
- public override object ParseValue(object value)
- {
- return value?.ToString();
- }
- public override string FormatValue(object value)
- {
- return value?.ToString() ?? "";
- }
- }
- }
|