コード例 #1
0
        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");
            };
        }
コード例 #2
0
		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;
		}
コード例 #3
0
ファイル: ToolTipProvider.cs プロジェクト: pusp/o2platform
		public static void Attach(MainForm mainForm, TextEditor.TextEditorControl editor)
		{
			ToolTipProvider tp = new ToolTipProvider(mainForm, editor);
			editor.ActiveTextAreaControl.TextArea.ToolTipRequest += tp.OnToolTipRequest;
		}
コード例 #4
0
ファイル: ToolTipProvider.cs プロジェクト: pusp/o2platform
		private ToolTipProvider(MainForm mainForm, TextEditor.TextEditorControl editor)
		{
			this.mainForm = mainForm;
			this.editor = editor;
		}
コード例 #5
0
		public CodeCompletionProvider(MainForm mainForm)
		{
			this.mainForm = mainForm;
		}
コード例 #6
0
		private CodeCompletionKeyHandler(MainForm mainForm, TextEditorControl editor)
		{
			this.mainForm = mainForm;
			this.editor = editor;
		}