public void Dispose() { foreach (var child in _children) { child.Dispose(); } _children.Clear(); _parent = null; }
public void Load(XElement ele) { _isDocument = bool.Parse(ele.Attribute("IsDocument").Value); _side = (DockSide)System.Enum.Parse(typeof(DockSide), ele.Attribute("Side").Value); _direction = (Direction)System.Enum.Parse(typeof(Direction), ele.Attribute("Direction").Value); foreach (var item in ele.Elements()) { var node = default(ILayoutNode); if (item.Name == "Panel") { node = new PanelNode(this); } else { node = new GroupNode(this); } node.Load(item); _children.AddLast(node); } }
public PanelNode(PanelNode parent) { _parent = parent; _children = new LinkedList <ILayoutNode>(); }
public GroupNode(PanelNode parent) { _parent = parent; _children = new LinkedList <ItemNode>(); }