Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Office2007Helpers.cs

Description du code

Office2007Helpers.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;
  15. using System.Drawing;
  16. using System.Drawing.Drawing2D;
  17. using System.Drawing.Text;
  18.  
  19. namespace Office2007Renderer
  20. {
  21. /// <summary>
  22. /// Set the SmoothingMode=AntiAlias until instance disposed.
  23. /// </summary>
  24. public class UseAntiAlias : IDisposable
  25. {
  26. #region Instance Fields
  27. private Graphics _g;
  28. private SmoothingMode _old;
  29. #endregion
  30.  
  31. #region Identity
  32. /// <summary>
  33. /// Initialize a new instance of the UseAntiAlias class.
  34. /// </summary>
  35. /// <param name="g">Graphics instance.</param>
  36. public UseAntiAlias(Graphics g)
  37. {
  38. _g = g;
  39. _old = _g.SmoothingMode;
  40. _g.SmoothingMode = SmoothingMode.AntiAlias;
  41. }
  42.  
  43. /// <summary>
  44. /// Revert the SmoothingMode back to original setting.
  45. /// </summary>
  46. public void Dispose()
  47. {
  48. _g.SmoothingMode = _old;
  49. }
  50. #endregion
  51. }
  52.  
  53. /// <summary>
  54. /// Set the TextRenderingHint.ClearTypeGridFit until instance disposed.
  55. /// </summary>
  56. public class UseClearTypeGridFit : IDisposable
  57. {
  58. #region Instance Fields
  59. private Graphics _g;
  60. private TextRenderingHint _old;
  61. #endregion
  62.  
  63. #region Identity
  64. /// <summary>
  65. /// Initialize a new instance of the UseClearTypeGridFit class.
  66. /// </summary>
  67. /// <param name="g">Graphics instance.</param>
  68. public UseClearTypeGridFit(Graphics g)
  69. {
  70. _g = g;
  71. _old = _g.TextRenderingHint;
  72. _g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  73.  
  74. }
  75.  
  76. /// <summary>
  77. /// Revert the TextRenderingHint back to original setting.
  78. /// </summary>
  79. public void Dispose()
  80. {
  81. _g.TextRenderingHint = _old;
  82. }
  83. #endregion
  84. }
  85.  
  86. /// <summary>
  87. /// Set the clipping region until instance disposed.
  88. /// </summary>
  89. public class UseClipping : IDisposable
  90. {
  91. #region Instance Fields
  92. private Graphics _g;
  93. private Region _old;
  94. #endregion
  95.  
  96. #region Identity
  97. /// <summary>
  98. /// Initialize a new instance of the UseClipping class.
  99. /// </summary>
  100. /// <param name="g">Graphics instance.</param>
  101. /// <param name="path">Clipping path.</param>
  102. public UseClipping(Graphics g, GraphicsPath path)
  103. {
  104. _g = g;
  105. _old = g.Clip;
  106. Region clip = _old.Clone();
  107. clip.Intersect(path);
  108. _g.Clip = clip;
  109. }
  110.  
  111. /// <summary>
  112. /// Initialize a new instance of the UseClipping class.
  113. /// </summary>
  114. /// <param name="g">Graphics instance.</param>
  115. /// <param name="region">Clipping region.</param>
  116. public UseClipping(Graphics g, Region region)
  117. {
  118. _g = g;
  119. _old = g.Clip;
  120. Region clip = _old.Clone();
  121. clip.Intersect(region);
  122. _g.Clip = clip;
  123. }
  124.  
  125. /// <summary>
  126. /// Revert clipping back to origina setting.
  127. /// </summary>
  128. public void Dispose()
  129. {
  130. _g.Clip = _old;
  131. }
  132. #endregion
  133. }
  134.  
  135. }

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 octets1717754341 07/06/2024 11:59:01
| _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.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 16/10/2009 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/cs-broldev-source-rf-view/style//Office2007Helpers.cs.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.