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.

ThumbUserControl.cs

Description du code

ThumbUserControl.cs est un fichier du projet BrolExplorer.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/brolexplorer/.

Projet BrolExplorer :

Explorateur de media en CSharp.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using System.IO;
  9.  
  10. namespace be.gaudry.explorer.view.controls
  11. {
  12. public partial class ThumbUserControl : UserControl
  13. {
  14. private Color mouseOverBgColor, mouseOverForeColor, mouseOutBgColor, mouseOutForeColor;
  15. private String path;
  16. private int index;
  17. public delegate void OnThumbClickHandler(object sender, String path);
  18. public ThumbUserControl()
  19. {
  20. mouseOverBgColor = SystemColors.Highlight;
  21. mouseOverForeColor = SystemColors.HighlightText;
  22. mouseOutBgColor = SystemColors.Control;
  23. mouseOutForeColor = SystemColors.ControlText;
  24. InitializeComponent();
  25. }
  26. public ThumbUserControl(int index)
  27. : this()
  28. {
  29. this.index = index;
  30. }
  31. [
  32. //Category("MyEvents"),
  33. Browsable(true),
  34. Description("Event called on click on the thumb")
  35. ]
  36. public event OnThumbClickHandler thumbClick;
  37.  
  38. [
  39. Category("Appearance"),
  40. Browsable(true),
  41. Description("Path of the image file")
  42. ]
  43. public String ImageLocation
  44. {
  45. get
  46. {
  47. return this.path;
  48. }
  49. set
  50. {
  51. if (index != 0)
  52. {
  53. this.fileNameLbl.Text = String.Format("{0} : {1}", index, Path.GetFileNameWithoutExtension(value));
  54. }
  55. else
  56. {
  57. this.fileNameLbl.Text = Path.GetFileNameWithoutExtension(value);
  58. }
  59. this.path = value;
  60. pictureBox1.ImageLocation = value;
  61. /*pictureBox1.Image = bmp.GetThumbnailImage(
  62.   pictureBox1.Width,
  63.   pictureBox1.Height,
  64.   null,
  65.   new IntPtr()
  66.   );
  67.  
  68.   pictureBox1.Image = getThumbnail(
  69.   this.path,
  70.   pictureBox1.Width,
  71.   pictureBox1.Height
  72.   );
  73.   */
  74. }
  75. }
  76.  
  77.  
  78.  
  79.  
  80. [
  81. Category("Appearance"),
  82. Browsable(true),
  83. Description("Background ColorAvgLum used on muse over")
  84. ]
  85. public Color MouseOverBackgroundColor
  86. {
  87. get
  88. {
  89. return mouseOverBgColor;
  90. }
  91. set
  92. {
  93. mouseOverBgColor = value;
  94. }
  95. }
  96. [
  97. Category("Appearance"),
  98. Browsable(true),
  99. Description("Fore ColorAvgLum used on muse over")
  100. ]
  101. public Color MouseOverForeColor
  102. {
  103. get
  104. {
  105. return mouseOverForeColor;
  106. }
  107. set
  108. {
  109. mouseOverForeColor = value;
  110. }
  111. }
  112. [
  113. Category("Appearance"),
  114. Browsable(true),
  115. Description("Background ColorAvgLum used on muse out (normal back color)")
  116. ]
  117. public Color MouseOutBackgroundColor
  118. {
  119. get
  120. {
  121. return mouseOutBgColor;
  122. }
  123. set
  124. {
  125. mouseOutBgColor = value;
  126. }
  127. }
  128. [
  129. Category("Appearance"),
  130. Browsable(true),
  131. Description("Fore ColorAvgLum used on muse out (normal Fore color)")
  132. ]
  133. public Color MouseOutForeColor
  134. {
  135. get
  136. {
  137. return mouseOutForeColor;
  138. }
  139. set
  140. {
  141. mouseOutForeColor = value;
  142. }
  143. }
  144.  
  145. private void MouseEnterAction(object sender, EventArgs e)
  146. {
  147. this.BackColor = mouseOverBgColor;
  148. this.ForeColor = mouseOverForeColor;
  149. }
  150.  
  151. private void MouseLeaveAction(object sender, EventArgs e)
  152. {
  153. this.BackColor = mouseOutBgColor;
  154. this.ForeColor = mouseOutForeColor;
  155. }
  156.  
  157. private void ClickAction(object sender, EventArgs e)
  158. {
  159. if (thumbClick != null)
  160. {
  161. thumbClick(sender, path);
  162. }
  163. }
  164.  
  165. internal void setImage(Image img, string path)
  166. {
  167. this.fileNameLbl.Text = "thumb";// Path.GetFileNameWithoutExtension(path);
  168. this.path = path;
  169. pictureBox1.Image = img;
  170. }
  171. }
  172. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/brolexplorer/view/controls/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1716957576 29/05/2024 06:39:36
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/brolexplorer/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .resx|.resxThumbUserControl.resx5.68 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csSearchMediaUserControl.Designer.cs52.01 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csImagesBrowserUserControl.cs9.69 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csExplorerUserControl.cs38.67 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csExplorerUserControl.Designer.cs44.73 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxExplorerUserControl.resx15.83 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxImagesBrowserUserControl.resx6.06 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csImagesBrowserUserControl.Designer.cs10.53 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csThumbUserControl.Designer.cs3.29 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxSearchMediaUserControl.resx7.72 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csSearchMediaUserControl.cs25.76 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csThumbUserControl.cs4.7 Ko31/10/2018 18:32:50-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 30/10/2009, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/cs-brolexplorer-source-rf-view/controls/ThumbUserControl.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.