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.

DirControl.cs

Description du code

DirControl.cs est un fichier du projet BiblioBrol.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.

Projet BiblioBrol :

Gestion de media en CSharp.

Pour plus d'infos, vous pouvez consulter la brève analyse.

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.  
  9.  
  10. namespace be.gaudry.bibliobrol.view.controls
  11. {
  12. public partial class DirControl : UserControl
  13. {
  14. #region constructor and declaration
  15. public delegate void DirPathModifiedHandler(object sender, DirPathModifiedEventArgs e);
  16. public event DirPathModifiedHandler dirPathModified;
  17. private FolderBrowserDialog fbDia;
  18. private String path;
  19.  
  20. /// <summary>
  21. /// UserControl to select a directory
  22. /// </summary>
  23. public DirControl()
  24. {
  25. InitializeComponent();
  26. }
  27. #endregion
  28.  
  29. #region getters and setters
  30. /// <summary>
  31. /// Title (directory name)
  32. /// </summary>
  33. public String DirTitle
  34. {
  35. get { return this.storeDirsLbl.Text; }
  36. set { this.storeDirsLbl.Text = "Répertoire de stockage des " + value; }
  37. }
  38. /// <summary>
  39. /// Informations to display
  40. /// </summary>
  41. public String Info
  42. {
  43. get { return this.storeDirInfosLbl.Text; }
  44. set { this.storeDirInfosLbl.Text = value; }
  45. }
  46. /// <summary>
  47. /// Path of the directory
  48. /// </summary>
  49. public String Path
  50. {
  51. get
  52. {
  53. return this.storeDirLbl.Text;
  54. }
  55. set
  56. {
  57. this.path = value;
  58. this.storeDirLbl.Text = value;
  59. }
  60. }
  61. #endregion
  62.  
  63. #region overrided methods
  64. /*public override String ToString()
  65.   {
  66.   return "Options : " + storeDirsLbl.Text;
  67.   }
  68.   public override int GetHashCode()
  69.   {
  70.   return this.ToString().GetHashCode();
  71.   }
  72.   public override bool Equals(Object o)
  73.   {
  74.   if (this == o) return true;
  75.   if (!(o is DirControl)) return false;
  76.   DirControl q = (DirControl)o;
  77.   if (!this.storeDirsLbl.Text.Equals(q.storeDirsLbl.Text)) return false;
  78.   return true;
  79.   }*/
  80. #endregion
  81.  
  82. #region events
  83.  
  84. private void modifyPath(String newPath)
  85. {
  86. if (dirPathModified != null && storeDirLbl.Text !=null && !newPath.Equals(path))
  87. {
  88. if (!System.IO.Directory.Exists(newPath))
  89. {
  90. DialogResult r = MessageBox.Show(
  91. this,
  92. String.Format("Le répertoire {0} n'existe pas,\nle sélectionner quand-même ?",newPath),
  93. "Sélection de répertoire",
  94. MessageBoxButtons.YesNo,
  95. MessageBoxIcon.Question,
  96. MessageBoxDefaultButton.Button1);
  97. if (!r.Equals(DialogResult.Yes)) return;
  98. }
  99. storeDirLbl.Text = newPath;
  100. dirPathModified(this, new DirPathModifiedEventArgs(newPath));
  101. path = newPath;
  102. }
  103. }
  104. private void browseBtn_Click(object sender, EventArgs e)
  105. {
  106. if (fbDia == null)
  107. {
  108. fbDia = new FolderBrowserDialog();
  109. fbDia.Description = storeDirInfosLbl.Text;
  110. fbDia.ShowNewFolderButton = true;
  111. fbDia.SelectedPath = storeDirLbl.Text;
  112. }
  113. if (fbDia.ShowDialog(this) == DialogResult.OK)
  114. {
  115. modifyPath(fbDia.SelectedPath);
  116. }
  117. }
  118.  
  119. private void editBtn_Click(object sender, EventArgs e)
  120. {
  121. if (editTB.Visible)
  122. {
  123. modifyPath(editTB.Text);
  124. editTB.Visible = false;
  125. editBtn.Text = "Modifier";
  126. editBtn.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolEditBtn;
  127. browseBtn.Enabled = true;
  128. }
  129. else
  130. {
  131. editTB.Text = storeDirLbl.Text;
  132. editTB.Visible = true;
  133. editBtn.Text = "Appliquer";
  134. editBtn.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolSaveBtn;
  135. browseBtn.Enabled = false;
  136. }
  137. #endregion
  138. }
  139. }
  140. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/view/controls/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1727475164 28/09/2024 00:12:44
| _dao0 octets1541007199 31/10/2018 18:33:19
| _toolBars0 octets1541007200 31/10/2018 18:33:20
| _webInfo0 octets1541007201 31/10/2018 18:33:21
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csPersonSelectControl.cs4.89 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csCreateStructureControl.cs7.49 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csDBSelectControl.cs3.23 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csPersonInfoControl.Designer.cs13.13 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxDirControl.resx5.68 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .resx|.resxBrolInfoControl.resx6.06 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csBrolEditControl.cs25.36 Ko31/10/2018 18:32:55-refusé-
Afficher le fichier .cs|.csPersonEditControl.cs15.67 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csSearchControl.cs18.88 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxDBSelectControl.resx5.88 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csBrolInfoControl.Designer.cs22.81 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csInfoControl.cs2.04 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csDirControl.Designer.cs5.83 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csSelectConsoleVerboseControl.cs5.49 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csPersonSelectedEventArgs.cs779 octets31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxSelectConsoleVerboseControl.resx5.68 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csTodoControl.cs13.73 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .cs|.csSelectConsoleVerboseControl.Designer.cs45.29 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csBrolEditControl.Designer.cs40.09 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csDBSelectControl.Designer.cs6.71 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csPersonEditControl.Designer.cs27.54 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxPersonInfoControl.resx6.42 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csCreateStructureControl.Designer.cs5 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csDirPathModifiedEventArgs.cs871 octets31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csInfoControl.Designer.cs3.18 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csBrolInfoControl.cs5.14 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .resx|.resxBrolEditControl.resx6.04 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csPersonInfoControl.cs2.22 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxInfoControl.resx5.68 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csDirControl.cs4.51 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .resx|.resxCreateStructureControl.resx6.44 Ko31/10/2018 18:32:56-refusé-
Afficher le fichier .cs|.csSerieEditControl.cs2.58 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .resx|.resxSerieEditControl.resx7.45 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .resx|.resxTodoControl.resx6.76 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .cs|.csTodoControl.Designer.cs28.27 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .resx|.resxSearchControl.resx6.43 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csPersonSelectControl.Designer.cs14.74 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csSearchControl.Designer.cs25.75 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .resx|.resxPersonEditControl.resx7.96 Ko31/10/2018 18:32:57-refusé-
Afficher le fichier .cs|.csSerieEditControl.Designer.cs6.65 Ko31/10/2018 18:32:58-refusé-
Afficher le fichier .resx|.resxPersonSelectControl.resx5.68 Ko31/10/2018 18:32:57-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-bibliobrol-source-rf-view/controls/DirControl.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.