private void btnOK_Click(object sender, EventArgs e) { try { int row = int.Parse(txtRow.Text) - 1; mOwner.GotoLine(row); } catch {} Close(); }
private void EditorGotoLineForm_FormClosing(object sender, FormClosingEventArgs e) { if (DialogResult != DialogResult.OK) { return; } int row = Convert.ToInt32(spinLineNumber.Value); _Owner.GotoLine(Math.Max(row - 1, 1)); }