private void ErrorBox_OnGoToErrorPosition(object sender, EventArgs e)
        {
            BoxSql.Focus();

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

            BoxSql.ScrollToPosition((_errorPosition));
            BoxSql.CaretOffset = _errorPosition;
        }
コード例 #2
0
        private void ErrorBox_OnGoToErrorPosition(object sender, EventArgs e)
        {
            BoxSql.Focus();

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

            if (BoxSql.LineCount != 1)
            {
                BoxSql.ScrollToLine(BoxSql.GetLineIndexFromCharacterIndex(_errorPosition));
            }
            BoxSql.CaretIndex = _errorPosition;
        }
 private void ErrorBox_OnRevertValidText(object sender, EventArgs e)
 {
     BoxSql.Text = _lastValidSql;
     BoxSql.Focus();
 }