Пример #1
0
 protected virtual void OnWriteLog(WriteLogEventArgs pEventArgs)
 {
     if (this.WriteLog != null)
     {
         //Invoke the event delegate
         WriteLog(this, pEventArgs);
     }
 }
Пример #2
0
 protected override void ChainedWriteLog(object pSender, WriteLogEventArgs pEventArgs)
 {
     //A shim function to chain log events from objects here to the main application's events.
     this.OnWriteLog(pEventArgs);
     //Write it to the textual log file if it is > 0
     if (pEventArgs.LogLevel > 0)
     {
         this._LogFile.WriteLogFile(pEventArgs.LogText);
     }
 }
Пример #3
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="pLogText">The text to be written.</param>
        /// <param name="pLogLevel">The numeric level of the log text.  In general, 0 is screen, 1 is both, 2 is file only.</param>
        protected override void WriteToLog(string pLogText, int pLogLevel)
        {
            WriteLogEventArgs tmpEventArgs = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(tmpEventArgs);
            //Write it to the textual log file if it is > 0
            if (tmpEventArgs.LogLevel > 0)
            {
                this._LogFile.WriteLogFile(tmpEventArgs.LogText);
            }
        }
Пример #4
0
 protected virtual void ChainedWriteLog(object pSender, WriteLogEventArgs pEventArgs)
 {
     //A shim function to chain log events from objects here to the main application's events.
     this.OnWriteLog(pEventArgs);
 }
Пример #5
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="pLogText">The text to be written.</param>
        /// <param name="pLogLevel">The numeric level of the log text.  In general, 0 is screen, 1 is both, 2 is file only.</param>
        protected virtual void WriteToLog(string pLogText, int pLogLevel)
        {
            WriteLogEventArgs e = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(e);
        }