No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

BrolInfoControl.cs

Description du code

BrolInfoControl.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. using be.gaudry.bibliobrol.model;
  9. using be.gaudry.bibliobrol.view.dialogs;
  10. using be.gaudry.bibliobrol.view.utils;
  11.  
  12.  
  13. namespace be.gaudry.bibliobrol.view.controls
  14. {
  15. public partial class BrolInfoControl : UserControl
  16. {
  17. #region declarations and constructors
  18. private Brol brol;
  19. public BrolInfoControl()
  20. {
  21. InitializeComponent();
  22. //initPresentation();
  23. }
  24. #endregion
  25.  
  26. #region public methods
  27. public Brol getBrol()
  28. {
  29. return this.brol;
  30. }
  31. public void setBrol(Brol brol)
  32. {
  33. this.brol = brol;
  34. fillInfoTP();
  35. }
  36.  
  37. public void reset()
  38. {
  39. cleanInfoTP();
  40. }
  41. #endregion
  42.  
  43. #region display media
  44. private void cleanInfoTP()
  45. {
  46. infoSynopsisRTB.Text = "";
  47. infoTitleLbl.Text = "";
  48. infoActorsLB.Items.Clear();
  49. infoCategoriesLB.Items.Clear();
  50. infoSeriesLB.Items.Clear();
  51. infoCotationLbl.Text = "Cote : ";
  52. }
  53. private void fillInfoTP()
  54. {
  55. coverPB.ImageLocation = Img.getBrolImgPath(brol);
  56. toolTip1.SetToolTip(this.coverPB, coverPB.ImageLocation);
  57. coverPB.Size = new System.Drawing.Size(111, 149);
  58. infoTitleLbl.Text = brol.Title;
  59. infoSynopsisRTB.Text = brol.Synopsis;
  60. infoCommentRTB.Text = brol.Comment;
  61. if(brol.Date.Equals(new DateTime(0L)))
  62. {
  63. dateLbl.Text = "Date indéterminée";
  64. }
  65. else
  66. {
  67. dateLbl.Text = String.Format("Date de sortie : {0}", brol.Date.ToShortDateString());
  68. }
  69.  
  70. infoCategoriesLB.Items.Clear();
  71. infoCategoriesLB.Items.AddRange(brol.Categories.ToArray());
  72. int i = infoCategoriesLB.Items.Count;
  73. infoCategoriesLbl.Text = i + " catégorie(s) : ";
  74. infoCategoriesLB.Visible = (i > 0);
  75.  
  76. infoActorsLB.Items.Clear();
  77. infoActorsLB.Items.AddRange(brol.Actors.ToArray());
  78. i = infoActorsLB.Items.Count;
  79. infoActorsLbl.Text = i + " personne(s) / rôle(s) : ";
  80. infoActorsLB.Visible = (i > 0);
  81. infoCotationLbl.Text = "Cote : " + brol.Cotation + "/10";
  82.  
  83. infoSeriesLB.Items.Clear();
  84. infoSeriesLB.Items.AddRange(brol.SerieItems.ToArray());
  85. i = infoSeriesLB.Items.Count;
  86. infoSeriesLbl.Text = i + " séries(s) : ";
  87. infoSeriesLB.Visible = (i > 0);
  88. }
  89. #endregion
  90.  
  91. #region controls presentation
  92. /*
  93.   private void initPresentation()
  94.   {
  95.   this.SuspendLayout();
  96.   setControlPresentation(actorsPanel);
  97.   setControlPresentation(seriesPanel);
  98.   setControlPresentation(categoryPanel);
  99.   setControlPresentation(dateCotationPanel);
  100.   setControlPresentation(infoActorsLB);
  101.   setControlPresentation(infoSeriesLB);
  102.   setControlPresentation(infoCategoriesLB);
  103.   this.ResumeLayout(false);
  104.   }
  105.  
  106.   private void setControlPresentation(Panel p)
  107.   {
  108.   p.BorderStyle = BorderStyle.None;
  109.   p.Padding = new Padding(3);
  110.   p.ForeColor = p.Parent.ForeColor;// Color.Black;
  111.   p.BackColor = p.Parent.BackColor;// Color.WhiteSmoke;
  112.   }
  113.  
  114.   private void setControlPresentation(ListBox lb)
  115.   {
  116.   lb.BorderStyle = BorderStyle.None;
  117.   lb.Padding = new Padding(3);
  118.   lb.ForeColor = lb.Parent.ForeColor;// Color.Black;
  119.   lb.BackColor = lb.Parent.BackColor;// Color.WhiteSmoke;
  120.   }
  121.   */
  122. #endregion
  123.  
  124.  
  125. private void otherBrolsTsMi_Click(object sender, EventArgs e)
  126. {
  127. MessageBox.Show("Fonction non disponible");
  128. }
  129.  
  130. private void actorInfoTsMi_Click(object sender, EventArgs e)
  131. {
  132. if (infoActorsLB.SelectedItem != null)
  133. {
  134. Person person = infoActorsLB.SelectedItem as Person;
  135. if (person != null)
  136. {
  137. PersonInfoForm pif = new PersonInfoForm();
  138. pif.setPerson(person);
  139. pif.ShowDialog(this);
  140. }
  141. }
  142.  
  143. }
  144.  
  145. private void actorCMS_Opening(object sender, CancelEventArgs e)
  146. {
  147. actorInfoTsMi.Enabled = false;
  148. otherBrolsTsMi.Enabled = false;
  149. if (infoActorsLB.SelectedItem != null)
  150. {
  151. Person person = infoActorsLB.SelectedItem as Person;
  152. if (person != null)
  153. {
  154. actorInfoTsMi.Enabled = true;
  155. otherBrolsTsMi.Enabled = true;
  156. }
  157. }
  158.  
  159. }
  160. }
  161. }

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 octets1718265467 13/06/2024 09:57:47
| _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.

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-bibliobrol-source-rf-view/controls//BrolInfoControl.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.