private void OnSolutionOpened(object sender, SolutionEventArgs e) { var pathExpression1 = Path.Combine(SolutionExtensions.SolutionItemsFolderName, string.Concat(@"*", Runtime.StoreConstants.RuntimeStoreExtension)); var pathExpression2 = string.Concat(@"*", Runtime.StoreConstants.RuntimeStoreExtension); // Ensure solution contains at least one state file if (e.Solution != null) { // Search Solution Items folder var solutionFiles = e.Solution.Find<IItem>(pathExpression1); if (solutionFiles.Any()) { SolutionBuilderToolWindow.AutoOpenWindow(this); } else { // Search whole solution for state file. solutionFiles = e.Solution.Find<IItem>(pathExpression2); if (solutionFiles.Any()) { SolutionBuilderToolWindow.AutoOpenWindow(this); } } } if (!this.GuidanceManager.IsOpened) { this.GuidanceManager.Open(new SolutionDataState(this.Solution)); // Open guidance windows GuidanceExplorerToolWindow.AutoOpenWindow(this); //GuidanceBrowserToolWindow.OpenWindow(this); } }
private void OnSolutionClosed(object sender, SolutionEventArgs e) { SolutionBuilderToolWindow.AutoHideWindow(this); GuidanceExplorerToolWindow.AutoHideWindow(this); GuidanceBrowserToolWindow.HideWindow(this); }