示例#1
0
 protected virtual void OnWriteLog(WriteLogEventArgs pArguments)
 {
     if (this.WriteLog != null)
     {
         //Invoke the event delegate
         WriteLog(this, pArguments);
     }
 }
示例#2
0
        protected override void ChainedWriteLog(object pSender, WriteLogEventArgs pArguments)
        {
            //A shim function to chain log events from objects here to the main application's events.
            this.OnWriteLog(pArguments);

            //Write it to the textual log file if it is > 0
            if (pArguments.LogLevel > 0)
            {
                this._LogFile.WriteLogFile(pArguments.LogText);
            }
        }
示例#3
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="Log_Text">The text to be written.</param>
        /// <param name="Log_Level">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 tmpArguments = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(tmpArguments);

            //Write it to the textual log file if it is > 0
            if (tmpArguments.LogLevel > 0)
            {
                this._LogFile.WriteLogFile(tmpArguments.LogText);
            }
        }
示例#4
0
 protected virtual void ChainedWriteLog(object sender, WriteLogEventArgs pArguments)
 {
     //A shim function to chain log events from objects here to the main application's events.
     this.OnWriteLog(pArguments);
 }
示例#5
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="Log_Text">The text to be written.</param>
        /// <param name="Log_Level">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 pArguments = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(pArguments);
        }