public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
 {
     if (propertyValues != null)
     {
         if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
         {
             propertyValues.Icon = KnownMonikers.NuGet.ToProjectSystemType();
         }
     }
 }
 /// <summary>
 /// Calculates new property values for each node in the project tree.
 /// </summary>
 /// <param name="propertyContext">Context information that can be used for the calculation.</param>
 /// <param name="propertyValues">Values calculated so far for the current node by lower priority tree properties providers.</param>
 public void CalculatePropertyValues(
     IProjectTreeCustomizablePropertyContext propertyContext,
     IProjectTreeCustomizablePropertyValues propertyValues)
 {
     // set the icon for the root project node
     if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
     {
         propertyValues.Icon         = NanoFrameworkMonikers.NanoFrameworkProject.ToProjectSystemType();
         propertyValues.ExpandedIcon = NanoFrameworkMonikers.NanoFrameworkProject.ToProjectSystemType();
     }
 }
 /// <summary>
 /// Calculates new property values for each node in the project tree.
 /// </summary>
 /// <param name="propertyContext">Context information that can be used for the calculation.</param>
 /// <param name="propertyValues">Values calculated so far for the current node by lower priority tree properties providers.</param>
 public void CalculatePropertyValues(
     IProjectTreeCustomizablePropertyContext propertyContext,
     IProjectTreeCustomizablePropertyValues propertyValues)
 {
     if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
     {
         propertyValues.Icon = customIconsMonikers.ProjectIconImageMoniker.ToProjectSystemType();
     }
     else if (propertyContext.ItemType != null ? propertyContext.ItemType.Equals(ITEM_TYPE) : false)
     {
         propertyValues.Icon = customIconsMonikers.ItemIconImageMoniker.ToProjectSystemType();
     }
 }
Exemple #4
0
        /// <summary>
        /// Calculates new property values for each node in the project tree.
        /// </summary>
        /// <param name="propertyContext">Context information that can be used for the calculation.</param>
        /// <param name="propertyValues">Values calculated so far for the current node by lower priority tree properties providers.</param>
        public void CalculatePropertyValues(
            IProjectTreeCustomizablePropertyContext propertyContext,
            IProjectTreeCustomizablePropertyValues propertyValues)
        {
            // Only set the icon for the root project node.  We could choose to set different icons for nodes based
            // on various criteria, not just Capabilities, if we wished.
            if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
            {
                propertyValues.Icon = ImageMonikers.ProjectIconImageMoniker.ToProjectSystemType();
            }

            switch (propertyContext.ItemType)
            {
            case "DisassAnn":
                propertyValues.Icon = ImageMonikers.DisassAnnIconImageMoniker.ToProjectSystemType();
                break;

            case "Z80Asm":
                propertyValues.Icon = ImageMonikers.Z80AsmIconImageMoniker.ToProjectSystemType();
                break;

            case "Rom":
                propertyValues.Icon = ImageMonikers.RomIconImageMoniker.ToProjectSystemType();
                break;

            case "Tzx":
                propertyValues.Icon = ImageMonikers.TzxIconImageMoniker.ToProjectSystemType();
                break;

            case "Tap":
                propertyValues.Icon = ImageMonikers.TapIconImageMoniker.ToProjectSystemType();
                break;

            case "VmState":
                propertyValues.Icon = ImageMonikers.VmStateIconImageMoniker.ToProjectSystemType();
                break;

            case "SpConf":
                propertyValues.Icon = ImageMonikers.SpConfIconImageMoniker.ToProjectSystemType();
                break;

            case "Z80Test":
                propertyValues.Icon = ImageMonikers.Z80TestIconImageMoniker.ToProjectSystemType();
                break;

            case "Vfdd":
                propertyValues.Icon = ImageMonikers.FloppyIconImageMoniker.ToProjectSystemType();
                break;
            }
        }
 public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext,
                                     IProjectTreeCustomizablePropertyValues propertyValues) {
     if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot)) {
         propertyValues.Icon = ProjectIconProvider.ProjectNodeImage.ToProjectSystemType();
     } else if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.FileOnDisk)) {
         string ext = Path.GetExtension(propertyContext.ItemName).ToLowerInvariant();
         if (ext == ".r") {
             propertyValues.Icon = ProjectIconProvider.RFileNodeImage.ToProjectSystemType();
         } else if (ext == ".rdata" || ext == ".rhistory") {
             propertyValues.Icon = ProjectIconProvider.RDataFileNodeImage.ToProjectSystemType();
         } else if (ext == ".md" || ext == ".rmd") {
             propertyValues.Icon = KnownMonikers.MarkdownFile.ToProjectSystemType();
         } else if (propertyContext.ItemName.EndsWithIgnoreCase(SProcFileExtensions.QueryFileExtension)) {
             propertyValues.Icon = KnownMonikers.DatabaseColumn.ToProjectSystemType();
         } else if (propertyContext.ItemName.EndsWithIgnoreCase(SProcFileExtensions.SProcFileExtension)) {
             propertyValues.Icon = KnownMonikers.DatabaseStoredProcedures.ToProjectSystemType();
         }
     }
 }
Exemple #6
0
 public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
 {
     // Package content items always come in as linked items, so to reduce
     // the number of items we look at, we limit ourselves to them
     if (propertyValues.Flags.Contains(ProjectTreeFlags.LinkedItem) &&
         propertyContext.Metadata != null &&
         propertyContext.Metadata.TryGetValue(None.NuGetPackageIdProperty, out string packageId) && packageId.Length > 0)
     {
         propertyValues.Flags |= ProjectTreeFlags.UserReadOnly;
     }
 }
        public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
        {
            if (propertyValues.Flags.Contains(ProjectTreeFlags.ProjectRoot))
            {
                propertyValues.Icon = XSharpImagesMonikers.ProjectImage.ToProjectSystemType();
            }
            if (!propertyValues.Flags.Contains(ProjectTreeFlags.Common.Folder))
            {
                if (!propertyValues.Flags.Contains(ProjectTreeFlags.Common.SourceFile | ProjectTreeFlags.Common.FileSystemEntity))
                {
                    return;
                }

                propertyValues.Icon = GetIconForItem(propertyContext.ItemName);
            }
        }
Exemple #8
0
 public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
 {
     if (propertyValues != null)
     {
         if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
         {
             // Set the icon
             // propertyValues.Icon = KnownMonikers.NuGet.ToProjectSystemType();
         }
     }
 }
Exemple #9
0
 public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
 {
     if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
     {
         propertyValues.Icon = ProjectTreeIcons.GetProjectIcon();
     }
     else if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.FileOnDisk))
     {
         string name = propertyContext.ItemName.ToLowerInvariant();
         ProjectImageMoniker icon = ProjectTreeIcons.GetChildIcon(name);
         if (icon != null)
         {
             propertyValues.Icon = icon;
         }
     }
 }
        public void CalculatePropertyValues(IProjectTreeCustomizablePropertyContext propertyContext, IProjectTreeCustomizablePropertyValues propertyValues)
        {
            Requires.NotNull(propertyContext, nameof(propertyContext));
            Requires.NotNull(propertyValues, nameof(propertyValues));

            if (propertyValues.Flags.Contains(ProjectTreeFlags.Common.ProjectRoot))
            {
                ProjectImageMoniker icon = _imageProvider.GetProjectImage(ProjectImageKey.ProjectRoot);
                if (icon == null)
                {
                    return;
                }

                propertyValues.Icon = icon;
            }
        }