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");
}
}