Beispiel #1
0
        private void DebugOutput_Load(object sender, EventArgs e)
        {
            _memoryStream = new AsynMemoryStream();
            _memoryStream.ContentsUpdated += TraceUpdated;
            _traceListener = new TextWriterTraceListener(_memoryStream);
            Trace.Listeners.Add(_traceListener);
            Trace.WriteLine("Debug Output Console Opened");

            _flusherThread = new Thread(delegate() {
                                            while (Thread.CurrentThread.IsAlive) {
                                                Trace.Flush();
                                                Thread.Sleep(300);
                                            }
                                        });
            _flusherThread.Start();
        }
Beispiel #2
0
        private void DebugOutput_Load(object sender, EventArgs e)
        {
            _memoryStream = new AsynMemoryStream();
            _memoryStream.ContentsUpdated += TraceUpdated;
            _traceListener = new TextWriterTraceListener(_memoryStream);
            Trace.Listeners.Add(_traceListener);
            Trace.WriteLine("Debug Output Console Opened");

            _flusherThread = new Thread(delegate() {
                while (Thread.CurrentThread.IsAlive)
                {
                    Trace.Flush();
                    Thread.Sleep(300);
                }
            });
            _flusherThread.Start();
        }