Example #1
0
        public ProjectNode(ProjectEntry project, IconProvider iconProvider)
            : base(project.Project, project.FilePath.ParentDirectory, iconProvider)
        {
            ProjectEntry = project;
            ProjectEntry.LoadComplete += project_LoadComplete;

            var solution = ProjectEntry.GetRoot() as Solution;

            if (solution != null)
            {
                solution.Settings.StartupProjects.InsertedItem += StartupProjects_InsertedItem;
                solution.Settings.StartupProjects.RemovedItem  += StartupProjects_RemovedItem;
            }

            if (project.HasProject)
            {
                ImageIndex = SelectedImageIndex = (_iconProvider = iconProvider).GetImageIndex(project);

                _propertiesNode = new PropertiesNode(iconProvider);

                if (project.Project is IAssemblyReferenceProvider)
                {
                    _referencesNode = new ReferencesNode(project.Project as IAssemblyReferenceProvider, iconProvider);
                }
            }

            if (project.IsLoaded)
            {
                Populate();
            }
        }
        public ProjectNode(ProjectEntry project, IconProvider iconProvider)
            : base(project.Project, project.FilePath.ParentDirectory, iconProvider)
        {
            ProjectEntry = project;
            ProjectEntry.LoadComplete += project_LoadComplete;

            var solution = ProjectEntry.GetRoot() as Solution;
            if (solution != null)
            {
                solution.Settings.StartupProjects.InsertedItem += StartupProjects_InsertedItem;
                solution.Settings.StartupProjects.RemovedItem += StartupProjects_RemovedItem;
            }

            if (project.HasProject)
            {
                ImageIndex = SelectedImageIndex = (_iconProvider = iconProvider).GetImageIndex(project);

                _propertiesNode = new PropertiesNode(iconProvider);

                if (project.Project is IAssemblyReferenceProvider)
                    _referencesNode = new ReferencesNode(project.Project as IAssemblyReferenceProvider, iconProvider);
            }

            if (project.IsLoaded)
                Populate();
        }