public ShellEventsListener(DTE2 dte) { appObject = dte; dteEvents = dte.Events.DTEEvents; debugEvents = dte.Events.DebuggerEvents; currentMode = ShellHelper.GetMode(appObject); dteEvents.ModeChanged += InternalModeChanged; debugEvents.OnEnterBreakMode += OnEnterBreakMode; debugEvents.OnEnterDesignMode += OnEnterDesignMode; debugEvents.OnEnterRunMode += OnEnterRunMode; }
void InternalModeChanged(vsIDEMode lastMode) { FireEventAndUpdateMode(ShellHelper.GetMode(lastMode)); }