Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 internal void AutoOpenToolWindows()
 {
     SolutionBuilderToolWindow.AutoOpenWindow(this);
     GuidanceExplorerToolWindow.AutoOpenWindow(this);
 }