示例#1
0
        public XamlCompletionHandler(IVsTextView textViewAdapter, ITextView textView, TextViewListener listener)
        {
            this.textView = textView;
            this.listener = listener;

            //add the command to the command chain
            textViewAdapter.AddCommandFilter(this, out nextCommandHandler);
        }
示例#2
0
		public XamlCompletionHandler(IVsTextView textViewAdapter, ITextView textView, TextViewListener listener)
		{
			this.textView = textView;
			this.listener = listener;

			//add the command to the command chain
			textViewAdapter.AddCommandFilter(this, out nextCommandHandler);
		}
        void windowEvents_WindowActivated(Window GotFocus, Window LostFocus)
        {
            if (null == GotFocus || activeWindows.ContainsKey(GotFocus))
            {
                return;
            }

            var filePath        = GetWindowPath(GotFocus);
            var connectionPoint = GetConnectionPoint(filePath);

            if (null == connectionPoint)
            {
                return;
            }


            var  listener = new TextViewListener(this, filePath);
            uint cookie;

            connectionPoint.Advise(listener, out cookie);
            activeWindows.Add(GotFocus, Tuple.Create(cookie, connectionPoint));
        }