private void Main_Logger_TextChanged(object sender, EventArgs e) { if (ScrollTextBox) { Main_Logger.SelectionStart = Main_Logger.TextLength; Main_Logger.ScrollToCaret(); } }
private void Main_Logger_Leave(object sender, EventArgs e) { ScrollTextBox = true; if (LoggerLog.Count > 0) { for (int i = 0; i < LoggerLog.Count; i++) { Main_Logger.AppendText(LoggerLog[i] + Environment.NewLine); } LoggerLog.RemoveRange(0, LoggerLog.Count); } Main_Logger.SelectionStart = Main_Logger.TextLength; Main_Logger.ScrollToCaret(); }