diff --git a/Source/Examples/ExampleBrowser.cs b/Source/Examples/ExampleBrowser.cs index a5cec8da..5e618a76 100644 --- a/Source/Examples/ExampleBrowser.cs +++ b/Source/Examples/ExampleBrowser.cs @@ -94,7 +94,6 @@ namespace Examples imageListSampleCategories.Images.Add("3.x", Resources.v3x); imageListSampleCategories.Images.Add("4.x", Resources.v4x); - Debug.Listeners.Add(new TextBoxTraceListener(textBoxOutput)); treeViewSamples.TreeViewNodeSorter = new SamplesTreeViewSorter(); LoadSamplesFromAssembly(Assembly.GetExecutingAssembly()); @@ -354,7 +353,7 @@ namespace Examples return -1; } - static void RunSample(Control parent, ExampleInfo e) + void RunSample(Control parent, ExampleInfo e) { if (e == null) return; @@ -389,6 +388,7 @@ namespace Examples { if (parent != null) { + textBoxOutput.Text = File.ReadAllText("debug.log"); parent.Visible = true; Application.DoEvents(); } diff --git a/Source/Examples/Main.cs b/Source/Examples/Main.cs index 5aa86cfb..c44eeae7 100644 --- a/Source/Examples/Main.cs +++ b/Source/Examples/Main.cs @@ -59,14 +59,6 @@ namespace Examples MessageBox.Show("Could not access debug.log", expt.ToString()); } - Debug.Listeners.Clear(); - Debug.Listeners.Add(new TextWriterTraceListener("debug.log")); - Debug.Listeners.Add(new ConsoleTraceListener()); - - Trace.Listeners.Clear(); - Trace.Listeners.Add(new TextWriterTraceListener("debug.log")); - Trace.Listeners.Add(new ConsoleTraceListener()); - Application.Run(browser); } }