示例#1
0
        /*********************************************************************/
        /// <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);
            }
        }
示例#2
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();
            }
        }
示例#3
0
        /*********************************************************************/
        /// <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!");
                    }
                }
            }
        }