Ejemplo n.º 1
0
 public SurrogateDataObject(TextureImageNode owner)
     : base(owner)
 {
     _TextureImageNode = owner;
     _ImageInfoNode    = owner.ImageInfoNode;
     _ImageDataNode    = owner.ImageDataNode;
 }
Ejemplo n.º 2
0
        public TextureImageNode(ContainerElement elem)
            : base(elem)
        {
            Text = "Texture Image";

            if (!elem.Elements.Select(x => x.Type).SequenceEqual(new uint[] { 0x1, 0x1 }))
            {
                throw new ArgumentException();
            }

            DataNode oldInfoNode = Nodes[0] as DataNode;

            _ImageInfoNode = new ImageInfoNode(oldInfoNode.DataElement);
            DataNode oldImageNode = Nodes[1] as DataNode;

            _ImageDataNode = new ImageDataNode(oldImageNode.DataElement, _ImageInfoNode.DataElement);

            Nodes.Insert(0, _ImageInfoNode);
            Nodes.Remove(oldInfoNode);
            Nodes.Insert(1, _ImageDataNode);
            Nodes.Remove(oldImageNode);

            _SurrogateObject = new SurrogateDataObject(this);
        }
Ejemplo n.º 3
0
 public SurrogateDataObject(ImageInfoNode owner)
     : base(owner)
 {
     _ImageInfoNode = owner;
 }