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.

SystemInfoControl.cs

Description du code

SystemInfoControl.cs est un fichier du projet BrolDev.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/broldev/src/.

Projet BrolDev : Librairie de composants réutilisables pour les applications BrolDev en CSharp.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Reflection;
  5. using System.Windows.Forms;
  6. using be.gaudry.model;
  7. using be.gaudry.model.config;
  8.  
  9. namespace be.gaudry.view.controls
  10. {
  11. public partial class SystemInfoControl : UserControl
  12. {
  13. #region declarations and constructors
  14. private DataGridViewCellStyle dgvTitleStyle;
  15. private Assembly assembly;
  16. public SystemInfoControl()
  17. {
  18. InitializeComponent();
  19. initDgvTitleStyle();
  20. }
  21. #endregion
  22.  
  23. #region private methods
  24. private void initDgvTitleStyle()
  25. {
  26. dgvTitleStyle = new DataGridViewCellStyle();
  27. dgvTitleStyle.BackColor = System.Drawing.SystemColors.ControlLight;
  28. dgvTitleStyle.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
  29. dgvTitleStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
  30. dgvTitleStyle.SelectionBackColor = dgvTitleStyle.BackColor;
  31. dgvTitleStyle.SelectionForeColor = dgvTitleStyle.ForeColor;
  32. }
  33.  
  34. private void displayDGV()
  35. {
  36. addTitle(getClientName());
  37. envDGV.Rows.Add("Version de l'application locale", getClientVersion(), "");
  38. if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
  39. {
  40. envDGV.Rows.Add("Version de déploiement", System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString());
  41. }
  42. else
  43. {
  44. envDGV.Rows.Add("Version de déploiement", " (Version non déployée)");
  45. }
  46. envDGV.Rows.Add("Répertoire d'exécution", getExecDir(), "");
  47. envDGV.Rows.Add("Mémoire allouée à BiblioBrol", Units.getLengthString(Environment.WorkingSet), "");
  48.  
  49. addApplCmdLines();
  50. envDGV.Rows.Add("Version du framework .NET", Environment.Version.ToString(), "");
  51. addTitle("Plugins");
  52. if (PluginsManager.Count > 0)
  53. {
  54. foreach (Plugin plugin in PluginsManager.Plugins)
  55. {
  56. envDGV.Rows.Add(plugin.Name, String.Format("Version {0}", plugin.Version), "");
  57. }
  58. }
  59. else
  60. envDGV.Rows.Add("Aucun", "", "");
  61. addTitle("Environnement");
  62. addEnvVars();
  63. }
  64.  
  65. private object getExecDir()
  66. {
  67. String exepath = Environment.GetCommandLineArgs()[0];
  68. return exepath.Substring(0, exepath.LastIndexOf('\\'));
  69. }
  70.  
  71. private void addApplCmdLines()
  72. {
  73. String[] args = Environment.GetCommandLineArgs();
  74. String f = "Argument brol {0}";
  75. for (int i = 0; i < args.Length; i++)
  76. envDGV.Rows.Add(String.Format(f, i), args[i]);
  77. }
  78.  
  79. private void addEnvVars()
  80. {
  81. IDictionary envVars = Environment.GetEnvironmentVariables();
  82. List<String> envKeys = new List<String>();
  83. foreach (String keyStr in envVars.Keys)
  84. envKeys.Add(keyStr);
  85. envKeys.Sort();
  86. foreach (String keyStr in envKeys)
  87. envDGV.Rows.Add(keyStr, envVars[keyStr]);
  88. /*
  89.   IDictionary envVars = Environment.GetEnvironmentVariables();
  90.   foreach (DictionaryEntry de in envVars)
  91.   envDGV.Rows.Add(de.Key, de.Value);
  92.   */
  93. }
  94.  
  95. private string getClientVersion()
  96. {
  97. /*FileVersionInfo ver = FileVersionInfo.GetVersionInfo(Environment.GetCommandLineArgs()[0]);
  98.   return ver.FileVersion;*/
  99.  
  100. /*Assembly assembly = Assembly.LoadFile(Application.StartupPath + "BiblioBrol.exe");
  101.   assembly.GetName();
  102.   assembly.*/
  103. if (assembly == null)
  104. {
  105. assembly = Assembly.GetExecutingAssembly();
  106. }
  107. AssemblyName name = assembly.GetName();
  108. return name.Version.ToString();
  109. }
  110.  
  111. private string getClientName()
  112. {
  113. if (assembly == null)
  114. {
  115. assembly = Assembly.GetExecutingAssembly();
  116. }
  117. return assembly.GetName().Name;
  118. }
  119.  
  120. #endregion
  121.  
  122. private void SystemInfoControl_Load(object sender, EventArgs e)
  123. {
  124. displayDGV();
  125. }
  126. /// <summary>
  127. /// Used to retreive application name, version, etc.
  128. /// </summary>
  129. /// <param name="assembly"></param>
  130. public void setAssembly(Assembly assembly)
  131. {
  132. this.assembly = assembly;
  133. }
  134. public void addTitle(string title)
  135. {
  136. DataGridViewRow row = new DataGridViewRow();
  137. row.DefaultCellStyle = dgvTitleStyle;
  138. row.CreateCells(envDGV);
  139. row.Cells[0].Value = title;
  140. envDGV.Rows.Add(row);
  141.  
  142. /*row = new DataGridViewRow();
  143.   row.DefaultCellStyle = dgvTitleStyle;
  144.   row.CreateCells(envDGV);
  145.   row.Cells[0].Value = "Nom de variable";
  146.   row.Cells[1].Value = "Valeur";
  147.   envDGV.Rows.Add(row);*/
  148. }
  149. public void addItem(string itemName, string itemValue)
  150. {
  151. envDGV.Rows.Add(itemName,itemValue);
  152. }
  153. }
  154. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1715703616 14/05/2024 18:20:16
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csToolBarHomeControl.Designer.cs7.41 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.Designer.cs6.79 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanel.Designer.cs1.19 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.cs7.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csXPGroupBox.cs15.83 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.Designer.cs7.85 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csToolBarHomeControl.cs2.32 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csVersionControl.Designer.cs4.09 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.cs2.01 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .resx|.resxWizardXpUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.Designer.cs5.92 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxChartControl.resx6.58 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csHeaderPanel.cs35.93 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csIWizardUC.cs2.35 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxAboutUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.cs8.59 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.cs5.46 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxXPGroupBox.resx17.7 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanelNativeMethods.cs21.09 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.cs6.99 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.Designer.cs1.11 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxSystemInfoControl.resx6.22 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.Designer.cs4.79 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxHeaderPanel.resx5.85 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.cs5.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.cs4.7 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxDGVLayoutOptionsControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxWizardUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csUpdateControl.cs7.55 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.cs2.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csVersionControl.cs463 octets31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxBrolBoxUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csAboutUserControl.cs6.75 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxToolBarManagerControl.resx5.88 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.Designer.cs10.66 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIToolBarControl.cs1.07 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.cs8.11 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csImageCombo.cs15.49 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csAboutUserControl.Designer.cs12.31 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxScrollablePictureBoxUserControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.Designer.cs5.64 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxVersionControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csChartControl.Designer.cs18.45 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csUpdateControl.Designer.cs3.92 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxUpdateControl.resx5.68 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csChartControl.cs15.11 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.Designer.cs17.39 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolStrip.cs1.06 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.Designer.cs1.1 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxToolBarHomeControl.resx48.51 Ko31/10/2018 18:33:12-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-broldev-source-rf-view/controls/SystemInfoControl.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.