/[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	2013/06/18 20:22:08	724
+++ trunk/RomCheater.Logging/LogWriter.cs	2013/06/18 20:32:10	725
@@ -97,16 +97,16 @@
             else
             {
                 txtLog.AppendText(value);
-                if (AutoScroll)
-                {
-                    txtLog.SelectionStart = 0;
-                    txtLog.ScrollToCaret();
-                    txtLog.SelectionStart = txtLog.TextLength;
-                    txtLog.ScrollToCaret();
-                    txtLog.Refresh();
-                }
+                //if (AutoScroll)
+                //{
+                //    txtLog.SelectionStart = 0;
+                //    txtLog.ScrollToCaret();
+                //    txtLog.SelectionStart = txtLog.TextLength;
+                //    txtLog.ScrollToCaret();
+                //    txtLog.Refresh();
+                //}
             }           
-            Thread.Sleep(100);
+            //Thread.Sleep(100);
         }
 
         new public string Text
@@ -262,14 +262,26 @@
 
         private void LogWriter_Load(object sender, EventArgs e)
         {
-            txtLog.SelectionStart = 0;
-            txtLog.ScrollToCaret();
+            //txtLog.SelectionStart = 0;
+            //txtLog.ScrollToCaret();
         }
 
         private void chkAutoScroll_CheckedChanged(object sender, EventArgs e)
         {
             this.AutoScroll = chkAutoScroll.Checked;
         }
+
+        private void txtLog_TextChanged(object sender, EventArgs e)
+        {
+            if (AutoScroll)
+            {
+                txtLog.SelectionStart = 0;
+                txtLog.ScrollToCaret();
+                txtLog.SelectionStart = txtLog.TextLength;
+                txtLog.ScrollToCaret();
+                txtLog.Refresh();
+            }
+        }
     }
 }
  
\ No newline at end of file

 

  ViewVC Help
Powered by ViewVC 1.1.22