示例#1
0
        //------------------------------------------------------------------------------

        // common to the 2 others constructors
        internal void CreateNodes()
        {
            IconIndex  = TraceConst.CST_ICO_DEFAULT; // TWinTrace don't have icon (for now)
            Enabled    = true;
            WinTraceId = Id;                         // winTraceId need to be the same as 'id' if we want to call sendXxx() directly on WinTrace object

            ContextList = new NodeContextList();

            //fWinTraceContext = null ;

            _warning                 = new TraceNode(null, false);
            _warning.IconIndex       = TraceConst.CST_ICO_WARNING;
            _warning.WinTraceId      = Id;
            _warning.WinTraceContext = ContextList;
            _warning.Enabled         = true;

            _error                 = new TraceNode(null, false);
            _error.IconIndex       = TraceConst.CST_ICO_ERROR;
            _error.WinTraceId      = Id;
            _error.WinTraceContext = ContextList;
            _error.Enabled         = true;

            _debug                 = new TraceNode(null, false);
            _debug.IconIndex       = TraceConst.CST_ICO_INFO;
            _debug.WinTraceId      = Id;
            _debug.WinTraceContext = ContextList;
            _debug.Enabled         = true;
        }
示例#2
0
        //----------------------------------------------------------------------

        /// <summary>
        /// Copy constructor : create a TraceNode copy of a TraceToSend
        /// </summary>
        /// <param name="source">TraceNode to copy</param>
        internal TraceNode(TraceToSend source)   // TraceToSend base class don't have constructor
        {
            IconIndex  = source.IconIndex;
            Enabled    = source.Enabled;
            WinTraceId = source.WinTraceId;
            Id         = source.Id;
            Tag        = source.Tag;
        }
示例#3
0
 //----------------------------------------------------------------------
 /// <summary>
 /// Create a listener giving a TraceNode as the parent node.
 /// </summary>
 /// <param name="traceDoor">Specify Debug,Warning,Error or user TraceNode object</param>
 public TTraceListener(TraceNode traceDoor)
 {
     Listener   = traceDoor;
     NeedIndent = true;
 }
示例#4
0
 //----------------------------------------------------------------------
 /// <summary>
 /// Create a listener. TTrace.Debug is used to send traces
 /// </summary>
 public TTraceListener()
 {
     Listener   = TTrace.Debug;
     NeedIndent = true;
 }