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 OnShellInitialized(object sender, EventArgs e) { CheckFertNotInstalled(); SolutionBuilderToolWindow.InitializeWindowVisibility(this); GuidanceExplorerToolWindow.InitializeWindowVisibility(this); }
/// <summary> /// TODO: this method needs replacing with one that return void, and a better way to place buttons on the toolbar of solution builder. /// </summary> public ToolWindowPane ShowSolutionBuilder(IServiceProvider serviceProvider) { Guard.NotNull(() => serviceProvider, serviceProvider); return(SolutionBuilderToolWindow.OpenWindow(serviceProvider)); }
private void OnSolutionClosed(object sender, SolutionEventArgs e) { SolutionBuilderToolWindow.AutoHideWindow(this); GuidanceExplorerToolWindow.AutoHideWindow(this); GuidanceBrowserToolWindow.HideWindow(this); }
internal void AutoOpenToolWindows() { SolutionBuilderToolWindow.AutoOpenWindow(this); GuidanceExplorerToolWindow.AutoOpenWindow(this); }