コード例 #1
0
        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);
            }
        }
コード例 #2
0
ファイル: DockingGrid.cs プロジェクト: Bia5310/Spectrometer
 public void SetRoot(DocumentsPane pane)
 {
     if (_rootPane == null)
     {
         _rootPane = pane;
     }
 }
コード例 #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);
        }
コード例 #4
0
ファイル: DockingGrid.cs プロジェクト: truonghinh/TnX
 public void SetRoot(DocumentsPane pane)
 {
     if (_rootPane == null)
         _rootPane = pane;
 }
コード例 #5
0
 internal void AttachDockManager(DockManager dockManager)
 {
     _docsPane  = new DocumentsPane(dockManager);
     _rootGroup = new DockablePaneGroup(DocumentsPane);
     ArrangeLayout();
 }
コード例 #6
0
ファイル: DockingGrid.xaml.cs プロジェクト: truonghinh/TnX
 internal void AttachDockManager(DockManager dockManager)
 {
     _docsPane = new DocumentsPane(dockManager);
     _rootGroup = new DockablePaneGroup(DocumentsPane);
     ArrangeLayout();
 }