UnregisterEditor() static private méthode

static private UnregisterEditor ( VSCodeEditorWindow editor ) : void
editor VSCodeEditorWindow
Résultat void
Exemple #1
0
 public void Dispose()
 {
     //Remove message filter
     //Application.RemoveMessageFilter((System.Windows.Forms.IMessageFilter)this);
     EditorBroker.UnregisterEditor(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;
     }
 }
Exemple #2
0
 /// <summary>
 /// Unregister the editor to delete the handles and events to the window.
 /// </summary>
 public void UnregisterEditor()
 {
     if (_nativeWindow != null)
     {
         EditorBroker.UnregisterEditor(_nativeWindow);
     }
 }