void CompletionSession_Dismissed(object sender, EventArgs e)
 {
     UnregisterCompletionSetEvents();
     DisposeFilters();
     toolTipTimer.Stop();
     toolTipTimer.Tick -= ToolTipTimer_Tick;
     HideToolTip();
     session.SelectedCompletionSetChanged -= CompletionSession_SelectedCompletionSetChanged;
     session.Dismissed -= CompletionSession_Dismissed;
     session.TextView.LostAggregateFocus            -= TextView_LostAggregateFocus;
     session.TextView.TextBuffer.ChangedLowPriority -= TextBuffer_ChangedLowPriority;
     control.completionsListBox.SelectionChanged    -= CompletionsListBox_SelectionChanged;
     control.completionsListBox.Loaded           -= CompletionsListBox_Loaded;
     control.completionsListBox.PreviewMouseDown -= CompletionsListBox_PreviewMouseDown;
     control.completionsListBox.PreviewMouseUp   -= CompletionsListBox_PreviewMouseUp;
     control.completionsListBox.MouseLeave       -= CompletionsListBox_MouseLeave;
     control.completionsListBox.MouseDoubleClick -= CompletionsListBox_MouseDoubleClick;
     control.completionsListBox.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
     control.SizeChanged      -= Control_SizeChanged;
     control.GotKeyboardFocus -= Control_GotKeyboardFocus;
     if (wpfTextView != null)
     {
         wpfTextView.VisualElement.PreviewKeyDown -= VisualElement_PreviewKeyDown;
     }
     session.TextView.LayoutChanged -= TextView_LayoutChanged;
     completionTextElementProvider.Dispose();
     control.completionsListBox.ItemsSource = null;
     completionCollectionVM?.Dispose();
     completionCollectionVM = null;
 }
 CompletionCollectionVM RecreateCompletionCollectionVM(IList <Completion> completions)
 {
     completionCollectionVM?.Dispose();
     completionCollectionVM = null;
     if (completions == null)
     {
         return(null);
     }
     completionCollectionVM = new CompletionCollectionVM(completions, imageMonikerService);
     return(completionCollectionVM);
 }
Example #3
0
		void CompletionSession_Dismissed(object sender, EventArgs e) {
			UnregisterCompletionSetEvents();
			DisposeFilters();
			toolTipTimer.Stop();
			toolTipTimer.Tick -= ToolTipTimer_Tick;
			HideToolTip();
			session.SelectedCompletionSetChanged -= CompletionSession_SelectedCompletionSetChanged;
			session.Dismissed -= CompletionSession_Dismissed;
			session.TextView.LostAggregateFocus -= TextView_LostAggregateFocus;
			session.TextView.TextBuffer.ChangedLowPriority -= TextBuffer_ChangedLowPriority;
			control.completionsListBox.SelectionChanged -= CompletionsListBox_SelectionChanged;
			control.completionsListBox.Loaded -= CompletionsListBox_Loaded;
			control.completionsListBox.PreviewMouseDown -= CompletionsListBox_PreviewMouseDown;
			control.completionsListBox.PreviewMouseUp -= CompletionsListBox_PreviewMouseUp;
			control.completionsListBox.MouseLeave -= CompletionsListBox_MouseLeave;
			control.completionsListBox.MouseDoubleClick -= CompletionsListBox_MouseDoubleClick;
			control.completionsListBox.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
			control.SizeChanged -= Control_SizeChanged;
			control.GotKeyboardFocus -= Control_GotKeyboardFocus;
			if (wpfTextView != null)
				wpfTextView.VisualElement.PreviewKeyDown -= VisualElement_PreviewKeyDown;
			session.TextView.LayoutChanged -= TextView_LayoutChanged;
			completionTextElementProvider.Dispose();
			control.completionsListBox.ItemsSource = null;
			completionCollectionVM?.Dispose();
			completionCollectionVM = null;
		}
Example #4
0
		CompletionCollectionVM RecreateCompletionCollectionVM(IList<Completion> completions) {
			completionCollectionVM?.Dispose();
			completionCollectionVM = null;
			if (completions == null)
				return null;
			completionCollectionVM = new CompletionCollectionVM(completions, imageMonikerService);
			return completionCollectionVM;
		}