View.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Xml.Serialization;
  5. namespace GenericDisplayCommand.Controls
  6. {
  7. [Serializable]
  8. public abstract class View
  9. {
  10. public string Id
  11. {
  12. get; set;
  13. }
  14. /// <summary>
  15. /// 2dp, match_parent
  16. /// </summary>
  17. public string Height
  18. {
  19. get; set;
  20. }
  21. /// <summary>
  22. /// 2dp, match_parent
  23. /// </summary>
  24. public string Width
  25. {
  26. get; set;
  27. }
  28. /// <summary>
  29. /// path to picture or color number like: #dce6f1
  30. /// </summary>
  31. public string Background
  32. {
  33. get; set;
  34. }
  35. public string PaddingLeft
  36. {
  37. get; set;
  38. }
  39. public string PaddingTop
  40. {
  41. get; set;
  42. }
  43. public string PaddingRight
  44. {
  45. get; set;
  46. }
  47. public string PaddingBottom
  48. {
  49. get; set;
  50. }
  51. public Scrollbars_Values[] Scrollbars
  52. {
  53. get; set;
  54. }
  55. //[XmlElement("AllowAction", typeof(AllowAction))]
  56. public List<AllowAction> AllowActions
  57. {
  58. get; set;
  59. }
  60. public string ActionValue
  61. { get; set; }
  62. }
  63. [Serializable]
  64. public enum AllowAction
  65. {
  66. None,
  67. /// <summary>
  68. /// action for this view will trigger a callback
  69. /// </summary>
  70. Submit,
  71. /// <summary>
  72. /// this view is selectable, and will be carried with ActionValue once other Submit view triggered.
  73. /// </summary>
  74. Select,
  75. /// <summary>
  76. /// this view can drag to other place.
  77. /// </summary>
  78. Drag,
  79. /// <summary>
  80. /// this view can be dropped by other view.
  81. /// </summary>
  82. Drop,
  83. }
  84. [Serializable]
  85. public enum Scrollbars_Values
  86. {
  87. /// <remarks/>
  88. None,
  89. /// <remarks/>
  90. Horizontal,
  91. /// <remarks/>
  92. Vertical,
  93. }
  94. }