コード例 #1
0
        public void Dispose()
        {
            foreach (var child in _children)
            {
                child.Dispose();
            }
            _children.Clear();

            _parent = null;
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public PanelNode(PanelNode parent)
 {
     _parent   = parent;
     _children = new LinkedList <ILayoutNode>();
 }
コード例 #4
0
 public GroupNode(PanelNode parent)
 {
     _parent   = parent;
     _children = new LinkedList <ItemNode>();
 }