Exemple #1
0
        private void Instance_Timer_Elapsed_Begin(TimerEventArgs e)
        {
            textBox1.Text += e.Message + "\r\n\r\n";

            string[] temp  = textBox1.Text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
            int      count = temp.Count();

            if (_lines < count)
            {
                var tempBuilder = new StringBuilder();
                for (int i = count - _lines; i < count; i++)
                {
                    tempBuilder.Append(temp[i] + "\r\n\r\n");
                }
                textBox1.Text = tempBuilder.ToString();
            }
        }
Exemple #2
0
 private void Instance_Timer_Elapsed_End(TimerEventArgs e)
 {
     textBox1.Text += e.Message + "\r\n";
 }