예제 #1
0
 public SurrogateDataObject(TextureImageNode owner)
     : base(owner)
 {
     _TextureImageNode = owner;
     _ImageInfoNode    = owner.ImageInfoNode;
     _ImageDataNode    = owner.ImageDataNode;
 }
예제 #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);
        }
예제 #3
0
 public SurrogateDataObject(ImageDataNode owner)
     : base(owner)
 {
     _ImageDataNode = owner;
 }