Sprite.Property.06.BackgroundImage.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. using System.Drawing;
  2. using System.Windows.Forms;
  3. namespace Microsoft.Windows.Forms
  4. {
  5. public partial class Sprite
  6. {
  7. private Image m_BackgroundImage = null;
  8. /// <summary>
  9. /// 背景图
  10. /// </summary>
  11. public Image BackgroundImage
  12. {
  13. get
  14. {
  15. return this.m_BackgroundImage;
  16. }
  17. set
  18. {
  19. if (value != this.m_BackgroundImage)
  20. {
  21. this.m_BackgroundImage = value;
  22. this.Feedback();
  23. }
  24. }
  25. }
  26. private Image m_BackgroundImageHovered = null;
  27. /// <summary>
  28. /// 鼠标移上背景图
  29. /// </summary>
  30. public Image BackgroundImageHovered
  31. {
  32. get
  33. {
  34. return this.m_BackgroundImageHovered;
  35. }
  36. set
  37. {
  38. if (value != this.m_BackgroundImageHovered)
  39. {
  40. this.m_BackgroundImageHovered = value;
  41. this.Feedback();
  42. }
  43. }
  44. }
  45. private Image m_BackgroundImagePressed = null;
  46. /// <summary>
  47. /// 鼠标按下背景图
  48. /// </summary>
  49. public Image BackgroundImagePressed
  50. {
  51. get
  52. {
  53. return this.m_BackgroundImagePressed;
  54. }
  55. set
  56. {
  57. if (value != this.m_BackgroundImagePressed)
  58. {
  59. this.m_BackgroundImagePressed = value;
  60. this.Feedback();
  61. }
  62. }
  63. }
  64. private Image m_BackgroundImageFocused = null;
  65. /// <summary>
  66. /// 获取焦点背景图
  67. /// </summary>
  68. public Image BackgroundImageFocused
  69. {
  70. get
  71. {
  72. return this.m_BackgroundImageFocused;
  73. }
  74. set
  75. {
  76. if (value != this.m_BackgroundImageFocused)
  77. {
  78. this.m_BackgroundImageFocused = value;
  79. this.Feedback();
  80. }
  81. }
  82. }
  83. private Image m_BackgroundImageDisabled = null;
  84. /// <summary>
  85. /// 状态禁用背景图
  86. /// </summary>
  87. public Image BackgroundImageDisabled
  88. {
  89. get
  90. {
  91. return this.m_BackgroundImageDisabled;
  92. }
  93. set
  94. {
  95. if (value != this.m_BackgroundImageDisabled)
  96. {
  97. this.m_BackgroundImageDisabled = value;
  98. this.Feedback();
  99. }
  100. }
  101. }
  102. private Image m_BackgroundImageHighlight = null;
  103. /// <summary>
  104. /// 高亮背景图
  105. /// </summary>
  106. public Image BackgroundImageHighlight
  107. {
  108. get
  109. {
  110. return this.m_BackgroundImageHighlight;
  111. }
  112. set
  113. {
  114. if (value != this.m_BackgroundImageHighlight)
  115. {
  116. this.m_BackgroundImageHighlight = value;
  117. this.Feedback();
  118. }
  119. }
  120. }
  121. private ImageLayout m_BackgroundImageLayout = ImageLayout.Tile;
  122. /// <summary>
  123. /// 背景图布局方式
  124. /// </summary>
  125. public ImageLayout BackgroundImageLayout
  126. {
  127. get
  128. {
  129. return this.m_BackgroundImageLayout;
  130. }
  131. set
  132. {
  133. if (value != this.m_BackgroundImageLayout)
  134. {
  135. this.m_BackgroundImageLayout = value;
  136. this.Feedback();
  137. }
  138. }
  139. }
  140. private bool m_BackgroundImageGrayOnDisabled = false;
  141. /// <summary>
  142. /// 状态禁用时背景图是否变灰
  143. /// </summary>
  144. public bool BackgroundImageGrayOnDisabled
  145. {
  146. get
  147. {
  148. return this.m_BackgroundImageGrayOnDisabled;
  149. }
  150. set
  151. {
  152. if (value != this.m_BackgroundImageGrayOnDisabled)
  153. {
  154. this.m_BackgroundImageGrayOnDisabled = value;
  155. this.Feedback();
  156. }
  157. }
  158. }
  159. }
  160. }