private void gotobookmark_Click(object sender, EventArgs e) { var items = new List<AutocompleteItem>(); foreach (var bookmark in ActiveEditor.Tb.Bookmarks) items.Add( new FuzzyAutoCompleteItem(bookmark.LineIndex + 1 + ":" + ActiveEditor.Tb[bookmark.LineIndex].Text)); var bookmarkwindow = new CommandWindow(items); bookmarkwindow.ProcessCommand += bookmarkwindow_ProcessCommand; bookmarkwindow.ShowDialog(this); }
private void miswitchproj_Click(object sender, EventArgs e) { if (miopenrecent.MenuItems.Count == 0) miproject_Select(null, null); var completemenu = new List<AutocompleteItem>(); foreach (MenuItem item in miopenrecent.MenuItems) completemenu.Add(new FuzzyAutoCompleteItem(item.Text)); var cwindow = new CommandWindow(completemenu); cwindow.ProcessCommand += cwindow_ProcessCommand; cwindow.ShowDialog(this); }
private void miinscliphis_Click(object sender, EventArgs e) { var lst = new List<AutocompleteItem>(); foreach (Editor doc in dock.Documents.OfType<Editor>()) foreach (var historyitem in doc.Tb.ClipboardHistory) lst.Add(new AutocompleteItem(historyitem)); using (var cmw = new CommandWindow(lst)) { cmw.ProcessCommand += (o, args) => ActiveEditor.Tb.InsertText(args.Text); cmw.ShowDialog(this); } }
private void migotosymbol_Click(object sender, EventArgs e) { if (ActiveEditor == null) return; /* var lst = new List<AutocompleteItem>(); Regex regex = ActiveEditor.Tb.ClassNameRegex; if (regex == null) return; var matches = regex.Matches(ActiveEditor.Tb.Text); foreach (Match match in matches) { var capture = match.Captures[0]; lst.Add(new FuzzyAutoCompleteItem(capture.Value) {Tag = capture.Index}); }*/ var symbols = SymbolList.GetPlaces(ActiveEditor); var cwin = new CommandWindow(symbols); cwin.ProcessCommand += cwin_ProcessCommand; cwin.Tag = symbols; cwin.ShowDialog(this); }
private void migotofileinproject_Click(object sender, EventArgs e) { if (Globals.ActiveProject != null) { path = Globals.ActiveProject.Path; } else { if (ActiveEditor.IsSaved) path = Path.GetDirectoryName(ActiveEditor.Name); else { MessageBox.Show("Please Open a Project First!"); return; } } var autocompletelist = new List<AutocompleteItem>(); string[] files = Directory.GetFiles(path, "*.*", SearchOption.TopDirectoryOnly); foreach (var file in files) autocompletelist.Add(new FuzzyAutoCompleteItem(Path.GetFileName(file))); var commandwindow = new CommandWindow(autocompletelist); commandwindow.ProcessCommand += commandwindow_ProcessCommand; commandwindow.ShowDialog(this); }
private void menuItem84_Click(object sender, EventArgs e) { var items = new List<AutocompleteItem>(); foreach (var doc in dock.Documents) items.Add(new FuzzyAutoCompleteItem((doc as DockContent).Text)); var fileswitcher = new CommandWindow(items); fileswitcher.ProcessCommand += fileswitcher_ProcessCommand; fileswitcher.ShowDialog(this); }