Office2007ColorTable.cs

Description du code

Office2007ColorTable.cs est un fichier du projet BrolDev.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/broldev/src/.

Projet BrolDev : Librairie de composants réutilisables pour les applications BrolDev en CSharp.

Code source ou contenu du fichier

  1. /********************************************************************/
  2. /* Office 2007 Renderer Project */
  3. /* */
  4. /* Use the Office2007Renderer class as a custom renderer by */
  5. /* providing it to the ToolStripManager.Renderer property. Then */
  6. /* all tool strips, menu strips, status strips etc will be drawn */
  7. /* using the Office 2007 style renderer in your application. */
  8. /* */
  9. /* Author: Phil Wright */
  10. /* Website: www.componentfactory.com */
  11. /* Contact: phil.wright@componentfactory.com */
  12. /********************************************************************/
  13.  
  14. using System.Drawing;
  15. using System.Windows.Forms;
  16.  
  17. namespace Office2007Renderer
  18. {
  19. /// <summary>
  20. /// Provide Office 2007 Blue Theme colors
  21. /// </summary>
  22. public class Office2007ColorTable : ProfessionalColorTable
  23. {
  24. #region Static Fixed Colors - Blue Color Scheme
  25. private static Color _contextMenuBack = Color.FromArgb(250, 250, 250);
  26. private static Color _buttonPressedBegin = Color.FromArgb(248, 181, 106);
  27. private static Color _buttonPressedEnd = Color.FromArgb(255, 208, 134);
  28. private static Color _buttonPressedMiddle = Color.FromArgb(251, 140, 60);
  29. private static Color _buttonSelectedBegin = Color.FromArgb(255, 255, 222);
  30. private static Color _buttonSelectedEnd = Color.FromArgb(255, 203, 136);
  31. private static Color _buttonSelectedMiddle = Color.FromArgb(255, 225, 172);
  32. private static Color _menuItemSelectedBegin = Color.FromArgb(255, 213, 103);
  33. private static Color _menuItemSelectedEnd = Color.FromArgb(255, 228, 145);
  34. private static Color _checkBack = Color.FromArgb(255, 227, 149);
  35. private static Color _gripDark = Color.FromArgb(111, 157, 217);
  36. private static Color _gripLight = Color.FromArgb(255, 255, 255);
  37. private static Color _imageMargin = Color.FromArgb(233, 238, 238);
  38. private static Color _menuBorder = Color.FromArgb(134, 134, 134);
  39. private static Color _overflowBegin = Color.FromArgb(167, 204, 251);
  40. private static Color _overflowEnd = Color.FromArgb(101, 147, 207);
  41. private static Color _overflowMiddle = Color.FromArgb(167, 204, 251);
  42. private static Color _menuToolBack = Color.FromArgb(191, 219, 255);
  43. private static Color _separatorDark = Color.FromArgb(154, 198, 255);
  44. private static Color _separatorLight = Color.FromArgb(255, 255, 255);
  45. private static Color _statusStripLight = Color.FromArgb(215, 229, 247);
  46. private static Color _statusStripDark = Color.FromArgb(172, 201, 238);
  47. private static Color _toolStripBorder = Color.FromArgb(111, 157, 217);
  48. private static Color _toolStripContentEnd = Color.FromArgb(164, 195, 235);
  49. private static Color _toolStripBegin = Color.FromArgb(227, 239, 255);
  50. private static Color _toolStripEnd = Color.FromArgb(152, 186, 230);
  51. private static Color _toolStripMiddle = Color.FromArgb(222, 236, 255);
  52. private static Color _buttonBorder = Color.FromArgb(121, 153, 194);
  53. #endregion
  54.  
  55. #region Identity
  56. /// <summary>
  57. /// Initialize a new instance of the Office2007ColorTable class.
  58. /// </summary>
  59. public Office2007ColorTable()
  60. {
  61. }
  62. #endregion
  63.  
  64. #region ButtonPressed
  65. /// <summary>
  66. /// Gets the starting color of the gradient used when the button is pressed down.
  67. /// </summary>
  68. public override Color ButtonPressedGradientBegin
  69. {
  70. get { return _buttonPressedBegin; }
  71. }
  72.  
  73. /// <summary>
  74. /// Gets the end color of the gradient used when the button is pressed down.
  75. /// </summary>
  76. public override Color ButtonPressedGradientEnd
  77. {
  78. get { return _buttonPressedEnd; }
  79. }
  80.  
  81. /// <summary>
  82. /// Gets the middle color of the gradient used when the button is pressed down.
  83. /// </summary>
  84. public override Color ButtonPressedGradientMiddle
  85. {
  86. get { return _buttonPressedMiddle; }
  87. }
  88. #endregion
  89.  
  90. #region ButtonSelected
  91. /// <summary>
  92. /// Gets the starting color of the gradient used when the button is selected.
  93. /// </summary>
  94. public override Color ButtonSelectedGradientBegin
  95. {
  96. get { return _buttonSelectedBegin; }
  97. }
  98.  
  99. /// <summary>
  100. /// Gets the end color of the gradient used when the button is selected.
  101. /// </summary>
  102. public override Color ButtonSelectedGradientEnd
  103. {
  104. get { return _buttonSelectedEnd; }
  105. }
  106.  
  107. /// <summary>
  108. /// Gets the middle color of the gradient used when the button is selected.
  109. /// </summary>
  110. public override Color ButtonSelectedGradientMiddle
  111. {
  112. get { return _buttonSelectedMiddle; }
  113. }
  114.  
  115. /// <summary>
  116. /// Gets the border color to use with ButtonSelectedHighlight.
  117. /// </summary>
  118. public override Color ButtonSelectedHighlightBorder
  119. {
  120. get { return _buttonBorder; }
  121. }
  122. #endregion
  123.  
  124. #region Check
  125. /// <summary>
  126. /// Gets the solid color to use when the check box is selected and gradients are being used.
  127. /// </summary>
  128. public override Color CheckBackground
  129. {
  130. get { return _checkBack; }
  131. }
  132. #endregion
  133.  
  134. #region Grip
  135. /// <summary>
  136. /// Gets the color to use for shadow effects on the grip or move handle.
  137. /// </summary>
  138. public override Color GripDark
  139. {
  140. get { return _gripDark; }
  141. }
  142.  
  143. /// <summary>
  144. /// Gets the color to use for highlight effects on the grip or move handle.
  145. /// </summary>
  146. public override Color GripLight
  147. {
  148. get { return _gripLight; }
  149. }
  150. #endregion
  151.  
  152. #region ImageMargin
  153. /// <summary>
  154. /// Gets the starting color of the gradient used in the image margin of a ToolStripDropDownMenu.
  155. /// </summary>
  156. public override Color ImageMarginGradientBegin
  157. {
  158. get { return _imageMargin; }
  159. }
  160. #endregion
  161.  
  162. #region MenuBorder
  163. /// <summary>
  164. /// Gets the border color or a MenuStrip.
  165. /// </summary>
  166. public override Color MenuBorder
  167. {
  168. get { return _menuBorder; }
  169. }
  170. #endregion
  171.  
  172. #region MenuItem
  173. /// <summary>
  174. /// Gets the starting color of the gradient used when a top-level ToolStripMenuItem is pressed down.
  175. /// </summary>
  176. public override Color MenuItemPressedGradientBegin
  177. {
  178. get { return _toolStripBegin; }
  179. }
  180.  
  181. /// <summary>
  182. /// Gets the end color of the gradient used when a top-level ToolStripMenuItem is pressed down.
  183. /// </summary>
  184. public override Color MenuItemPressedGradientEnd
  185. {
  186. get { return _toolStripEnd; }
  187. }
  188.  
  189. /// <summary>
  190. /// Gets the middle color of the gradient used when a top-level ToolStripMenuItem is pressed down.
  191. /// </summary>
  192. public override Color MenuItemPressedGradientMiddle
  193. {
  194. get { return _toolStripMiddle; }
  195. }
  196.  
  197. /// <summary>
  198. /// Gets the starting color of the gradient used when the ToolStripMenuItem is selected.
  199. /// </summary>
  200. public override Color MenuItemSelectedGradientBegin
  201. {
  202. get { return _menuItemSelectedBegin; }
  203. }
  204.  
  205. /// <summary>
  206. /// Gets the end color of the gradient used when the ToolStripMenuItem is selected.
  207. /// </summary>
  208. public override Color MenuItemSelectedGradientEnd
  209. {
  210. get { return _menuItemSelectedEnd; }
  211. }
  212. #endregion
  213.  
  214. #region MenuStrip
  215. /// <summary>
  216. /// Gets the starting color of the gradient used in the MenuStrip.
  217. /// </summary>
  218. public override Color MenuStripGradientBegin
  219. {
  220. get { return _menuToolBack; }
  221. }
  222.  
  223. /// <summary>
  224. /// Gets the end color of the gradient used in the MenuStrip.
  225. /// </summary>
  226. public override Color MenuStripGradientEnd
  227. {
  228. get { return _menuToolBack; }
  229. }
  230. #endregion
  231.  
  232. #region OverflowButton
  233. /// <summary>
  234. /// Gets the starting color of the gradient used in the ToolStripOverflowButton.
  235. /// </summary>
  236. public override Color OverflowButtonGradientBegin
  237. {
  238. get { return _overflowBegin; }
  239. }
  240.  
  241. /// <summary>
  242. /// Gets the end color of the gradient used in the ToolStripOverflowButton.
  243. /// </summary>
  244. public override Color OverflowButtonGradientEnd
  245. {
  246. get { return _overflowEnd; }
  247. }
  248.  
  249. /// <summary>
  250. /// Gets the middle color of the gradient used in the ToolStripOverflowButton.
  251. /// </summary>
  252. public override Color OverflowButtonGradientMiddle
  253. {
  254. get { return _overflowMiddle; }
  255. }
  256. #endregion
  257.  
  258. #region RaftingContainer
  259. /// <summary>
  260. /// Gets the starting color of the gradient used in the ToolStripContainer.
  261. /// </summary>
  262. public override Color RaftingContainerGradientBegin
  263. {
  264. get { return _menuToolBack; }
  265. }
  266.  
  267. /// <summary>
  268. /// Gets the end color of the gradient used in the ToolStripContainer.
  269. /// </summary>
  270. public override Color RaftingContainerGradientEnd
  271. {
  272. get { return _menuToolBack; }
  273. }
  274. #endregion
  275.  
  276. #region Separator
  277. /// <summary>
  278. /// Gets the color to use to for shadow effects on the ToolStripSeparator.
  279. /// </summary>
  280. public override Color SeparatorDark
  281. {
  282. get { return _separatorDark; }
  283. }
  284.  
  285. /// <summary>
  286. /// Gets the color to use to for highlight effects on the ToolStripSeparator.
  287. /// </summary>
  288. public override Color SeparatorLight
  289. {
  290. get { return _separatorLight; }
  291. }
  292. #endregion
  293.  
  294. #region StatusStrip
  295. /// <summary>
  296. /// Gets the starting color of the gradient used on the StatusStrip.
  297. /// </summary>
  298. public override Color StatusStripGradientBegin
  299. {
  300. get { return _statusStripLight; }
  301. }
  302.  
  303. /// <summary>
  304. /// Gets the end color of the gradient used on the StatusStrip.
  305. /// </summary>
  306. public override Color StatusStripGradientEnd
  307. {
  308. get { return _statusStripDark; }
  309. }
  310. #endregion
  311.  
  312. #region ToolStrip
  313. /// <summary>
  314. /// Gets the border color to use on the bottom edge of the ToolStrip.
  315. /// </summary>
  316. public override Color ToolStripBorder
  317. {
  318. get { return _toolStripBorder; }
  319. }
  320.  
  321. /// <summary>
  322. /// Gets the starting color of the gradient used in the ToolStripContentPanel.
  323. /// </summary>
  324. public override Color ToolStripContentPanelGradientBegin
  325. {
  326. get { return _toolStripContentEnd; }
  327. }
  328.  
  329. /// <summary>
  330. /// Gets the end color of the gradient used in the ToolStripContentPanel.
  331. /// </summary>
  332. public override Color ToolStripContentPanelGradientEnd
  333. {
  334. get { return _menuToolBack; }
  335. }
  336.  
  337. /// <summary>
  338. /// Gets the solid background color of the ToolStripDropDown.
  339. /// </summary>
  340. public override Color ToolStripDropDownBackground
  341. {
  342. get { return _contextMenuBack; }
  343. }
  344.  
  345. /// <summary>
  346. /// Gets the starting color of the gradient used in the ToolStrip background.
  347. /// </summary>
  348. public override Color ToolStripGradientBegin
  349. {
  350. get { return _toolStripBegin; }
  351. }
  352.  
  353. /// <summary>
  354. /// Gets the end color of the gradient used in the ToolStrip background.
  355. /// </summary>
  356. public override Color ToolStripGradientEnd
  357. {
  358. get { return _toolStripEnd; }
  359. }
  360.  
  361. /// <summary>
  362. /// Gets the middle color of the gradient used in the ToolStrip background.
  363. /// </summary>
  364. public override Color ToolStripGradientMiddle
  365. {
  366. get { return _toolStripMiddle; }
  367. }
  368.  
  369. /// <summary>
  370. /// Gets the starting color of the gradient used in the ToolStripPanel.
  371. /// </summary>
  372. public override Color ToolStripPanelGradientBegin
  373. {
  374. get { return _menuToolBack; }
  375. }
  376.  
  377. /// <summary>
  378. /// Gets the end color of the gradient used in the ToolStripPanel.
  379. /// </summary>
  380. public override Color ToolStripPanelGradientEnd
  381. {
  382. get { return _menuToolBack; }
  383. }
  384. #endregion
  385. }
  386. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/style/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1730789673 05/11/2024 07:54:33
| _vista0 octets1541007202 31/10/2018 18:33:22
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/style/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csOffice2007Renderer.cs58.44 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csStyleHelper.cs1.44 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csProfessionalColorTableFactory.cs57.94 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csControlStyleColors.cs4.76 Ko31/10/2018 18:33:15-refusé-
Afficher le fichier .cs|.csCustomSystemColors.cs14.28 Ko31/10/2018 18:33:15-refusé-
Afficher le fichier .cs|.csStyleFactory.cs18.11 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csRebarRenderer.cs11.97 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csOrangeStyleColors.cs14.47 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csOffice2007ColorTable.cs13.46 Ko31/10/2018 18:33:15-refusé-
Afficher le fichier .cs|.csXpStyle.cs1.42 Ko31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csOffice2007Helpers.cs4.16 Ko31/10/2018 18:33:15-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

Version en cache

05/11/2024 07:54:33 Cette version de la page est en cache (à la date du 05/11/2024 07:54:33) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 16/10/2009, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/cs-broldev-source-rf-view/style//Office2007ColorTable.cs.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.