Esempio n. 1
0
        /// <include file='doc\HierarchyItem.uex' path='docs/doc[@for="HierarchyItemNode.HierarchyItemNode"]/*' />
        /// <summary>
        /// constructor for the HierarchyItemNode
        /// </summary>
        /// <param name="root"></param>
        /// <param name="type"></param>
        /// <param name="strDirectoryPath"></param>
        public HierarchyItemNode(Project root, HierarchyNodeType type, ProjectElement e)
		{
            this.projectMgr = root;
            this.nodeType = type;
			this.itemNode = e;
			this.hierarchyId = this.projectMgr.ItemIdMap.Add(this);
        }
Esempio n. 2
0
        /// <include file='doc\Hierarchy.uex' path='docs/doc[@for="HierarchyNode.HierarchyNode2"]/*' />
        /// <summary>
        /// note that here the directorypath needs to end with a backslash...
        /// </summary>
        /// <param name="root"></param>
        /// <param name="type"></param>
        /// <param name="strDirectoryPath"></param>
        public HierarchyNode(Project root, HierarchyNodeType type, string strDirectoryPath){
            Uri uriBase;
            Uri uriNew;
            string relPath;
            // the path is an absolute one, need to make it relative to the project for further use in the xml document
            uriNew = new Uri(strDirectoryPath);
            uriBase = new Uri(root.projFile.BaseURI);
#if WHIDBEY
            relPath = uriBase.MakeRelativeUri(uriNew).ToString();
#else
            relPath = uriBase.MakeRelative(uriNew);
#endif
            relPath = relPath.Replace("/", "\\");

            this.projectMgr = root;
            this.nodeType = type;
            // we need to create an dangling node... just for this abstract folder type
            this.xmlNode = this.projectMgr.projFile.CreateElement("Folder");
            this.xmlNode.SetAttribute("RelPath", relPath);

            this.hierarchyId = this.projectMgr.ItemIdMap.Add(this);
        }
Esempio n. 3
0
        /// <include file='doc\Hierarchy.uex' path='docs/doc[@for="HierarchyNode.HierarchyNode2"]/*' />
        /// <summary>
        /// note that here the directory path needs to end with a backslash...
        /// </summary>
        /// <param name="root"></param>
        /// <param name="type"></param>
        /// <param name="strDirectoryPath"></param>
        public HierarchyNode(Project root, HierarchyNodeType type, string strDirectoryPath)
		{
            Uri uriBase;
            Uri uriNew;
            string relPath;
			if (type == HierarchyNodeType.RefFolder
				|| type == HierarchyNodeType.Folder)
			{
				relPath = strDirectoryPath;
				this.virtualNodeName = strDirectoryPath;
			}
			else
			{
				// the path is an absolute one, need to make it relative to the project for further use
				uriNew = new Uri(strDirectoryPath);
				uriBase = root.BaseURI.Uri;
				relPath = uriBase.MakeRelative(uriNew);
				relPath = relPath.Replace("/", "\\");
			}

			this.projectMgr = root;
            this.nodeType = type;
            // we need to create an dangling node... just for this abstract folder type
			this.itemNode = this.projectMgr.AddFolderNodeToProject(relPath);

			this.hierarchyId = this.projectMgr.ItemIdMap.Add(this);
        }
Esempio n. 4
0
        /// <include file='doc\PropertyPages.uex' path='docs/doc[@for="SettingsPage.SetObjects"]/*' />
        public virtual void SetObjects(uint count, object[] punk) {
            if (count > 0) {
                // check the kind.
                if (punk[0] is NodeProperties) {
                    this.nodes = new NodeProperties[count];
                    System.Array.Copy(punk, 0, this.nodes, 0, (int)count);
                    if (this.nodes != null && this.nodes.Length > 0) {
                        this.project = this.nodes[0].Node.ProjectMgr;
                    }
                } else if (punk[0] is ProjectConfig) {
                    ArrayList configs = new ArrayList();

                    for (int i = 0; i < count; i++) {
                        ProjectConfig config = (ProjectConfig)punk[i];

                        if (this.project == null) this.project = config.ProjectMgr;

                        configs.Add(config);
                    }

                    this.projectConfigs = (ProjectConfig[])configs.ToArray(typeof(ProjectConfig));
                }
            } else {
                this.nodes = null;
                this.project = null;
            }

            if (this.active) UpdateObjects();
        }
Esempio n. 5
0
 /// <include file='doc\PropertyPages.uex' path='docs/doc[@for="ProjectProperties.ProjectProperties"]/*' />
 public ProjectProperties(Project node) : base(node){
   this.project = node;
 }
Esempio n. 6
0
 /// <include file='doc\PropertyPages.uex' path='docs/doc[@for="NodeProperties.NodeProperties"]/*' />
 public NodeProperties(HierarchyNode node){
     this.Node = node;
     project = node.ProjectMgr;
 }
Esempio n. 7
0
 public BuildDependency(Project project){
   this.project = project;
 }
Esempio n. 8
0
 /// <include file='doc\Project.uex' path='docs/doc[@for="Project.CreateNode1"]/*' />
 protected virtual HierarchyNode CreateNode(Project root, HierarchyNodeType type, string direcoryPath){
   return new HierarchyNode(root, type, direcoryPath);
 }
Esempio n. 9
0
    /// <include file='doc\Project.uex' path='docs/doc[@for="Project.CreateNode"]/*' />
    protected virtual HierarchyNode CreateNode(Project root, HierarchyNodeType type, XmlElement projNode){
      if (type == HierarchyNodeType.File){
        HierarchyItemNode hi = new HierarchyItemNode(this, type, projNode);

        if (NodeHasDesigner(projNode)){
          hi.HasDesigner = true;
        }

        return hi;
      }

      return new HierarchyNode(root, type, projNode);
    }
Esempio n. 10
0
 /// <include file='doc\ConfigProvider.uex' path='docs/doc[@for="ConfigProvider.ConfigProvider"]/*' />
 public ConfigProvider(Project manager){
     this.Project = manager;
 }
Esempio n. 11
0
 public TrackDocumentsHelper(Project project) {
   theProject = project;
 }