public Project CreateProject (string language, ProjectCreateInformation info, XmlElement projectOptions)
		{
			
			XnaProject project = new XnaProject(language, info, projectOptions);
			
			ProjectCreateInformation contentInfo = new ProjectCreateInformation();
			contentInfo.SolutionName = info.SolutionName;
			contentInfo.SolutionPath = info.SolutionPath;
			contentInfo.ProjectBasePath = info.ProjectBasePath.Combine("Content");
			contentInfo.ProjectName = "Content";
			
			ContentProject contentProject = (ContentProject)Services.ProjectService.CreateProject("ContentProject", contentInfo, projectOptions);
			FilePath includePath = FilePath.Empty.Combine("Content").Combine(contentProject.FileName);
			NestedContentProject nestedContent = new NestedContentProject(contentProject, includePath);
			project.NestedContentProjects.Add(nestedContent);
			
			return project;
		}
Beispiel #2
0
        protected override void OnItemsAdded(System.Collections.Generic.IEnumerable <ProjectItem> objs)
        {
            foreach (ProjectItem obj in objs)
            {
                if (obj is NestedContentProject)
                {
                    NestedContentProject contentProject = obj as NestedContentProject;

                    FilePath contentProjectPath = BaseDirectory.Combine(contentProject.Include);
                    if (File.Exists(contentProjectPath))
                    {
                        contentProject.Project = (ContentProject)ContentProject.LoadProject(contentProjectPath, new SimpleProgressMonitor());
                        RegisterInternalChild(contentProject.Project);
                    }
                }
            }
            base.OnItemsAdded(objs);
        }
Beispiel #3
0
        public Project CreateProject(string language, ProjectCreateInformation info, XmlElement projectOptions)
        {
            XnaProject project = new XnaProject(language, info, projectOptions);

            ProjectCreateInformation contentInfo = new ProjectCreateInformation();

            contentInfo.SolutionName    = info.SolutionName;
            contentInfo.SolutionPath    = info.SolutionPath;
            contentInfo.ProjectBasePath = info.ProjectBasePath.Combine("Content");
            contentInfo.ProjectName     = "Content";

            ContentProject       contentProject = (ContentProject)Services.ProjectService.CreateProject("ContentProject", contentInfo, projectOptions);
            FilePath             includePath    = FilePath.Empty.Combine("Content").Combine(contentProject.FileName);
            NestedContentProject nestedContent  = new NestedContentProject(contentProject, includePath);

            project.NestedContentProjects.Add(nestedContent);

            return(project);
        }