public static void Register(MainForm mainForm) { // Must be implemented. Gets the project content of the active project. HostCallback.GetCurrentProjectContent = delegate { return mainForm.myProjectContent; }; // The default implementation just logs to Log4Net. We want to display a MessageBox. // Note that we use += here - in this case, we want to keep the default Log4Net implementation. HostCallback.ShowError += delegate(string message, Exception ex) { MessageBox.Show(message + Environment.NewLine + ex); }; HostCallback.ShowMessage += delegate(string message) { MessageBox.Show(message); }; HostCallback.ShowAssemblyLoadError += delegate(string fileName, string include, string message) { MessageBox.Show("Error loading code-completion information for " + include + " from " + fileName + ":\r\n" + message + "\r\n"); }; }
public static CodeCompletionKeyHandler Attach(MainForm mainForm, TextEditorControl editor) { CodeCompletionKeyHandler h = new CodeCompletionKeyHandler(mainForm, editor); editor.ActiveTextAreaControl.TextArea.KeyEventHandler += h.TextAreaKeyEventHandler; // When the editor is disposed, close the code completion window editor.Disposed += h.CloseCodeCompletionWindow; return h; }
public static void Attach(MainForm mainForm, TextEditor.TextEditorControl editor) { ToolTipProvider tp = new ToolTipProvider(mainForm, editor); editor.ActiveTextAreaControl.TextArea.ToolTipRequest += tp.OnToolTipRequest; }
private ToolTipProvider(MainForm mainForm, TextEditor.TextEditorControl editor) { this.mainForm = mainForm; this.editor = editor; }
public CodeCompletionProvider(MainForm mainForm) { this.mainForm = mainForm; }
private CodeCompletionKeyHandler(MainForm mainForm, TextEditorControl editor) { this.mainForm = mainForm; this.editor = editor; }