private void ErrorBox1_OnGoToErrorPositionEvent(object sender, EventArgs e)
        {
            TextBox1.Focus();

            if (_errorPosition1 != -1)
            {
                if (TextBox2.LineCount != 1)
                {
                    TextBox1.ScrollToLine(TextBox1.GetLineIndexFromCharacterIndex(_errorPosition1));
                }
                TextBox1.CaretIndex = _errorPosition1;
            }
        }
Ejemplo n.º 2
0
        private void ErrorBox_OnGoToErrorPosition(object sender, EventArgs e)
        {
            TextBox1.Focus();

            if (_errorPosition == -1)
            {
                return;
            }

            if (TextBox1.LineCount != 1)
            {
                TextBox1.ScrollToLine(TextBox1.GetLineIndexFromCharacterIndex(_errorPosition));
            }
            TextBox1.CaretIndex = _errorPosition;
        }