public void Deserialize(DockManager managerToAttach, System.Xml.XmlNode node, GetContentFromTypeString getObjectHandler)
        {
            _dock = (Dock)Enum.Parse(typeof(Dock), node.Attributes["Dock"].Value);

            if (node.ChildNodes[0].Name == "DockablePane")
            {
                DockablePane pane = new DockablePane(managerToAttach);
                pane.Deserialize(managerToAttach, node.ChildNodes[0], getObjectHandler);
                _attachedPane = pane;
            }
            else if (node.ChildNodes[0].Name == "DocumentsPane")
            {
                DocumentsPane pane = managerToAttach.GetDocumentsPane();
                pane.Deserialize(managerToAttach, node.ChildNodes[0], getObjectHandler);
                _attachedPane = pane;
            }
            else
            {
                _firstChildGroup = new DockablePaneGroup();
                _firstChildGroup._parentGroup = this;
                _firstChildGroup.Deserialize(managerToAttach, node.ChildNodes[0].ChildNodes[0], getObjectHandler);

                _secondChildGroup = new DockablePaneGroup();
                _secondChildGroup._parentGroup = this;
                _secondChildGroup.Deserialize(managerToAttach, node.ChildNodes[0].ChildNodes[1], getObjectHandler);
            }
        }
Exemple #2
0
 public void SetRoot(DocumentsPane pane)
 {
     if (_rootPane == null)
     {
         _rootPane = pane;
     }
 }
Exemple #3
0
        DocumentsPane FindDocumentsPane(DockablePaneGroup group)
        {
            if (group == null)
            {
                return(null);
            }

            if (group.AttachedPane is DocumentsPane)
            {
                return(group.AttachedPane as DocumentsPane);
            }
            else
            {
                DocumentsPane docsPane = FindDocumentsPane(group.FirstChildGroup);
                if (docsPane != null)
                {
                    return(docsPane);
                }

                docsPane = FindDocumentsPane(group.SecondChildGroup);
                if (docsPane != null)
                {
                    return(docsPane);
                }
            }

            return(null);
        }
Exemple #4
0
 public void SetRoot(DocumentsPane pane)
 {
     if (_rootPane == null)
         _rootPane = pane;
 }
Exemple #5
0
 internal void AttachDockManager(DockManager dockManager)
 {
     _docsPane  = new DocumentsPane(dockManager);
     _rootGroup = new DockablePaneGroup(DocumentsPane);
     ArrangeLayout();
 }
Exemple #6
0
 internal void AttachDockManager(DockManager dockManager)
 {
     _docsPane = new DocumentsPane(dockManager);
     _rootGroup = new DockablePaneGroup(DocumentsPane);
     ArrangeLayout();
 }