Example #1
0
        private void TestLoad02()
        {
            NodeFunctions NodeFct = new NodeFunctions();

            TreeNode[] MyRootNode = new TreeNode[20];
            NodeFunctions.NavObjectStruct myData = new NodeFunctions.NavObjectStruct();

            NodeFct.createRootNodesArr(MyRootNode, ref myData);
            foreach (TreeNode MyNode in MyRootNode)
            {
                if (MyNode != null)
                {
                    treeView1.Nodes.Add(MyNode);
                }
            }
        }
Example #2
0
        private void TestLoad01()
        {
            NodeFunctions NodeFct         = new NodeFunctions();
            TreeNode      myTableTreeNode = new TreeNode();
            TreeNode      myFormTreeNode  = new TreeNode();
            TreeNode      myTreeNode      = new TreeNode();

            NodeFunctions.NavObjectStruct myData = new NodeFunctions.NavObjectStruct();

            //Tables
            //NodeFct.addDataToStruct(ref myData, "Table", 0, "", "", 1, 100);
            NodeFct.addDataToStruct(ref myData, "Table", 0, "", "", 0, 0);
            NodeFct.createNewNode(ref myTableTreeNode, "Table", myData);

            NodeFct.addDataToStruct(ref myData, "Table", 1, "Min Tabel 1", "filnavn1", 2, 10);
            NodeFct.addNewTreeNode(ref myTableTreeNode, ref myTreeNode, "Table 1", myData);

            NodeFct.addDataToStruct(ref myData, "Table", 2, "Min Tabel 2", "filnavn2", 11, 20);
            NodeFct.addNewTreeNode(ref myTableTreeNode, ref myTreeNode, "Table 2", myData);

            NodeFct.addDataToStruct(ref myData, "Table", 10, "Min Tabel 10", "filnavn10", 2, 10);
            NodeFct.addNewTreeNode(ref myTableTreeNode, ref myTreeNode, "Table 1", myData);

            treeView1.Nodes.Add(myTableTreeNode);

            //Forms
            //NodeFct.addDataToStruct(ref myData, "Form", 0, "", "", 1, 100);
            NodeFct.addDataToStruct(ref myData, "Form", 0, "", "", 0, 0);
            NodeFct.createNewNode(ref myFormTreeNode, "Form", myData);

            NodeFct.addDataToStruct(ref myData, "Form", 1, "Min Form 1", "filnavn3", 20, 30);
            NodeFct.addNewTreeNode(ref myFormTreeNode, ref myTreeNode, "Form 1", myData);

            NodeFct.addDataToStruct(ref myData, "Form", 2, "Min Form 2", "filnavn4", 31, 40);
            NodeFct.addNewTreeNode(ref myFormTreeNode, ref myTreeNode, "Form 2", myData);

            NodeFct.addDataToStruct(ref myData, "Form", 3, "Min Form 3", "filnavn5", 41, 50);
            NodeFct.addNewTreeNode(ref myFormTreeNode, ref myTreeNode, "Form 3", myData);

            treeView1.Nodes.Add(myFormTreeNode);

            //treeView1.Sort();
        }