void DTEEvents_ModeChanged(vsIDEMode LastMode)
 {
     try
     {
         if (LastMode == vsIDEMode.vsIDEModeDebug) return;
         StringBuilder sb = new StringBuilder();
         foreach (PerformanceTab tab in PerformanceEditorViews.Values)
         {
             if (tab.IsExecuting)
                 sb.AppendLine(tab.PackageName);
         }
         if (sb.Length > 0)
         {
             DialogResult result = MessageBox.Show("BIDS Helper is currently executing the following packages to capture performance statistics:\r\n\r\n" + sb.ToString() + "\r\nAre you sure you want to run something else?\r\n\r\nClick OK to continue debugging. BIDS Helper will continue executing these packages.\r\nClick Cancel to cancel debugging. BIDS Helper will continue executing these packages.", "BIDS Helper SSIS Performance Visualization In Progress", MessageBoxButtons.OKCancel);
             if (result == DialogResult.Cancel)
             {
                 this.ApplicationObject.Debugger.Stop(false);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
 void DTEEvents_ModeChanged(vsIDEMode LastMode)
 {
     try
     {
         if (LastMode == vsIDEMode.vsIDEModeDebug)
         {
             return;
         }
         StringBuilder sb = new StringBuilder();
         foreach (PerformanceTab tab in PerformanceEditorViews.Values)
         {
             if (tab.IsExecuting)
             {
                 sb.AppendLine(tab.PackageName);
             }
         }
         if (sb.Length > 0)
         {
             DialogResult result = MessageBox.Show("BIDS Helper is currently executing the following packages to capture performance statistics:\r\n\r\n" + sb.ToString() + "\r\nAre you sure you want to run something else?\r\n\r\nClick OK to continue debugging. BIDS Helper will continue executing these packages.\r\nClick Cancel to cancel debugging. BIDS Helper will continue executing these packages.", "BIDS Helper SSIS Performance Visualization In Progress", MessageBoxButtons.OKCancel);
             if (result == DialogResult.Cancel)
             {
                 this.ApplicationObject.Debugger.Stop(false);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
 private void HandleModeChanged(vsIDEMode lastMode)
 {
     if (_content != null)
     {
         _content.IsPaused = _isPaused = lastMode == vsIDEMode.vsIDEModeDesign;
     }
 }
Exemple #4
0
 void dteEvents_ModeChanged(vsIDEMode LastMode)
 {
     // Attach to the process when the mode changes (but before the debugger starts).
     if (IntegrationPackage.VS_DTE.DTE.Mode == vsIDEMode.vsIDEModeDebug)
     {
         AttachToServiceEngineCommand.Attach();
     }
 }
Exemple #5
0
        /// <summary>
        /// Gets the current Visual Studio IDE state.
        /// </summary>
        public static ShellModes GetMode(vsIDEMode m)
        {
            switch (m)
            {
            case vsIDEMode.vsIDEModeDebug:
                return(ShellModes.Debug);

            default:
                return(ShellModes.Design);
            }
        }
Exemple #6
0
        private void OnModeChanged(vsIDEMode lastMode)
        {
            if (lastMode == vsIDEMode.vsIDEModeDesign)
            {
                DebugStartTime = DateTime.Now;

                if (ShowDebugWindowOnDebug || (ShowTimeStamps && !TimeStampMarginProvider.Initialized))
                {
                    ActivateDebugOutputWindow();
                }
            }
        }
Exemple #7
0
 private void OnModeChanged(vsIDEMode lastMode)
 {
     if (lastMode == vsIDEMode.vsIDEModeDesign && ShowDebugWindowOnDebug)
     {
         _dte2.ToolWindows.OutputWindow.Parent.Activate();
         foreach (OutputWindowPane pane in _dte2.ToolWindows.OutputWindow.OutputWindowPanes)
         {
             if (pane.Guid == VSConstants.OutputWindowPaneGuid.DebugPane_string)
             {
                 pane.Activate();
                 break;
             }
         }
     }
 }
Exemple #8
0
        private void DteEvents_ModeChanged(vsIDEMode LastMode)
        {
            switch (LastMode)
            {
            case vsIDEMode.vsIDEModeDesign:
                SendTalk(Config.EnterDebugger);
                break;

            case vsIDEMode.vsIDEModeDebug:
                SendTalk(Config.EnterDesign);
                break;

            default:
                break;
            }
        }
Exemple #9
0
 /// <summary>
 /// Called when VS goes from design to debug mode and vice versa.
 /// </summary>
 private void DTEEvents_ModeChanged(vsIDEMode lastMode)
 {
     if (_dumpMemory != null)
     {
         _dumpMemory.IsDebugging = (lastMode != vsIDEMode.vsIDEModeDebug);
     }
     if (lastMode == vsIDEMode.vsIDEModeDebug)
     {
         _dte.Events.DebuggerEvents.OnContextChanged  -= DebuggerEvents_OnContextChanged;
         _dte.Events.DebuggerEvents.OnEnterBreakMode  -= DebuggerEvents_OnEnterBreakMode;
         _dte.Events.DebuggerEvents.OnEnterDesignMode -= DebuggerEvents_OnEnterRunMode;
         _dte.Events.DebuggerEvents.OnEnterRunMode    -= DebuggerEvents_OnEnterRunMode;
     }
     else
     {
         _dte.Events.DebuggerEvents.OnContextChanged  += DebuggerEvents_OnContextChanged;
         _dte.Events.DebuggerEvents.OnEnterBreakMode  += DebuggerEvents_OnEnterBreakMode;
         _dte.Events.DebuggerEvents.OnEnterDesignMode += DebuggerEvents_OnEnterRunMode;
         _dte.Events.DebuggerEvents.OnEnterRunMode    += DebuggerEvents_OnEnterRunMode;
     }
 }
Exemple #10
0
 //DTEEvents
 public void DTEModeChanged(vsIDEMode ideMode)
 {
     m_debugMode = (ideMode == vsIDEMode.vsIDEModeDebug);
 }
Exemple #11
0
 //DTEEvents
 public void DTEModeChanged(vsIDEMode ideMode)
 {
     m_debugMode = (ideMode == vsIDEMode.vsIDEModeDebug);
 }
Exemple #12
0
        private void OnModeChanged(vsIDEMode lastMode)
        {
            if (lastMode == vsIDEMode.vsIDEModeDesign)
            {
                DebugStartTime = DateTime.Now;

                if (ShowDebugWindowOnDebug || (ShowTimeStamps && !TimeStampMarginProvider.Initialized))
                {
                    ActivateDebugOutputWindow();
                }
            }
        }
Exemple #13
0
 private void OnModeChanged(vsIDEMode lastMode)
 {
     if (lastMode == vsIDEMode.vsIDEModeDesign && ShowDebugWindowOnDebug)
     {
         _dte2.ToolWindows.OutputWindow.Parent.Activate();
         foreach (OutputWindowPane pane in _dte2.ToolWindows.OutputWindow.OutputWindowPanes)
         {
             if (pane.Guid == VSConstants.OutputWindowPaneGuid.DebugPane_string)
             {
                 pane.Activate();
                 break;
             }
         }
     }
 }
Exemple #14
0
 private void OnModeChanged(vsIDEMode lastMode)
 {
     if (lastMode == vsIDEMode.vsIDEModeDesign && ShowDebugWindowOnDebug)
     {
         _dte2.ToolWindows.OutputWindow.Parent.Activate();
         // ReSharper disable once LoopCanBeConvertedToQuery
         foreach (OutputWindowPane pane in _dte2.ToolWindows.OutputWindow.OutputWindowPanes)
         {
             if (pane.Guid == VSConstants.OutputWindowPaneGuid.DebugPane_string)
             {
                 pane.Activate();
                 break;
             }
         }
     }
 }
Exemple #15
0
 void InternalModeChanged(vsIDEMode lastMode)
 {
     FireEventAndUpdateMode(ShellHelper.GetMode(lastMode));
 }
 private void NotifyModeChanged(vsIDEMode lastmode)
 {
     Console.WriteLine("Mode: " + ((DTE)Package.GetGlobalService(typeof(DTE))).Mode);
     DesignerKiller.KillAllDesigners();
     ModeChanged?.Invoke();
 }
Exemple #17
0
		static void DesignDebugModeChanged(vsIDEMode LastMode)
		{
			//TODO:
			//Since there is no way to kill toolwindows until the IDE closes, sometimes tool windows of other database also appears
			// to avoid such situation first make all the toolwindows invisible which are not for current db and then 
			//play around with current databse toolwindow
			//Find a way if this can be avoided.
			
			MakeAllQueryResultWindowsInvisibleWhichDoNotBelongToCurrentDatabase();

			if (dbInteraction.CheckIfDbConnected())
			{

				ForEachOMNWindow(delegate(Window window)
				                 	{
				                 		window.Visible = (window.Caption != Constants.LOGIN);
				                 	});

			}
			else
			{
				ForEachOMNWindow(delegate(Window window)
									{
										window.Visible = (window.Caption == Constants.LOGIN && Helper.CheckIfLoginWindowIsVisible);
									});

			}
			DockWindowsIfRequired();
			
		}
 private void NotifyModeChanged(vsIDEMode lastmode)
 {
     Console.WriteLine("Mode: " + ((DTE) Package.GetGlobalService(typeof (DTE))).Mode);
     DesignerKiller.KillAllDesigners();
     ModeChanged?.Invoke();
 }
Exemple #19
0
        private void DteEvents_ModeChanged(vsIDEMode LastMode)
        {
            Debug.WriteLine("DteEvents_ModeChanged");

            monitor.ForceRename();
        }