UnregisterEditor() 정적인 개인적인 메소드

static private UnregisterEditor ( VSCodeEditorWindow editor ) : void
editor VSCodeEditorWindow
리턴 void
예제 #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;
     }
 }
예제 #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);
     }
 }