Bend.MainWindow.CommandGoto C# (CSharp) Method

CommandGoto() public method

public CommandGoto ( int lineNumber ) : void
lineNumber int
return void
        public void CommandGoto(int lineNumber)
        {
            if (this.currentTabIndex >= 0 && tab[this.currentTabIndex].FullFileName != null && System.IO.File.Exists(tab[this.currentTabIndex].FullFileName))
            {
                try
                {
                    tab[this.currentTabIndex].TextEditor.ScrollToLine(lineNumber);
                }
                catch
                {
                }
            }
        }

Same methods

MainWindow::CommandGoto ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Usage Example

Example #1
0
 private void lineNumber_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         try
         {
             int number = int.Parse(lineNumber.Text);
             mainWindow.CommandGoto(number);
             singletonGotoLineWindow.Hide();
         }
         catch
         {
         }
     }
 }