Exemplo n.º 1
0
        public void Dispose()
        {
            //Remove message filter
            Application.RemoveMessageFilter((System.Windows.Forms.IMessageFilter) this);

            if (services != null)
            {
                // Remove this object from the list of the priority command targets.
                if (cmdTargetCookie != 0)
                {
                    IVsRegisterPriorityCommandTarget register =
                        services.VsRegisterPriorityCommandTarget;
                    if (null != register)
                    {
                        int hr = register.UnregisterPriorityCommandTarget(cmdTargetCookie);
                        if (hr != VSConstants.S_OK)
                        {
                            Marshal.ThrowExceptionForHR(hr);
                        }
                    }
                    cmdTargetCookie = 0;
                }
                services = null;
            }
            if (coreEditor != null)
            {
                IVsCodeWindow win = coreEditor.CodeWindow;
                win.Close();
                coreEditor = null;
            }
        }
Exemplo n.º 2
0
        public int Close()
        {
            IVsCodeWindow vsCodeWindow = SourceCodeWindow;

            if (vsCodeWindow != null)
            {
                return(vsCodeWindow.Close());
            }
            return(VSConstants.E_NOTIMPL);
        }
Exemplo n.º 3
0
        private void ClearEditor()
        {
            if (_docData != null)
            {
                _docData.GetStateFlags(out uint oldFlags);
                _docData.SetStateFlags(oldFlags & ~(uint)BUFFERSTATEFLAGS.BSF_USER_READONLY);
                _docData = null;
            }

            if (_codeWindow != null)
            {
                _codeWindow.Close();
                _codeWindow = null;
            }

            if (_textView != null)
            {
                _textView.CloseView();
                _textView = null;
            }

            _textViewHost = null;
        }
Exemplo n.º 4
0
 public int Close()
 {
     return(codeWindow.Close());
 }
Exemplo n.º 5
0
 int IVsCodeWindow.Close() => _editorWindow.Close();
Exemplo n.º 6
0
 protected override void OnClose()
 {
     _vsCodeWindow.Close();
     base.OnClose();
 }