Beispiel #1
0
        private void WindowEventsOnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)
        {
            //No solution loaded
            if (_solution.Count == 0)
            {
                ResetForm();
                return;
            }

            //WindowEventsOnWindowActivated in this project can be called when activating another window
            //so we don't want to contine further unless our window is active
            if (!HostWindow.IsCrmDevExWindow(gotFocus))
            {
                return;
            }
        }
        int IVsSolutionEvents.OnBeforeCloseSolution(object pUnkReserved)
        {
            foreach (Window window in _dte.Windows)
            {
                if (window.Type != vsWindowType.vsWindowTypeToolWindow)
                {
                    continue;
                }

                if (!HostWindow.IsCrmDevExWindow(window))
                {
                    continue;
                }

                OutputLogger.DeleteOutputWindow();
                window.Close();
            }

            OutputLogger.DeleteOutputWindow();

            return(VSConstants.S_OK);
        }
Beispiel #3
0
        private void WindowEventsOnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)
        {
            //No solution loaded
            if (_solution.Count == 0)
            {
                ResetForm();
                return;
            }

            //WindowEventsOnWindowActivated in this project can be called when activating another window
            //so we don't want to contine further unless our window is active
            if (!HostWindow.IsCrmDevExWindow(gotFocus))
            {
                return;
            }

            if (ConnPane.CrmService != null && ConnPane.CrmService.IsReady)
            {
                SetWindowCaption(gotFocus.Caption);
                SetButtonState(true);
                LoadData();
            }
        }