Esempio n. 1
0
        public HTXMLNode(XElement element)
        {
            this.element  = element;
            this.children = new Dictionary <string, HTXMLNode>();

            if (this.GetColor() != Colors.Black)
            {
                this.exCount += 1;
            }
            if (!IsLeaf())
            {
                foreach (var e in element.Elements("entry"))
                {
                    HTXMLNode child = new HTXMLNode(e);

                    this.exCount += child.GetExtensionCount();
                    AddChild(child);
                    //Debug.WriteLine("entry:" + e.Attribute("name").Value);
                }
            }
            Debug.WriteLine("entry:" + this.element.Attribute("name").Value + "exCount:" + this.GetExtensionCount());
        }
Esempio n. 2
0
        public HTXMLNode(XElement element)
        {
            this.element = element;
            this.children = new Dictionary<string, HTXMLNode>();

            if (this.GetColor() != Colors.Black)
            {
                this.exCount += 1;
            }
            if (!IsLeaf())
            {

                foreach (var e in element.Elements("entry"))
                {
                    HTXMLNode child = new HTXMLNode(e);

                    this.exCount += child.GetExtensionCount();
                    AddChild(child);
                    //Debug.WriteLine("entry:" + e.Attribute("name").Value);
                }
            }
            Debug.WriteLine("entry:" + this.element.Attribute("name").Value + "exCount:" + this.GetExtensionCount());
        }
Esempio n. 3
0
        public MainPage()
        {
            InitializeComponent();

            XDocument xdoc = XDocument.Load("resources/result.xml");

            root = new HTXMLNode(xdoc.Element("xbrldata"));

            hypertree = new HyperTree(root);

            //TODO:是否使用静态方法?
            Graphic graphic = new Graphic();
            //graphic.Canvas = this.LayoutRoot;

            SilverlightHTView view = hypertree.GetSLView();
            graphic.Canvas = view.LayoutRoot;
            view.graphic = graphic;
            view.Repaint();

            this.Width = 500;
            this.Height = 500;

            this.LayoutRoot.Children.Add(view);
        }
Esempio n. 4
0
 private void AddChild(HTXMLNode child)
 {
     this.children.Add(child.GetName(), child);
 }
Esempio n. 5
0
 private void AddChild(HTXMLNode child)
 {
     this.children.Add(child.GetName(), child);
 }