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.

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 octets1719971936 03/07/2024 03:58:56
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.

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-model/dao/config/AccessConfig.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.