public void ProcessRequest() { BinaryTree tree = new BinaryTree(); tree.Root = new Node(null, null, "E()"); tree.Root = E(); if (!error) DrawTree(tree); }
private void DrawTree(BinaryTree BTS) { shapeContainerTree = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); LineShapeArrow = new Microsoft.VisualBasic.PowerPacks.LineShape[numArrow]; OvalShapeNode = new Microsoft.VisualBasic.PowerPacks.OvalShape[NumNode]; LabelIndoor = new Label[NumNode]; Node_in_Level = new Point[numNode]; // // shapeContainerTree // this.shapeContainerTree.Location = new System.Drawing.Point(0, 0); this.shapeContainerTree.Margin = new System.Windows.Forms.Padding(0); this.shapeContainerTree.Size = new System.Drawing.Size(3000, 5000); this.shapeContainerTree.TabIndex = 0; this.shapeContainerTree.TabStop = false; this.Controls.Add(shapeContainerTree); // Node_in_Level[0] = new Point(300, 20); nowLocation = Node_in_Level[0]; BTS.preorder(BTS.Root); // First set Order Data BTS.preorder(BTS.Root, "Root", -1); preorderDrawTree(BTS.arrNodeInfo); }