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. public KanbanTypeLink TaskType { get; set; }
  13. public DFLayoutAddTaskFieldProperties()
  14. {
  15. TaskType = new KanbanTypeLink();
  16. }
  17. protected override void LoadProperties()
  18. {
  19. base.LoadProperties();
  20. TaskType.ID = GetProperty("TaskType", Guid.Empty);
  21. }
  22. protected override void SaveProperties()
  23. {
  24. base.SaveProperties();
  25. SetProperty("TaskType", TaskType.ID);
  26. }
  27. public override string? DeserializeValue(DFLoadStorageEntry entry)
  28. {
  29. return entry.GetValue<string>();
  30. }
  31. public override void SerializeValue(DFSaveStorageEntry entry, string? value)
  32. {
  33. entry.SetValue(value);
  34. }
  35. public override string? GetValue(string? value)
  36. {
  37. return value;
  38. }
  39. public override string FormatValue(string? value)
  40. {
  41. return string.Format("{0}", value);
  42. }
  43. }
  44. }