Ejemplo n.º 1
0
 private Commands()
 {
     InitEasyTest();
     DropDataBaseCommand.Init();
     LoadProjectFromReferenceCommand.Init();
     ProjectConverterCommand.Init();
     SetSpecificVersion();
     XAFErrorExplorerCommand.Init();
     DisableExceptions();
     ShowModelsWindowCommand.Init();
     KillIISExpressCommand.Init();
     BuildSelectionCommand.Init();
     FindInSolutionCommand.Init();
     DuplicateLineCommand.Init();
     NavigatePreviousSubwordCommand.Init();
     NavigateNextSubwordCommand.Init();
     ShowOptionsCommand.Init();
 }
Ejemplo n.º 2
0
        private static void Build()
        {
            var dte2 = DteExtensions.DTE;

            if (!FindInSolutionCommand.Find())
            {
                dte2.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate();
            }
            if (dte2.Windows.Item(Constants.vsext_wk_SProjectWindow).Object is UIHierarchy uihSolutionExplorer)
            {
                var selectedHierarchyItems = ((UIHierarchyItem[])uihSolutionExplorer.SelectedItems).ToArray();
                var solutionName           = Path.GetFileNameWithoutExtension(dte2.Solution.FileName);
                if (selectedHierarchyItems.Length == 1 && selectedHierarchyItems.First().Name == Path.GetFileNameWithoutExtension(solutionName))
                {
                    dte2.ExecuteCommand("Build.BuildSolution");
                }
                else
                {
                    dte2.ExecuteCommand("Build.BuildSelection");
                }
            }
        }