Beispiel #1
0
        public override void Remove(FileDataNode node)
        {
            RmdNode rmdNode = node as RmdNode;

            if (rmdNode != null)
            {
                _Element.Elements.Remove(rmdNode.Element);
            }

            base.Remove(node);
        }
Beispiel #2
0
        public override void Insert(int index, FileDataNode node)
        {
            RmdNode rmdNode = node as RmdNode;

            if (rmdNode == null)
            {
                throw new Exception("Rmd container nodes can only contain other Rmd nodes.");
            }

            _ContainerElement.Elements.Insert(index, rmdNode.Element);
            base.Insert(index, node);
        }
Beispiel #3
0
        public TextureNode(ContainerElement elem)
            : base(elem)
        {
            Text = GetTextureName();

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

            RmdNode oldNode = RmdNodes[3];

            _TextureImageNode = new TextureImageNode(oldNode.Element as ContainerElement);
            Nodes.Insert(3, _TextureImageNode);
            Nodes.Remove(oldNode);

            Nodes[0].Text = "Usage Data";
            Nodes[1].Text = "Name Data";
            Nodes[2].Text = "Unknown";
            Nodes[4].Text = "Ex Data";

            _SurrogateObject = new SurrogateDataObject(this);
        }
Beispiel #4
0
 public SurrogateDataObject(RmdNode owner)
     : base(owner)
 {
     _RmdNode = owner;
 }