/*********************************************************************/ /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void goToTopToolStripMenuItem_Click(object sender, EventArgs e) { SRecordView activeDoc = (SRecordView)dockPanel.ActiveDocument; if (activeDoc != null) { activeDoc.GoToLine(0); } }
/*********************************************************************/ /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void jumpToTopTsButton_Click(object sender, EventArgs e) { SRecordView activeDoc = (SRecordView)dockPanel.ActiveDocument; if (activeDoc != null) { activeDoc.GoToLine(0); } else { SystemSounds.Beep.Play(); } }
/*********************************************************************/ /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lineNumberBox_KeyPress(object sender, KeyPressEventArgs e) { SRecordView activeDoc = (SRecordView)dockPanel.ActiveDocument; if (activeDoc != null) { if (e.KeyChar == '\r') { try { int num = System.Convert.ToInt32(lineNumberBox.Text); activeDoc.GoToLine(num); lineNumberBox.Visible = false; } catch { ExceptionTrap.Trap("Error with line number entered!"); } } } }