Sprite.Property.04.BackColor.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using System.Drawing;
  2. using System.Windows.Forms;
  3. namespace Microsoft.Windows.Forms
  4. {
  5. public partial class Sprite
  6. {
  7. private BlendStyle m_BackColorBlendStyle = BlendStyle.Solid;
  8. /// <summary>
  9. /// 背景色混合样式
  10. /// </summary>
  11. public BlendStyle BackColorBlendStyle
  12. {
  13. get
  14. {
  15. return this.m_BackColorBlendStyle;
  16. }
  17. set
  18. {
  19. if (value != this.m_BackColorBlendStyle)
  20. {
  21. this.m_BackColorBlendStyle = value;
  22. this.Feedback();
  23. }
  24. }
  25. }
  26. private Color m_BackColor = DefaultTheme.BackColor;
  27. /// <summary>
  28. /// 背景色
  29. /// </summary>
  30. public Color BackColor
  31. {
  32. get
  33. {
  34. return this.m_BackColor;
  35. }
  36. set
  37. {
  38. if (value != this.m_BackColor)
  39. {
  40. this.m_BackColor = value;
  41. this.Feedback();
  42. }
  43. }
  44. }
  45. private Color m_BackColorHovered = DefaultTheme.BackColor + DefaultTheme.BackColorHoveredVector;
  46. /// <summary>
  47. /// 背景鼠标移上颜色向量
  48. /// </summary>
  49. public Color BackColorHovered
  50. {
  51. get
  52. {
  53. return this.m_BackColorHovered;
  54. }
  55. set
  56. {
  57. if (value != this.m_BackColorHovered)
  58. {
  59. this.m_BackColorHovered = value;
  60. this.Feedback();
  61. }
  62. }
  63. }
  64. private Color m_BackColorPressed = DefaultTheme.BackColor + DefaultTheme.BackColorPressedVector;
  65. /// <summary>
  66. /// 背景鼠标按下颜色向量
  67. /// </summary>
  68. public Color BackColorPressed
  69. {
  70. get
  71. {
  72. return this.m_BackColorPressed;
  73. }
  74. set
  75. {
  76. if (value != this.m_BackColorPressed)
  77. {
  78. this.m_BackColorPressed = value;
  79. this.Feedback();
  80. }
  81. }
  82. }
  83. private Color m_BackColorFocused = DefaultTheme.BackColor + DefaultTheme.BackColorFocusedVector;
  84. /// <summary>
  85. /// 背景拥有焦点颜色向量
  86. /// </summary>
  87. public Color BackColorFocused
  88. {
  89. get
  90. {
  91. return this.m_BackColorFocused;
  92. }
  93. set
  94. {
  95. if (value != this.m_BackColorFocused)
  96. {
  97. this.m_BackColorFocused = value;
  98. this.Feedback();
  99. }
  100. }
  101. }
  102. private Color m_BackColorDisabled = DefaultTheme.BackColor + DefaultTheme.BackColorDisabledVector;
  103. /// <summary>
  104. /// 背景状态禁用颜色向量
  105. /// </summary>
  106. public Color BackColorDisabled
  107. {
  108. get
  109. {
  110. return this.m_BackColorDisabled;
  111. }
  112. set
  113. {
  114. if (value != this.m_BackColorDisabled)
  115. {
  116. this.m_BackColorDisabled = value;
  117. this.Feedback();
  118. }
  119. }
  120. }
  121. private Color m_BackColorHighlight = DefaultTheme.BackColor + DefaultTheme.BackColorHighlightVector;
  122. /// <summary>
  123. /// 背景高亮颜色向量
  124. /// </summary>
  125. public Color BackColorHighlight
  126. {
  127. get
  128. {
  129. return this.m_BackColorHighlight;
  130. }
  131. set
  132. {
  133. if (value != this.m_BackColorHighlight)
  134. {
  135. this.m_BackColorHighlight = value;
  136. this.Feedback();
  137. }
  138. }
  139. }
  140. private float m_BackColorPos1 = 0.45f;
  141. /// <summary>
  142. /// 背景色位置1
  143. /// </summary>
  144. public float BackColorPos1
  145. {
  146. get
  147. {
  148. return this.m_BackColorPos1;
  149. }
  150. set
  151. {
  152. if (value != this.m_BackColorPos1)
  153. {
  154. this.m_BackColorPos1 = value;
  155. this.Feedback();
  156. }
  157. }
  158. }
  159. private float m_BackColorPos2 = 0.5f;
  160. /// <summary>
  161. /// 背景色位置2
  162. /// </summary>
  163. public float BackColorPos2
  164. {
  165. get
  166. {
  167. return this.m_BackColorPos2;
  168. }
  169. set
  170. {
  171. if (value != this.m_BackColorPos2)
  172. {
  173. this.m_BackColorPos2 = value;
  174. this.Feedback();
  175. }
  176. }
  177. }
  178. private TabAlignment m_BackColorAlign = TabAlignment.Top;
  179. /// <summary>
  180. /// 背景色,决定渐变方向,反转
  181. /// </summary>
  182. public TabAlignment BackColorAlign
  183. {
  184. get
  185. {
  186. return this.m_BackColorAlign;
  187. }
  188. set
  189. {
  190. if (value != this.m_BackColorAlign)
  191. {
  192. this.m_BackColorAlign = value;
  193. this.Feedback();
  194. }
  195. }
  196. }
  197. }
  198. }