ARCed.Scintilla.GoToDialog.btnOK_Click C# (CSharp) Method

btnOK_Click() private method

private btnOK_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (int.TryParse(this.txtGotoLine.Text, out this._gotoLineNumber))
            {
                //	Line #s are 0 based but the users don't think that way
                this._gotoLineNumber--;
                if (this._gotoLineNumber < 0 || this._gotoLineNumber >= this._maximumLineNumber)
                    this.err.SetError(this.txtGotoLine, "Go to line # must be greater than 0 and less than " + (this._maximumLineNumber + 1).ToString());
                else
                    DialogResult = DialogResult.OK;
            }
            else
            {
                this.err.SetError(this.txtGotoLine, "Go to line # must be a numeric value");
            }
        }