211 |
//txtLog.ScrollToCaret(); |
//txtLog.ScrollToCaret(); |
212 |
//txtLog.Refresh(); |
//txtLog.Refresh(); |
213 |
|
|
214 |
txtLog.SelectionStart = 0; |
//txtLog.SelectionStart = 0; |
215 |
txtLog.ScrollToCaret(); |
//txtLog.ScrollToCaret(); |
216 |
txtLog.Refresh(); |
//txtLog.Refresh(); |
217 |
|
|
218 |
int last_line_position = -1; |
//int last_line_position = -1; |
219 |
int position = -1; |
//int position = -1; |
220 |
int len = txtLog.Text.Length; |
int len = txtLog.Text.Length; |
221 |
StringReader sr = new StringReader(this.StreamToString()); |
//StringReader sr = new StringReader(this.StreamToString()); |
222 |
string line = ""; |
//string line = ""; |
223 |
while ((line = sr.ReadLine()) != null) |
//while ((line = sr.ReadLine()) != null) |
224 |
{ |
//{ |
225 |
position += (line.Length * 2); |
// position += (line.Length * 2); |
226 |
last_line_position = (line.Length * 2); |
// last_line_position = (line.Length * 2); |
227 |
//if (line.EndsWith("/n")) |
// //if (line.EndsWith("/n")) |
228 |
//{ |
// //{ |
229 |
// position++; |
// // position++; |
230 |
//} |
// //} |
231 |
//logger.VerboseDebug.WriteLine("current line: {0}", line); |
// //logger.VerboseDebug.WriteLine("current line: {0}", line); |
232 |
} |
//} |
233 |
txtLog.SelectionStart = position; |
txtLog.SelectionStart = len; |
234 |
txtLog.ScrollToCaret(); |
txtLog.ScrollToCaret(); |
235 |
txtLog.Refresh(); |
txtLog.Refresh(); |
236 |
//autoscroll_timer.Enabled = false; |
//autoscroll_timer.Enabled = false; |