//=====================================================================
 /// <summary>
 /// Internal Constructor
 /// </summary>
 /// <param name="element">The project element</param>
 internal ProjectReferenceItem(ProjectElement element)
     : base(element)
 {
     projectPath = new FilePath(base.ProjectElement.Include,
         base.ProjectElement.Project);
     projectPath.PersistablePathChanging += new EventHandler(
         projectPath_PersistablePathChanging);
     this.GetProjectMetadata(false);
     base.ProjectElement.Include = projectPath.PersistablePath;
 }
 //=====================================================================
 /// <summary>
 /// Internal Constructor
 /// </summary>
 /// <param name="element">The project element</param>
 internal ReferenceItem(ProjectElement element)
     : base(element)
 {
     if(base.ProjectElement.HasMetadata(ProjectElement.HintPath))
     {
         hintPath = new FilePath(base.ProjectElement.GetMetadata(
             ProjectElement.HintPath), base.ProjectElement.Project);
         hintPath.PersistablePathChanging += new EventHandler(
             hintPath_PersistablePathChanging);
     }
 }
Beispiel #3
0
        //=====================================================================
        /// <summary>
        /// Internal Constructor
        /// </summary>
        /// <param name="element">The project element</param>
        internal FileItem(ProjectElement element)
            : base(element)
        {
            buildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
                base.ProjectElement.ItemName, true);
            includePath = new FilePath(base.ProjectElement.Include,
                base.ProjectElement.Project);
            includePath.PersistablePathChanging += new EventHandler(
                includePath_PersistablePathChanging);
            base.ProjectElement.Include = includePath.PersistablePath;

            if(base.ProjectElement.HasMetadata(ProjectElement.LinkPath))
            {
                linkPath = new FilePath(base.ProjectElement.GetMetadata(
                    ProjectElement.LinkPath), base.ProjectElement.Project);
                linkPath.PersistablePathChanging += new EventHandler(
                    linkPath_PersistablePathChanging);
            }

            if(base.ProjectElement.HasMetadata(ProjectElement.ImageId))
                imageId = base.ProjectElement.GetMetadata(
                    ProjectElement.ImageId);

            if(base.ProjectElement.HasMetadata(ProjectElement.AlternateText))
                altText = base.ProjectElement.GetMetadata(
                    ProjectElement.AlternateText);

            if(base.ProjectElement.HasMetadata(ProjectElement.CopyToMedia))
                if(!Boolean.TryParse(ProjectElement.GetMetadata(
                  ProjectElement.CopyToMedia), out copyToMedia))
                    copyToMedia = false;

            if(base.ProjectElement.HasMetadata(ProjectElement.ExcludeFromToc))
                if(!Boolean.TryParse(ProjectElement.GetMetadata(
                  ProjectElement.ExcludeFromToc), out excludeFromToc))
                    excludeFromToc = false;

            if(base.ProjectElement.HasMetadata(ProjectElement.SortOrder))
                if(!Int32.TryParse(ProjectElement.GetMetadata(
                  ProjectElement.SortOrder), out sortOrder))
                    sortOrder = 0;
        }
 //=====================================================================
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="element">The project element associated with the
 /// instance</param>
 protected BaseBuildItem(ProjectElement element)
 {
     projElement = element;
 }
Beispiel #5
0
        //=====================================================================

        /// <summary>
        /// Internal Constructor
        /// </summary>
        /// <param name="element">The project element</param>
        internal COMReferenceItem(ProjectElement element) : base(element)
        {
        }
Beispiel #6
0
        //=====================================================================

        /// <summary>
        /// Internal Constructor
        /// </summary>
        /// <param name="element">The project element</param>
        internal COMReferenceItem(ProjectElement element) : base(element)
        {
        }
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="element">The project element associated with the
        /// instance</param>
        protected BaseBuildItem(ProjectElement element)
        {
            projElement = element;
        }