Inheritance: ICSharpCode.TextEditor.Gui.CompletionWindow.AbstractCompletionWindow
 void CloseInsightWindow(object sender, EventArgs e)
 {
     if (insightWindow != null)
     {
        insightWindow.Closed -= new EventHandler(CloseInsightWindow);
         insightWindow.Dispose();
         insightWindow = null;
     }
 }
		/// <summary>
		/// Return true to handle the keypress, return false to let the text area handle the keypress
		/// </summary>
		bool TextAreaKeyEventHandler(char key)
		{
			if (codeCompletionWindow != null) {
				// If completion window is open and wants to handle the key, don't let the text area
				// handle it
				if (codeCompletionWindow.ProcessKeyEvent(key))
					return true;
			}

			if (key == '.') {
				ICompletionDataProvider completionDataProvider = new CodeCompletionProvider(iForm);
				
				codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(
					iForm,					// The parent window for the completion window
					editor, 					// The text editor to show the window for
					IntellisenseForm.DummyFileName,		// Filename - will be passed back to the provider
					completionDataProvider,		// Provider to get the list of possible completions
					key							// Key pressed - will be passed to the provider
				);
				if (codeCompletionWindow != null) {
					// ShowCompletionWindow can return null when the provider returns an empty list
					codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
				}
			} else if ((key == '(')) {
                if (insightWindow != null && (!insightWindow.IsDisposed))
                {
                    // provider returned an empty list, so the window never been opened
                    CloseInsightWindow(this, EventArgs.Empty);
                }
                IInsightDataProvider insightdataprovider = new MethodInsightDataProvider(iForm);
                insightWindow = new InsightWindow(iForm, editor);
                insightWindow.Closed += new EventHandler(CloseInsightWindow);
                insightWindow.AddInsightDataProvider(insightdataprovider, IntellisenseForm.DummyFileName);
                insightWindow.ShowInsightWindow();
            }
			return false;
		}
 // IdeBridge
 public virtual void ShowInsightWindow(IInsightDataProvider insightDataProvider)
 {
     if (insightWindow == null || insightWindow.IsDisposed) {
         insightWindow = new InsightWindow(WorkbenchSingleton.MainForm, this);
         insightWindow.Closed += new EventHandler(CloseInsightWindow);
     }
     insightWindow.AddInsightDataProvider(insightDataProvider, this.FileName);
     insightWindow.ShowInsightWindow();
 }
		public void ShowInsightWindow(IInsightDataProvider insightDataProvider)
		{
			if (insightWindow == null || insightWindow.IsDisposed) {
#if ModifiedForAltaxo
        insightWindow = new InsightWindow(Form.ActiveForm, this);
#else
				insightWindow = new InsightWindow(((Form)WorkbenchSingleton.Workbench), this);
#endif
				insightWindow.Closed += new EventHandler(CloseInsightWindow);
			}
			insightWindow.AddInsightDataProvider(insightDataProvider, this.FileName);
			insightWindow.ShowInsightWindow();
		}
Beispiel #5
0
 private void _insightWindow_Closed(object sender, EventArgs e)
 {
     Form senderForm = (Form)sender;
     senderForm.Closed -= new EventHandler(_insightWindow_Closed);
     senderForm.Dispose();
     if (senderForm == _insightWindow)
     {
         _insightWindow = null;
     }
 }
Beispiel #6
0
        private void ShowInsightWindow()
        {
            if (_insightWindow == null || _insightWindow.IsDisposed)
            {
                _insightWindow = new InsightWindow(this.ParentForm, scriptEditor, null);
                _insightWindow.Closed += new EventHandler(_insightWindow_Closed);
            }

            KeywordInsightDataProvider provider = new KeywordInsightDataProvider();
            _insightWindow.AddInsightDataProvider(provider);
            _insightWindow.ShowInsightWindow();

            if (!provider.HasData)
            {
                _insightWindow.Dispose();
                _insightWindow = null;
            }
        }
		private void CloseInsightWindow(object sender, EventArgs e)
		{
			if (_insightWindow != null)
			{
				_insightWindow.Closed -= CloseInsightWindow;
				_insightWindow.Dispose();
				_insightWindow = null;
			}
		}