Пример #1
0
 /*
  #region ResourceDescriptor
  * /// <summary>
  * /// This is the resource descriptor describing the address of the device to which
  * /// the data was sent.
  * /// </summary>
  * public string ResourceDescriptor;
  #endregion
  */
 #region Constructor
 /// <summary>
 /// The constructor for the class.
 /// </summary>
 /// <param name="Text">The data to be logged.</param>
 /// <param name="TimeStamp">The time at which the data was sent to the device.</param>
 /// <param name="Severity">The severity of the message.</param>
 /// <param name="SessionName">The name of the session that sent the data.</param>
 public LogSendEventArgs(string Text, DateTime TimeStamp, DebugSeverityTypes Severity, string SessionName)//, string resourceDescriptor)
 {
     this.Text        = Text;
     this.TimeStamp   = TimeStamp;
     this.Severity    = Severity;
     this.SessionName = SessionName;
     //this.ResourceDescriptor = resourceDescriptor;
 }
Пример #2
0
 /// <summary>
 /// This method will collect data and call the trigger of event
 /// </summary>
 /// <param name="Severity">Severity of message</param>
 /// <param name="TextFormat">text format</param>
 /// <param name="param">variable value in text format</param>
 protected void Logging(DebugSeverityTypes Severity, string TextFormat, params object[] param)
 {
     if (dlgtLogSend != null)
     {
         string           strText = string.Format(TextFormat, param);
         LogSendEventArgs e       = new LogSendEventArgs(strText,
                                                         DateTime.Now,
                                                         Severity,
                                                         tmName);
         dlgtLogSend(this, e);
     }
 }