private void Package_IdeModeChanged(object sender, enumIDEMode newMode)
 {
     try
     {
         if (newMode != enumIDEMode.Debug)
         {
             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);
     }
 }
        public int OnModeChange(DBGMODE mode)
        {
            mode = mode & ~DBGMODE.DBGMODE_EncMask;

            switch (mode)
            {
            case DBGMODE.DBGMODE_Design:
                _ideMode = enumIDEMode.Design;
                break;

            case DBGMODE.DBGMODE_Break:
                _ideMode = enumIDEMode.Debug;
                break;

            case DBGMODE.DBGMODE_Run:
                _ideMode = enumIDEMode.Run;
                break;
            }
            IdeModeChanged?.Invoke(this, _ideMode);
            return(VSConstants.S_OK);
        }
Exemple #3
0
 void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _ideMode = enumIDEMode.Debug;
     dettachWindowEvents();
 }
Exemple #4
0
 void _debuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Design;
     attachWindowEvents();
 }
Exemple #5
0
 void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Run;
     dettachWindowEvents();
 }
 void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _ideMode = enumIDEMode.Debug;
     dettachWindowEvents();
 }
 void _debuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Design;
     attachWindowEvents();
 }
 void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Run;
     dettachWindowEvents();
 }