/[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	2012/05/10 11:15:23	106
+++ trunk/RomCheater.Logging/LogWriter.cs	2012/05/10 14:11:08	113
@@ -219,35 +219,39 @@
 
         private void autoscroll_timer_Tick(object sender, EventArgs e)
         {
-            if (this.DesignMode) { return; }
-            //txtLog.ScrollToEnd();
-            //txtLog.SelectionStart = txtLog.Text.Length-100;
-            //txtLog.ScrollToCaret();
-            //txtLog.Refresh();
+            try
+            {
+                if (this.DesignMode) { return; }
+                //txtLog.ScrollToEnd();
+                //txtLog.SelectionStart = txtLog.Text.Length-100;
+                //txtLog.ScrollToCaret();
+                //txtLog.Refresh();
 
-            txtLog.SelectionStart = 0;
-            txtLog.ScrollToCaret();
-            txtLog.Refresh();
+                txtLog.SelectionStart = 0;
+                txtLog.ScrollToCaret();
+                txtLog.Refresh();
 
-            int last_line_position = -1;
-            int position = -1;
-            int len = txtLog.Text.Length;
-            StringReader sr = new StringReader(this.StreamToString());
-            string line = "";
-            while ((line = sr.ReadLine()) != null)
-            {
-                position += (line.Length);
-                last_line_position = (line.Length*2);
-                //if (line.EndsWith("/n"))
-                //{
-                //    position++;
-                //}
-                //logger.VerboseDebug.WriteLine("current line: {0}", line);
+                int last_line_position = -1;
+                int position = -1;
+                int len = txtLog.Text.Length;
+                StringReader sr = new StringReader(this.StreamToString());
+                string line = "";
+                while ((line = sr.ReadLine()) != null)
+                {
+                    position += (line.Length);
+                    last_line_position = (line.Length * 2);
+                    //if (line.EndsWith("/n"))
+                    //{
+                    //    position++;
+                    //}
+                    //logger.VerboseDebug.WriteLine("current line: {0}", line);
+                }
+                txtLog.SelectionStart = position;
+                txtLog.ScrollToCaret();
+                txtLog.Refresh();
+                //autoscroll_timer.Enabled = false;
             }
-            txtLog.SelectionStart = position;
-            txtLog.ScrollToCaret();
-            txtLog.Refresh();
-            //autoscroll_timer.Enabled = false;
+            catch { }
         }
 
         private void logupdater_DoWork(object sender, DoWorkEventArgs e)

 

  ViewVC Help
Powered by ViewVC 1.1.22