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
Code c# (Office2007Helpers.cs) (135 lignes)
/********************************************************************/ /* Office 2007 Renderer Project */ /* */ /* Use the Office2007Renderer class as a custom renderer by */ /* providing it to the ToolStripManager.Renderer property. Then */ /* all tool strips, menu strips, status strips etc will be drawn */ /* using the Office 2007 style renderer in your application. */ /* */ /* Author: Phil Wright */ /* Website: www.componentfactory.com */ /* Contact: phil.wright@componentfactory.com */ /********************************************************************/ using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Text; namespace Office2007Renderer { /// <summary> /// Set the SmoothingMode=AntiAlias until instance disposed. /// </summary> public class UseAntiAlias : IDisposable { #region Instance Fields private Graphics _g; private SmoothingMode _old; #endregion #region Identity /// <summary> /// Initialize a new instance of the UseAntiAlias class. /// </summary> /// <param name="g">Graphics instance.</param> public UseAntiAlias(Graphics g) { _g = g; _old = _g.SmoothingMode; _g.SmoothingMode = SmoothingMode.AntiAlias; } /// <summary> /// Revert the SmoothingMode back to original setting. /// </summary> public void Dispose() { _g.SmoothingMode = _old; } #endregion } /// <summary> /// Set the TextRenderingHint.ClearTypeGridFit until instance disposed. /// </summary> public class UseClearTypeGridFit : IDisposable { #region Instance Fields private Graphics _g; private TextRenderingHint _old; #endregion #region Identity /// <summary> /// Initialize a new instance of the UseClearTypeGridFit class. /// </summary> /// <param name="g">Graphics instance.</param> public UseClearTypeGridFit(Graphics g) { _g = g; _old = _g.TextRenderingHint; _g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; } /// <summary> /// Revert the TextRenderingHint back to original setting. /// </summary> public void Dispose() { _g.TextRenderingHint = _old; } #endregion } /// <summary> /// Set the clipping region until instance disposed. /// </summary> public class UseClipping : IDisposable { #region Instance Fields private Graphics _g; private Region _old; #endregion #region Identity /// <summary> /// Initialize a new instance of the UseClipping class. /// </summary> /// <param name="g">Graphics instance.</param> /// <param name="path">Clipping path.</param> public UseClipping(Graphics g, GraphicsPath path) { _g = g; _old = g.Clip; Region clip = _old.Clone(); clip.Intersect(path); _g.Clip = clip; } /// <summary> /// Initialize a new instance of the UseClipping class. /// </summary> /// <param name="g">Graphics instance.</param> /// <param name="region">Clipping region.</param> public UseClipping(Graphics g, Region region) { _g = g; _old = g.Clip; Region clip = _old.Clone(); clip.Intersect(region); _g.Clip = clip; } /// <summary> /// Revert clipping back to origina setting. /// </summary> public void Dispose() { _g.Clip = _old; } #endregion } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1732285743 22/11/2024 15:29:03 |
| _ | vista | 0 octets | 1541007202 31/10/2018 18:33:22 |
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.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-broldev-source-rf-view/style//Office2007Helpers.cs.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.