public void ShowGoToDialog() { GoToDialog gd = new GoToDialog(); gd.CurrentLineNumber = Scintilla.Lines.Current.Number; gd.MaximumLineNumber = Scintilla.Lines.Count; gd.Scintilla = Scintilla; if (gd.ShowDialog() == DialogResult.OK) Line(gd.GotoLineNumber); Scintilla.Focus(); }
public void ShowGoToDialog() { var gd = new GoToDialog { CurrentLineNumber = Scintilla.Lines.Current.Number, MaximumLineNumber = Scintilla.Lines.Count, Scintilla = Scintilla }; if (gd.ShowDialog() == DialogResult.OK) this.Line(gd.GotoLineNumber); Scintilla.Focus(); }
public void GoTo() { GoToDialog gtd = new GoToDialog(); if (gtd.ShowDialog() == DialogResult.OK) { int input = Convert.ToInt32(gtd.Input); if (input > rtb.Lines.Length) { rtb.SelectionLength = 0; } else { rtb.GoTo(input); rtb.HighLightLine(); } } this.Text = GetWindowTitle(); }
/// <summary> /// Initializes the smart dialogs /// </summary> public void InitializeSmartDialogs() { this.formState = new FormState(); this.gotoDialog = new GoToDialog(); this.frInFilesDialog = new FRInFilesDialog(); this.frInDocDialog = new FRInDocDialog(); }
private void GoToLevel() { GoToDialog gtd = new GoToDialog(currentLevelNumber + 1); gtd.LevelInfo = String.Format("Levels in levelSet {0}", levelSet.Count); if (gtd.ShowDialog() == DialogResult.OK) { SelectLevel(gtd.Level - 1); } }
private void goToLineToolStripMenuItem_Click(object sender, EventArgs e) { if (Enable) { int line = textEditControl.SelectionStartIsActive ? textEditControl.SelectionStartLine : textEditControl.SelectionEndLine; using (GoToDialog dialog = new GoToDialog(line + 1)) { if (dialog.ShowDialog() == DialogResult.OK) { line = Math.Max(Math.Min(dialog.Value - 1, textEditControl.Count - 1), 0); textEditControl.SetInsertionPoint(line, 0); textEditControl.ScrollToSelection(); } } } }
private void goToToolStripMenuItem_Click(object sender, EventArgs e) { GoToDialog x = new GoToDialog(); if (x.ShowDialog() != DialogResult.OK) return; listView1.Enabled = false; status = "Reading Directory"; FATXFolderEntry xfold; FATXReadContents z = xDrive.ReadToFolder(x.ChosenPath, out xfold); if (z == null) { MessageBox.Show("Error: Bad path?"); status = "Idle"; listView1.Enabled = true; return; } LastFolder = xfold; List<ListViewItem> xlist = new List<ListViewItem>(); foreach (FATXFolderEntry u in z.Folders) xlist.Add(GetItem(u.Name, 1, u)); foreach (FATXFileEntry u in z.Files) xlist.Add(GetItem(u.Name, 2, u)); foreach (FATXPartition u in z.SubPartitions) xlist.Add(GetItem(u.PartitionName, 0, u)); listView1.Items.Clear(); listView1.Items.AddRange(xlist.ToArray()); textBoxX1.Text = x.ChosenPath + "/"; status = "Idle"; listView1.Enabled = true; }