Exemple #1
0
 public ComponentInfo(PipelineComponentInfo componentInfo)
 {
     this.componentType = componentInfo.ComponentType;
     this.id            = componentInfo.ID;
     this.name          = componentInfo.Name;
     this.creationName  = componentInfo.CreationName;
 }
Exemple #2
0
 public ComponentInfo(PipelineComponentInfo componentInfo)
 {
     this.componentType = componentInfo.ComponentType;
     this.id = componentInfo.ID;
     this.name = componentInfo.Name;
     this.creationName = componentInfo.CreationName;
 }
        public ComponentInfo(PipelineComponentInfo componentInfo)
        {
            this.componentType = componentInfo.ComponentType;
            this.ID            = componentInfo.ID;
            this.Name          = componentInfo.Name;
            this.CreationName  = componentInfo.CreationName;

            Assembly assembly = GetComponentAssembly(componentInfo);

            if (assembly != null)
            {
                Stream iconStream = assembly.GetManifestResourceStream(componentInfo.IconResource);
                if (iconStream != null)
                {
                    this.Icon = new Icon(iconStream, new Size(16, 16));
                }
            }
            else
            {
                int index = 0;
                Int32.TryParse(componentInfo.IconResource, out index);
                this.Icon = ExtractIcon(componentInfo.IconFile, index, false);
            }

            // Ensure we always have an icon
            if (this.Icon == null)
            {
                this.Icon = BIDSHelper.Resources.Common.NoIcon;
            }
        }