/[RomCheater]/trunk/RomCheater.Logging/LogWriter.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/LogWriter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.Logging/LogWriter.cs	2014/04/07 12:14:25	799
+++ trunk/RomCheater.Logging/LogWriter.cs	2014/04/07 12:16:42	800
@@ -62,16 +62,16 @@
                 }
                 else
                 {
-                    //Stream stream = Console.OpenStandardOutput(0x100);
-                    //TextWriter writer = null;
-                    //if (stream == Stream.Null) { writer = TextWriter.Synchronized(StreamWriter.Null); }
-                    //Encoding encoding = this.Log.Encoding;
-                    //StreamWriter writer2 = new StreamWriter(stream, encoding, 0x100);
-                    ////writer2.HaveWrittenPreamble = true;
-                    //writer2.AutoFlush = true;
-                    //writer = TextWriter.Synchronized(writer2);
-                    //Console.SetOut(writer);
-                    //Console.SetOut(this.Log);
+                    Stream stream = Console.OpenStandardOutput(0x100);
+                    TextWriter writer = null;
+                    if (stream == Stream.Null) { writer = TextWriter.Synchronized(StreamWriter.Null); }
+                    Encoding encoding = this.Log.Encoding;
+                    StreamWriter writer2 = new StreamWriter(stream, encoding, 0x100);
+                    //writer2.HaveWrittenPreamble = true;
+                    writer2.AutoFlush = true;
+                    writer = TextWriter.Synchronized(writer2);
+                    Console.SetOut(writer);
+                    Console.SetOut(this.Log);
                 }
             }
         }
@@ -111,16 +111,7 @@
                 catch (Exception)
                 {
                 }                   
-                //if (AutoScroll)
-                //{
-                //    txtLog.SelectionStart = 0;
-                //    txtLog.ScrollToCaret();
-                //    txtLog.SelectionStart = txtLog.TextLength;
-                //    txtLog.ScrollToCaret();
-                //    txtLog.Refresh();
-                //}
             }           
-            //Thread.Sleep(100);
         }
 
         new public string Text

 

  ViewVC Help
Powered by ViewVC 1.1.22