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); } }
public void SetRoot(DocumentsPane pane) { if (_rootPane == null) { _rootPane = pane; } }
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); }
public void SetRoot(DocumentsPane pane) { if (_rootPane == null) _rootPane = pane; }
internal void AttachDockManager(DockManager dockManager) { _docsPane = new DocumentsPane(dockManager); _rootGroup = new DockablePaneGroup(DocumentsPane); ArrangeLayout(); }