public static void OpenTutorialSolution(SolutionStateTracker solutionStateTracker, int id) { var globalSettings = GlobalSettings.Instance; VsIntegration.CloseVsSolution(); solutionStateTracker.NotifyAgreeToRunTutorial(); SolutionCopyHelper.CleanUpDirectory(globalSettings.GetPath(id, PathType.WorkCopySolutionFolder)); SolutionCopyHelper.CopySolution(globalSettings.GetPath(id, PathType.BaseSolutionFolder), globalSettings.GetPath(id, PathType.WorkCopySolutionFolder)); VsIntegration.OpenVsSolution(globalSettings.GetPath(id, PathType.WorkCopySolutionFile)); }
public TutorialWindowManager(Lifetime shellLifetime, SolutionStateTracker solutionStateTracker, GlobalSettings globalSettings, IShellLocks shellLocks, ToolWindowManager toolWindowManager, TutorialWindowDescriptor toolWindowDescriptor, IUIApplication environment, IActionManager actionManager, IWindowsHookManager windowsHookManager, IColorThemeManager colorThemeManager, IThreading threading) { _shellLifetime = shellLifetime; _solutionStateTracker = solutionStateTracker; _globalSettings = globalSettings; _shellLocks = shellLocks; _environment = environment; _actionManager = actionManager; _windowsHookManager = windowsHookManager; _colorThemeManager = colorThemeManager; _threading = threading; _runningTutorial = 0; _toolWindowClass = toolWindowManager.Classes[toolWindowDescriptor] as TabbedToolWindowClass; if (_toolWindowClass == null) { throw new ApplicationException("Expected tabbed tool window"); } _toolWindowClass.QueryCloseInstances.Advise(shellLifetime, args => { if (_runningTutorial == 0) { return; } if (!_tutorialWindow.IsLastStep) { args.Cancel = !MessageBox.ShowYesNo( "This will close the tutorial solution as well. Tutorial progress will be lost. Close the tutorial?", "ReSharper Tutorials"); if (args.Cancel) { return; } } VsIntegration.CloseVsSolution(true); }); }
public void CloseSolution() { VsIntegration.CloseVsSolution(true); }
public void Close(object sender, RoutedEventArgs args) { VsIntegration.CloseVsSolution(true); }