static private UnregisterEditor ( |
||
editor | ||
리턴 | void |
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; } }
/// <summary> /// Unregister the editor to delete the handles and events to the window. /// </summary> public void UnregisterEditor() { if (_nativeWindow != null) { EditorBroker.UnregisterEditor(_nativeWindow); } }