Esempio n. 1
0
        protected override void OnHtmlHostCreated()
        {
            var treeView = new LayoutFarm.HtmlWidgets.TreeView(300, 400);

            treeView.SetLocation(10, 10);
            //create treenodes
            for (int i = 0; i < 10; ++i)
            {
                var childLevel0 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                childLevel0.NodeText = "node" + i;
                for (int n = 0; n < 4; ++n)
                {
                    var childLevel1 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                    childLevel1.NodeText = "node" + i + "." + n;
                    childLevel0.AddChildNode(childLevel1);
                    for (int m = 0; m < 5; m++)
                    {
                        var childLevel2 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                        childLevel2.NodeText = "node" + i + "." + n + "." + m;
                        childLevel1.AddChildNode(childLevel2);
                    }
                }


                treeView.AddItem(childLevel0);
            }

            AddToViewport(treeView);
        }
Esempio n. 2
0
        protected override void OnHtmlHostCreated()
        {
            var treeView = new LayoutFarm.HtmlWidgets.TreeView(300, 400);
            treeView.SetLocation(10, 10);
            //create treenodes
            for (int i = 0; i < 10; ++i)
            {
                var childLevel0 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                childLevel0.NodeText = "node" + i;
                for (int n = 0; n < 4; ++n)
                {
                    var childLevel1 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                    childLevel1.NodeText = "node" + i + "." + n;
                    childLevel0.AddChildNode(childLevel1);
                    for (int m = 0; m < 5; m++)
                    {
                        var childLevel2 = new LayoutFarm.HtmlWidgets.TreeNode(400, 40);
                        childLevel2.NodeText = "node" + i + "." + n + "." + m;
                        childLevel1.AddChildNode(childLevel2);
                    }
                }


                treeView.AddItem(childLevel0);
            }

            AddToViewport(treeView);
        }