/// <summary> /// When our tool window is active it will be the 'focus command target' of the shell's command route, as such we need to set the state /// of any commands we want here and forward the rest to the editor (since most all typing is translated into a command for the editor to /// deal with). /// </summary> int IOleCommandTarget.QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) { if (this.control.IsKeyboardFocusWithin && (EditorCommandTarget != null)) { return(EditorCommandTarget.QueryStatus(ref pguidCmdGroup, cCmds, prgCmds, pCmdText)); } return((int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED); }
/// <summary> /// When our tool window is active it will be the 'focus command target' of the shell's command route, as such we need to handle any /// commands we want here and forward the rest to the editor (since most all typing is translated into a command for the editor to /// deal with). /// </summary> int IOleCommandTarget.Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) { if (this.control.IsKeyboardFocusWithin && (EditorCommandTarget != null)) { int res = EditorCommandTarget.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); return(res); } return((int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED); }