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.

AccessConfig.cs

Description du code

AccessConfig.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 be.gaudry.bibliobrol.model.enums;
  5. using be.gaudry.model.config;
  6. using be.gaudry.bibliobrol.config;
  7.  
  8. namespace be.gaudry.bibliobrol.model.dao.config
  9. {
  10. public class AccessConfig : AbstractDBConfig
  11. {
  12. #region declarations and constructor
  13. private ACCESS_VERSION accessVersion;
  14. private string dbPath;
  15. private string dbName;
  16.  
  17. private string pathSetting = "persistance/Access/path";
  18. private string nameSetting = "persistance/Access/filename";
  19. private string versionSetting = "persistance/Access/version";
  20.  
  21. //public AccessConfig() : base() { }
  22. #endregion
  23.  
  24. #region public methods
  25. public override void load()
  26. {
  27. dbPath = brolSettings.getSetting(pathSetting, "");
  28. dbName = brolSettings.getSetting(nameSetting, "data.bdb");
  29. try
  30. {
  31. accessVersion = (ACCESS_VERSION)brolSettings.getSetting(
  32. versionSetting,
  33. (int)ACCESS_VERSION.Access03
  34. );
  35. }
  36. catch (ArgumentException) { accessVersion = ACCESS_VERSION.Access03; }
  37. }
  38.  
  39. public override void save()
  40. {
  41. brolSettings.putSetting(pathSetting, dbPath, false);
  42. brolSettings.putSetting(nameSetting, dbName, false);
  43. brolSettings.putSetting(versionSetting, (int)accessVersion, false);
  44. brolSettings.save();
  45. }
  46.  
  47. /// <summary>
  48. /// MS Access version.
  49. /// </summary>
  50. public ACCESS_VERSION AccessVersion
  51. {
  52. get { return accessVersion; }
  53. set { accessVersion = value; }
  54. }
  55.  
  56. /// <summary>
  57. /// Path of the db file without file name.
  58. /// If BiblioBrol is executed from a removable storage,
  59. /// dbPath setting is an empty string.
  60. /// </summary>
  61. public string DBPath
  62. {
  63. get { return dbPath; }
  64. set { dbPath = value; }
  65. }
  66. /// <summary>
  67. /// Name and extension of the db file (without path).
  68. /// </summary>
  69. public string DBFileName
  70. {
  71. get { return dbName; }
  72. set { dbName = value; }
  73. }
  74.  
  75. /// <summary>
  76. /// Returns the adapted path of the database directory.
  77. ///
  78. /// A "bibliobrol" directory in the user documents is used by default.
  79. /// If this BrolDev application is executed from a removable storage,
  80. /// the path is generated from the application path.
  81. /// </summary>
  82. public string getAdaptedPath()
  83. {
  84. return System.IO.Path.Combine(
  85. getAdaptedDirectory(),
  86. dbName
  87. );
  88. }
  89.  
  90. /// <summary>
  91. /// Returns the adapted path of the database directory.
  92. ///
  93. /// A "bibliobrol" directory in the user documents is used by default.
  94. /// If this BrolDev application is executed from a removable storage,
  95. /// the path is generated from the application path.
  96. /// </summary>
  97. public string getAdaptedDirectory()
  98. {
  99. if (string.Empty.Equals(dbPath))
  100. {
  101. // The db file is in the data directory (user's documents dir or custom dir)
  102. return Config.DataDirectory;
  103. }
  104. else
  105. {
  106. // The db file is not in the general data directory
  107. return dbPath;
  108. }
  109. }
  110. #endregion
  111. }
  112. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/config/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1719967390 03/07/2024 02:43:10
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/config/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csMySQLConfig.cs2.27 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAbstractDBConfig.cs875 octets31/10/2018 18:33:16-refusé-
Afficher le fichier .cs|.csAccessConfig.cs3.67 Ko31/10/2018 18:33:16-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-model/dao/config/AccessConfig.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.