DFLayoutAddTaskFieldProperties.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Comal.Classes;
  2. using InABox.Clients;
  3. using InABox.Core;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. namespace PRSClasses
  9. {
  10. public class DFLayoutAddTaskFieldProperties : DFLayoutFieldProperties<string?, string?>
  11. {
  12. [EditorSequence(-995)]
  13. [NullEditor]
  14. public override string? Default { get; set; }
  15. public KanbanTypeLink TaskType { get; set; }
  16. protected override void LoadProperties()
  17. {
  18. base.LoadProperties();
  19. TaskType.ID = GetProperty("TaskType", Guid.Empty);
  20. }
  21. protected override void SaveProperties()
  22. {
  23. base.SaveProperties();
  24. SetProperty("TaskType", TaskType.ID);
  25. }
  26. public override string? DeserializeValue(DFLoadStorageEntry entry)
  27. {
  28. return entry.GetValue<string>();
  29. }
  30. public override void SerializeValue(DFSaveStorageEntry entry, string? value)
  31. {
  32. entry.SetValue(value);
  33. }
  34. public override string? GetValue(string? value)
  35. {
  36. return value;
  37. }
  38. public override string FormatValue(string? value)
  39. {
  40. return string.Format("{0}", value);
  41. }
  42. }
  43. }