PostableSettings.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using InABox.Configuration;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace InABox.Core
  6. {
  7. /// <summary>
  8. /// The global settings for an <see cref="IPostable"/>.
  9. /// </summary>
  10. public class PostableSettings : BaseObject, IGlobalConfigurationSettings
  11. {
  12. [NullEditor]
  13. public string PostableType { get; set; } = "";
  14. /// <summary>
  15. /// What kind of <see cref="IPoster{TEntity, TSettings}"/> is to be used, globally; this will be a type name.
  16. /// </summary>
  17. [ComboLookupEditor(typeof(PosterTypeLookup))]
  18. [EditorSequence(1)]
  19. public string? PosterType { get; set; }
  20. [TextBoxEditor]
  21. [EditorSequence(2)]
  22. public string? ButtonName { get; set; }
  23. [EditorSequence(3)]
  24. public ImageDocumentLink Thumbnail => InitializeField(ref _thumbnail, nameof(Thumbnail));
  25. private ImageDocumentLink? _thumbnail;
  26. [EditorSequence(4)]
  27. [CheckBoxEditor]
  28. public bool ShowClearButton { get; set; } = true;
  29. [EditorSequence(5)]
  30. [CheckBoxEditor]
  31. [Caption("Show Import Button")]
  32. public bool ShowPullButton { get; set; } = true;
  33. }
  34. }