DFLayoutTextFieldProperties.cs 753 B

123456789101112131415161718192021222324252627282930
  1. namespace InABox.Core
  2. {
  3. public class DFLayoutTextFieldProperties : DFLayoutFieldProperties<string, string>
  4. {
  5. [EditorSequence(-995)]
  6. [TextBoxEditor]
  7. public override string Default { get; set; }
  8. public override string FormatValue(string value)
  9. {
  10. return value;
  11. }
  12. public override string DeserializeValue(DFLoadStorageEntry entry)
  13. {
  14. return entry.GetValue<string>() ?? string.Empty;
  15. }
  16. public override void SerializeValue(DFSaveStorageEntry entry, string value)
  17. {
  18. entry.SetValue(value);
  19. }
  20. public override string GetValue(string value)
  21. {
  22. return value;
  23. }
  24. }
  25. }