private void ApplySpecialFolderProperties(IProjectTreeCustomizablePropertyValues propertyValues)
        {
            propertyValues.Flags = propertyValues.Flags.Union(FolderFlags);

            ProjectImageMoniker?icon         = _imageProvider.GetProjectImage(FolderImageKey);
            ProjectImageMoniker?expandedIcon = _imageProvider.GetProjectImage(ExpandedFolderImageKey);

            // Avoid overwriting icon if the image provider didn't provide one
            propertyValues.Icon         = icon ?? propertyValues.Icon;
            propertyValues.ExpandedIcon = expandedIcon ?? propertyValues.ExpandedIcon;
        }
예제 #2
0
        private void SetImage(IProjectTreeCustomizablePropertyValues propertyValues, string imageKey)
        {
            ProjectImageMoniker icon = _imageProvider.GetProjectImage(imageKey);

            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;
            }
        }