public ThumbnailKinFinder(uint parentType, THUM.THUMSize size, bool isPNGInstance)
     : base(size.ToString())
 {
     this.isPNG    = isPNGInstance;
     this.thumType = THUM.getThumbType(parentType, size, isPNGInstance);
     this.isCWAL   = parentType == 0x515CA4CD;
     this.CompleteKinName();
 }
 public ThumbnailKinFinder(IResourceKey parentKey, IResource parent, THUM.THUMSize size)
     : base(size.ToString())
 {
     this.isPNG = false;
     if (THUM.CType(parentKey) == CatalogType.ModularResource)
     {
         this.thumType = 0;
     }
     else if (THUM.CType(parentKey) == CatalogType.CAS_Part)
     {
         this.thumType = THUM.getThumbType(parentKey.ResourceType, size, false);
     }
     else
     {
         this.thumInstance = (parent != null) ?
                             (ulong)parent["CommonBlock.PngInstance"].Value : 0;
         this.isPNG    = this.thumInstance != 0;
         this.thumType = THUM.getThumbType(parentKey.ResourceType, size, this.isPNG);
     }
     this.CompleteKinName();
 }
        public override List <SpecificResource> FindKindredResources(IResourceKey parentKey)
        {
            if (this.thumType == 0)
            {
                return(null);
            }
            if (this.isCWAL)
            {
                return(ResourceGraph.SlurpKindredResources(parentKey, this));
            }

            List <SpecificResource> results = new List <SpecificResource>();
            SpecificResource        sr      = THUM.getItem(this.isPNG,
                                                           this.thumInstance != 0 ? this.thumInstance : parentKey.Instance,
                                                           this.thumType);

            if (sr != null && sr.Resource != null)
            {
                results.Add(sr);
            }
            return(results);
        }