Пример #1
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;
 }
Пример #2
0
 CompletionCollectionVM RecreateCompletionCollectionVM(IList <Completion> completions)
 {
     completionCollectionVM?.Dispose();
     completionCollectionVM = null;
     if (completions == null)
     {
         return(null);
     }
     completionCollectionVM = new CompletionCollectionVM(completions, imageMonikerService);
     return(completionCollectionVM);
 }
Пример #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;
		}
Пример #4
0
		CompletionCollectionVM RecreateCompletionCollectionVM(IList<Completion> completions) {
			completionCollectionVM?.Dispose();
			completionCollectionVM = null;
			if (completions == null)
				return null;
			completionCollectionVM = new CompletionCollectionVM(completions, imageMonikerService);
			return completionCollectionVM;
		}