Ejemplo n.º 1
0
        protected bool RegisterHandler(string commandName, _dispCommandEvents_BeforeExecuteEventHandler handler)
        {
            Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();
            CommandEvents events = mPlugin.FindCommandEvents(commandName);

            if (null == events)
            {
                return(false);
            }
            events.BeforeExecute += handler;
            return(true);
        }
Ejemplo n.º 2
0
        protected void RegisterHandler(string commandName, _dispCommandEvents_BeforeExecuteEventHandler handler)
        {
            CommandEvents events = mPlugin.FindCommandEvents(commandName);

            if (null == events)
            {
                return;
            }
            events.BeforeExecute += handler;
            mEvents.Add(events);
        }