Beispiel #1
0
        void UpdateTOCNodeList()
        {
            if (TOCNodeList == null)
            {
                return;
            }

            if (TOCNodeList.Count > 0)
            {
                var parentNode = TOCNodeList [0].ParentNode;

                while (parentNode != null)
                {
                    if (parentNode.NodeLevel == 0)
                    {
                        break;
                    }
                    TOCNodeList.Insert(0, parentNode);
                    parentNode = TOCNodeList [0].ParentNode;
                }
            }

            var rootNode = new TOCNode();

            rootNode.Title     = "Table of Contents";
            rootNode.NodeLevel = 0;
            TOCNodeList.Insert(0, rootNode);
        }
        void UpdateTOCNodeListAndRefreshTableView()
        {
            if (TOCNodeList != null && TOCNodeList.Count > 0)
            {
                var parentNode = TOCNodeList [0].ParentNode;
                while (parentNode != null)
                {
                    TOCNodeList.Insert(0, parentNode);
                    parentNode = TOCNodeList [0].ParentNode;
                }

                var rootNode = new TOCNode();
                rootNode.Title     = "Table of Contents";
                rootNode.NodeLevel = 0;
                TOCNodeList.Insert(0, rootNode);
            }
            else
            {
            }

            PanelController.RefreshTOCViewData();
        }