KanbanSettings.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using InABox.Configuration;
  3. using InABox.Core;
  4. using InABox.DynamicGrid;
  5. namespace PRSDesktop;
  6. public enum KanbanViewType
  7. {
  8. Status,
  9. User,
  10. Planner,
  11. List
  12. }
  13. public abstract class KanbanSettingsSection
  14. {
  15. }
  16. public abstract class KanbanCardSettings : KanbanSettingsSection
  17. {
  18. public bool CompactView { get; set; } = false;
  19. public bool IncludeCompleted { get; set; } = false;
  20. public bool IncludeObserved { get; set; } = true;
  21. }
  22. public class KanbanStatusSettings : KanbanCardSettings
  23. {
  24. public Guid SelectedEmployee { get; set; } = Guid.Empty;
  25. public Guid SelectedType { get; set; } = CoreUtils.FullGuid;
  26. public bool IncludeLocked { get; set; } = true;
  27. }
  28. public class KanbanUserSettings : KanbanCardSettings
  29. {
  30. public double AnchorWidth { get; set; } = 300.0F;
  31. public double TeamsHeight { get; set; } = 200.0F;
  32. public Guid[] SelectedTeams { get; set; } = Array.Empty<Guid>();
  33. public Guid[] SelectedEmployees { get; set; } = Array.Empty<Guid>();
  34. public bool IncludeManaged { get; set; } = false;
  35. }
  36. public class KanbanPlannerSettings : KanbanSettingsSection
  37. {
  38. public Guid SelectedType { get; set; } = CoreUtils.FullGuid;
  39. public bool IncludeCompleted { get; set; } = false;
  40. }
  41. public class KanbanListSettings : KanbanSettingsSection
  42. {
  43. }
  44. public class KanbanSettings : IUserConfigurationSettings
  45. {
  46. public DynamicGridSelectedFilterSettings Filters { get; set; } = new();
  47. public KanbanViewType ViewType { get; set; } = KanbanViewType.Status;
  48. public KanbanStatusSettings StatusSettings { get; set; } = new();
  49. public KanbanUserSettings UserSettings { get; set; } = new();
  50. public KanbanPlannerSettings PlannerSettings { get; set; } = new();
  51. public KanbanListSettings ListSettings { get; set; } = new();
  52. }