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 { } } }
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 { } } }