24 lines
649 B
C#
24 lines
649 B
C#
|
|
using System.Collections.Generic;
|
|
using System.Xml.Linq;
|
|
|
|
namespace Cosmobox.Def
|
|
{
|
|
public partial class DrawNode : Define
|
|
{
|
|
public string NodeName { get; set; }
|
|
public List<DrawNode> Children { get; set; } = [];
|
|
public override bool Init(XElement xmlDef)
|
|
{
|
|
base.Init(xmlDef);
|
|
NodeName = xmlDef.Element("NodeName")?.Value;
|
|
foreach (var childNode in xmlDef.Elements("DrawNode"))
|
|
{
|
|
DrawNode child = new DrawNode();
|
|
child.Init(childNode);
|
|
Children.Add(child);
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
} |