Notification.cs
Description du code
Notification.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
Code c# (Notification.cs) (161 lignes)
using System; namespace be.gaudry.observer { public class Notification { #region declarations /// <summary> /// Level of notification. May be used to deal only with some notifications. /// </summary> public enum VERBOSE { /// <summary> /// sql query or another persistence operation /// </summary> persistentOperation, /// <summary> /// any operation /// </summary> basicOperation, /// <summary> /// feedback of an operation /// </summary> opsResult, /// <summary> /// requests syntax to debug /// </summary> advancedOperation, /// <summary> /// info to debug /// </summary> debug, /// <summary> /// any general error /// </summary> error, /// <summary> /// may not interrupt application /// </summary> lowError, /// <summary> /// application must be interrupt /// </summary> criticalError, /// <summary> /// used to notify without display info /// </summary> internalNotification, /// <summary> /// used to notify a modification without display info /// </summary> modified, /// <summary> /// used to store errors and not display it /// </summary> hideErrors, /// <summary> /// used to clean stored errors and adopt normal behaviour /// </summary> showNewErrors, /// <summary> /// used to display stored errors /// </summary> showErrors } private String title, msg; private Exception e; private VERBOSE verbose; private Object sender; #endregion #region constructors public Notification(String msg) : this(VERBOSE.basicOperation, "Information", msg) { } public Notification(String msg, Object sender) : this(VERBOSE.basicOperation, "Information", msg, sender) { } public Notification(String title, String msg) : this(VERBOSE.basicOperation, title, msg) { } public Notification(String title, String msg, Object sender) : this(VERBOSE.basicOperation, title, msg, sender) { } public Notification(VERBOSE level, String title, String msg, Object sender) : this(level, title, msg) { this.sender = sender; } public Notification(VERBOSE level, String msg, Object sender) : this(level, "", msg, sender) { } public Notification(VERBOSE level, String title, String msg) { this.verbose = level; this.title = title; this.msg = msg; } public Notification(VERBOSE level, String title, String msg, Exception e) : this(level, title, msg) { this.e = e; } public Notification(VERBOSE level, String title, String msg, Exception e, Object sender) : this(level, title, msg, e) { this.sender = sender; } public Notification(VERBOSE level, Exception e) : this(level, "Erreur", "", e) { } public Notification(VERBOSE level, Exception e, Object sender) : this(level, "Erreur", "", e, sender) { } public Notification(VERBOSE level, String title, Exception e) : this(level, title, "", e) { } public Notification(VERBOSE level, String title, Exception e, Object sender) : this(level, title, "", e, sender) { } public Notification(Exception e) : this(VERBOSE.error, "Erreur", "", e) { } public Notification(Exception e, Object sender) : this(VERBOSE.error, "Erreur", "", e, sender) { } #endregion #region getters and setters public String Title { set { this.title = value; } get { return this.title; } } public String Msg { set { this.msg = value; } get { return this.msg; } } public Exception NotificationException { set { this.e = value; } get { return this.e; } } public VERBOSE Level { set { this.verbose = value; } get { return this.verbose; } } public Object Sender { set { this.sender = value; } get { return this.sender; } } #endregion } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Pas de sous-répertoires. | |||
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1734504157 18/12/2024 07:42:37 |
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-observer/Notification.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.