Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

BrolBoxUserControl.cs

Description du code

BrolBoxUserControl.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. using System;
  2. using System.ComponentModel;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. using be.gaudry.view.style;
  6.  
  7. namespace be.gaudry.view.controls
  8. {
  9. [
  10. Docking(DockingBehavior.Ask),
  11. ToolboxBitmap(@"BrolBoxUserControl.displayMenuTop")
  12. ]
  13. public partial class BrolBoxUserControl : UserControl
  14. {
  15. #region declarations constructors and destructors
  16.  
  17. private EventHandler rendererChangedEvent;
  18. private bool useContentGradient, useCaptionGradient;
  19. private System.Drawing.Drawing2D.LinearGradientBrush gradientBrush;
  20.  
  21. public BrolBoxUserControl()
  22. {
  23. useContentGradient = true;
  24. useCaptionGradient = true;
  25. rendererChangedEvent = new EventHandler(onRendererChanged);
  26. InitializeComponent(); this.SetStyle(ControlStyles.ResizeRedraw, true);
  27. this.SetStyle(ControlStyles.UserPaint, true);
  28. this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
  29. this.SetStyle(ControlStyles.DoubleBuffer, true);
  30. StyleFactory.Instance.onRendererChanged += rendererChangedEvent;
  31. initGradientBackground();
  32. }
  33. ~BrolBoxUserControl()
  34. {
  35. StyleFactory.Instance.onRendererChanged -= rendererChangedEvent;
  36. Dispose(false);
  37. }
  38. #endregion
  39.  
  40. #region properties
  41. [
  42. Description("Enable/Disable using gradient colors for the content. False to use control color."),
  43. Category("BrolBox features"),
  44. DefaultValue(true),
  45. Browsable(true)
  46. ]
  47. public bool UseContentGradient
  48. {
  49. get
  50. {
  51. return useContentGradient;
  52. }
  53. set
  54. {
  55. useContentGradient = value;
  56. initGradientBackground();
  57. }
  58. }
  59. [
  60. Description("Enable/Disable using gradient colors for the content. False to use control color."),
  61. Category("BrolBox features"),
  62. DefaultValue(true),
  63. Browsable(true)
  64. ]
  65. public bool UseCaptionGradient
  66. {
  67. get
  68. {
  69. return useCaptionGradient;
  70. }
  71. set
  72. {
  73. useCaptionGradient = value;
  74. initGradientBackground();
  75. }
  76. }
  77.  
  78. [
  79. Description("Change the caption text to be displayed"),
  80. Category("BrolBox features"),
  81. DefaultValue(""),
  82. Browsable(true)
  83. ]
  84. public String CaptionText
  85. {
  86. get
  87. {
  88. return captionLbl.Text;
  89. }
  90. set
  91. {
  92. captionLbl.Text = value;
  93. Invalidate();
  94. }
  95. }
  96. [
  97. Description("Change the icon to display in the title"),
  98. Category("BrolBox features"),
  99. DefaultValue(null),
  100. Browsable(true)
  101. ]
  102. public Image CaptionImage
  103. {
  104. get
  105. {
  106. return captionPB.Image;
  107. }
  108. set
  109. {
  110. captionPB.Image = value;
  111. Invalidate();
  112. }
  113. }
  114.  
  115. #endregion
  116.  
  117. /// <summary>
  118. /// Defines a bitmap as BackgroundImageLayout to avoid gradient background flickering
  119. /// on paint event
  120. /// </summary>
  121. private void initGradientBackground()
  122. {
  123. /*gradientBrush = new System.Drawing.Drawing2D.LinearGradientBrush(new
  124.   Point(0, 0),
  125.   new Point(captionPanel.Width, captionPanel.Height),
  126.   StyleFactory.CustomSystemColors.ActiveCaption,
  127.   StyleFactory.CustomSystemColors.GradientActiveCaption
  128.   );*/
  129. gradientBrush = new System.Drawing.Drawing2D.LinearGradientBrush(
  130. new Rectangle(0, 0, captionPanel.Width, captionPanel.Height),
  131. StyleFactory.CustomSystemColors.ActiveCaption,
  132. StyleFactory.CustomSystemColors.GradientActiveCaption,
  133. System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal
  134. );
  135. Bitmap bmp = new Bitmap(captionPanel.Width, captionPanel.Height);
  136. Graphics g = Graphics.FromImage(bmp);
  137. g.FillRectangle(gradientBrush, new Rectangle(0, 0, captionPanel.Width, captionPanel.Height));
  138. captionPanel.BackgroundImage = bmp;
  139. captionPanel.BackgroundImageLayout = ImageLayout.Stretch;
  140. }
  141.  
  142. private void onRendererChanged(object sender, EventArgs e)
  143. {
  144. initGradientBackground();
  145. }
  146. }
  147. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1714359998 29/04/2024 05:06:38
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csToolBarHomeControl.Designer.cs7.41 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.Designer.cs6.79 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanel.Designer.cs1.19 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.cs7.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csXPGroupBox.cs15.83 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.Designer.cs7.85 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csToolBarHomeControl.cs2.32 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csVersionControl.Designer.cs4.09 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.cs2.01 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .resx|.resxWizardXpUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.Designer.cs5.92 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxChartControl.resx6.58 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csHeaderPanel.cs35.93 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csIWizardUC.cs2.35 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxAboutUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.cs8.59 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.cs5.46 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxXPGroupBox.resx17.7 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanelNativeMethods.cs21.09 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.cs6.99 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.Designer.cs1.11 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxSystemInfoControl.resx6.22 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.Designer.cs4.79 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxHeaderPanel.resx5.85 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.cs5.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.cs4.7 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxDGVLayoutOptionsControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxWizardUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csUpdateControl.cs7.55 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.cs2.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csVersionControl.cs463 octets31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxBrolBoxUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csAboutUserControl.cs6.75 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxToolBarManagerControl.resx5.88 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.Designer.cs10.66 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIToolBarControl.cs1.07 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.cs8.11 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csImageCombo.cs15.49 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csAboutUserControl.Designer.cs12.31 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxScrollablePictureBoxUserControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.Designer.cs5.64 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxVersionControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csChartControl.Designer.cs18.45 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csUpdateControl.Designer.cs3.92 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxUpdateControl.resx5.68 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csChartControl.cs15.11 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.Designer.cs17.39 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolStrip.cs1.06 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.Designer.cs1.1 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxToolBarHomeControl.resx48.51 Ko31/10/2018 18:33:12-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.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 16/10/2009, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/cs-broldev-source-rf-view/controls/BrolBoxUserControl.cs.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.