コード例 #1
0
ファイル: ViewFilter.cs プロジェクト: Plankankul/SpecSharp
        public virtual void Close()
        {
            if (cookie != 0)
            {
                VsShell.DisConnect(this.textView, ref IID_IVsTextViewEvents, this.cookie);
                cookie = 0;
            }
            if (textView == LastActiveTextView)
            {
                LastActiveTextView = null;
            }
            textView.RemoveCommandFilter(this);

            if (textTipData != null)
            {
                textTipData.Close(textView);
            }
        }
コード例 #2
0
        /// <include file='doc\ViewFilter.uex' path='docs/doc[@for="ViewFilter.Close"]/*' />
        public virtual void Close()
        {
            Trace.WriteLine("ViewFilter::Close");

            if (textViewEvents != null)
            {
                textViewEvents.Dispose();
                textViewEvents = null;
            }

            if (textView == this.service.LastActiveTextView)
            {
                this.service.OnActiveViewChanged(null);
            }

            textView.RemoveCommandFilter(this); // do not care about HRESULT.
            if (textTipData != null)
            {
                textTipData.Close(textView);
                textTipData = null;
            }

            Dispose();
        }