Esempio n. 1
0
        public void ExecuteResetInteractive()
        {
            var resetInteractive = new VsResetInteractive(
                _workspace,
                (DTE)GetService(typeof(SDTE)),
                _componentModel,
                (IVsMonitorSelection)GetService(typeof(SVsShellMonitorSelection)),
                (IVsSolutionBuildManager)GetService(typeof(SVsSolutionBuildManager)),
                CreateReference,
                CreateImport
                );

            var vsInteractiveWindow = _interactiveWindowProvider.Open(instanceId: 0, focus: true);

            void focusWindow(object s, EventArgs e)
            {
                // We have to set focus to the Interactive Window *after* the wait indicator is dismissed.
                vsInteractiveWindow.Show(focus: true);
                resetInteractive.ExecutionCompleted -= focusWindow;
            }

            resetInteractive.ExecuteAsync(
                vsInteractiveWindow.InteractiveWindow,
                LanguageName + " Interactive"
                );
            resetInteractive.ExecutionCompleted += focusWindow;
        }
        public void ExecuteResetInteractive()
        {
            var resetInteractive = new VsResetInteractive(
                (DTE)this.GetService(typeof(SDTE)),
                _componentModel,
                (IVsMonitorSelection)this.GetService(typeof(SVsShellMonitorSelection)),
                (IVsSolutionBuildManager)this.GetService(typeof(SVsSolutionBuildManager)),
                CreateReference,
                CreateImport);

            var vsInteractiveWindow = _interactiveWindowProvider.Open(instanceId: 0, focus: true);

            EventHandler focusWindow = null;

            focusWindow = (s, e) =>
            {
                // We have to set focus to the Interactive Window *after* the wait indicator is dismissed.
                vsInteractiveWindow.Show(focus: true);
                resetInteractive.ExecutionCompleted -= focusWindow;
            };

            resetInteractive.Execute(vsInteractiveWindow.InteractiveWindow, LanguageName + " Interactive");
            resetInteractive.ExecutionCompleted += focusWindow;
        }