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.

AWSFilm.cs

Description du code

AWSFilm.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.Text;
  4. using System.Drawing;
  5. using System.ComponentModel;
  6.  
  7. namespace be.gaudry.bibliobrol.model.aws
  8. {
  9. public class AWSFilm
  10. {
  11. #region declarations and constructors
  12. private string upc, title, description, rating, runningTime, releasedDate, webPageUrl, imageUrl;
  13. private string[] actors, directors;
  14. private BindingList<Actor> brolActors;
  15. private ActorRole rActor, rRealisator;
  16. public Bitmap ImageCache = null;
  17.  
  18. public AWSFilm() { }
  19. public AWSFilm(string title, string upc, string description, string[] actors, string[] directors, string rating, string runningTime, string releasedDate, string webPageUrl, string imageUrl)
  20. {
  21. //this.actors = new string[] { };
  22. //this.directors = new string[] { };
  23.  
  24. this.upc = checkString(upc);
  25. this.title = checkString(title);
  26. this.description = checkString(description);
  27. this.actors = actors;
  28. this.directors = directors;
  29. this.rating = checkString(rating);
  30. this.runningTime = checkString(runningTime);
  31. this.releasedDate = checkString(releasedDate);
  32. this.webPageUrl = checkString(webPageUrl);
  33. this.imageUrl = checkString(imageUrl);
  34. rActor = ModelAdapter.getRole(1);
  35. rRealisator = ModelAdapter.getRole(5);
  36. }
  37. public AWSFilm(string title, string upc, string description, string actors, string directors, string rating, string releasedDate, string webPageUrl, string imageUrl)
  38. {
  39. this.actors = new string[] { };
  40. this.directors = new string[] { };
  41.  
  42. this.upc = checkString(upc);
  43. this.title = checkString(title);
  44. this.description = checkString(description);
  45. this.actors[0] = actors;
  46. this.directors[0] = directors;
  47. this.rating = checkString(rating);
  48. this.runningTime = checkString(runningTime);
  49. this.releasedDate = checkString(releasedDate);
  50. this.webPageUrl = checkString(webPageUrl);
  51. this.imageUrl = checkString(imageUrl);
  52. rActor = ModelAdapter.getRole(1);
  53. rRealisator = ModelAdapter.getRole(5);
  54. }
  55. #endregion
  56.  
  57. #region properties
  58.  
  59. public string UPC
  60. {
  61. get
  62. {
  63. return this.upc;
  64. }
  65. }
  66.  
  67. public string Title
  68. {
  69. get
  70. {
  71. return this.title;
  72. }
  73. }
  74.  
  75. public string Description
  76. {
  77. get
  78. {
  79. return this.description;
  80. }
  81. }
  82. public BindingList<Actor> Actors
  83. {
  84. get
  85. {
  86. if (brolActors == null)
  87. {
  88. brolActors = new BindingList<Actor>();
  89. if (actors != null)
  90. {
  91. Actor actor;
  92. ActorRole role = rActor;//new ActorRole();
  93. //role.Name = "Acteur";
  94. char[] separator = new char[]{' '};
  95. foreach (string s in actors)
  96. {
  97. s.Trim();
  98. actor = new Actor();
  99. actor.Role = role;
  100. string[] splited = s.Split(separator, 2);
  101. if (splited.Length > 0)
  102. {
  103. actor.FirstName = splited[0];
  104. }
  105. if (splited.Length > 1)
  106. {
  107. actor.LastName = splited[1];
  108. }
  109. //actor.Pseudo = s;
  110. brolActors.Add(actor);
  111. }
  112.  
  113. role = rRealisator;//new ActorRole();
  114. //role.Name = "Réalisateur";
  115. foreach (string s in directors)
  116. {
  117. s.Trim();
  118. actor = new Actor();
  119. actor.Role = role;
  120. string[] splited = s.Split(separator, 2);
  121. if (splited.Length > 0)
  122. {
  123. actor.FirstName = splited[0];
  124. }
  125. if (splited.Length > 1)
  126. {
  127. actor.LastName = splited[1];
  128. }
  129. //actor.Pseudo = s;
  130. brolActors.Add(actor);
  131. }
  132. }
  133. }
  134. return brolActors;
  135. }
  136. }
  137. /*
  138.   /// <summary>
  139.   /// Single string with actors, separated by system line returns
  140.   /// </summary>
  141.   public string Actors
  142.   {
  143.   get
  144.   {
  145.   return arrayToString(actors);
  146.   }
  147.   }
  148.  
  149.   public string[] ActorsArray
  150.   {
  151.   get
  152.   {
  153.   return actors;
  154.   }
  155.   }*/
  156.  
  157. /// <summary>
  158. /// Single string with directors, separated by system line returns
  159. /// </summary>
  160. public string Directors
  161. {
  162. get
  163. {
  164. return arrayToString(directors);
  165. }
  166. }
  167.  
  168. public string[] DirectorsArray
  169. {
  170. get
  171. {
  172. return directors;
  173. }
  174. }
  175.  
  176. public string ImageUrl
  177. {
  178. get
  179. {
  180. return this.imageUrl;
  181. }
  182. set
  183. {
  184. imageUrl = value;
  185. }
  186. }
  187.  
  188. public string Rating
  189. {
  190. get
  191. {
  192. return this.rating;
  193. }
  194. }
  195.  
  196. public string ReleasedDate
  197. {
  198. get
  199. {
  200. return this.releasedDate;
  201. }
  202.  
  203. }
  204.  
  205.  
  206. public string RunningTime
  207. {
  208. get
  209. {
  210. return this.runningTime;
  211. }
  212. }
  213.  
  214.  
  215. public string WebPageUrl
  216. {
  217. get
  218. {
  219. return this.webPageUrl;
  220. }
  221. }
  222. #endregion
  223.  
  224. #region overrided methods
  225. public override string ToString()
  226. {
  227. return String.Format("{0} {1}", this.title, this.releasedDate);
  228. }
  229. #endregion
  230.  
  231. #region private methods
  232. /// <summary>
  233. /// Converts null strings to the empty string.
  234. /// </summary>
  235. /// <param name="str">String to check against Nothing.</param>
  236. /// <returns>If the original value is _, returns the empty string. Else, returns the original value.</returns>
  237. /// <remarks></remarks>
  238. private static string checkString(string str)
  239. {
  240. return (str == null)?"":str;
  241. }
  242. /// <summary>
  243. /// Get string from strings array. Strings are separated by a system line return
  244. /// </summary>
  245. /// <param name="strs">Strings array to transform</param>
  246. /// <returns>Single String (String.Empty if the array is null or empty)</returns>
  247. private string arrayToString(string[] strs)
  248. {
  249. if (strs != null)
  250. {
  251. StringBuilder str = new StringBuilder();
  252. foreach (string s in strs)
  253. {
  254. str.AppendLine(s);
  255. }
  256. return str.ToString();
  257. }
  258. return String.Empty;
  259. }
  260. #endregion
  261. }
  262. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/aws/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1717343955 02/06/2024 17:59:15
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/aws/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csAWSSearchResult.cs2.26 Ko31/10/2018 18:32:53-refusé-
Afficher le fichier .cs|.csAWSSearchIndices.cs4.46 Ko31/10/2018 18:32:53-refusé-
Afficher le fichier .cs|.csAWSFilm.cs7.99 Ko31/10/2018 18:32:53-refusé-
Afficher le fichier .cs|.csAWSHelper.cs9.27 Ko31/10/2018 18:32:53-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-bibliobrol-source-rf-model/aws/AWSFilm.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.