public void b1_Click(object sender, EventArgs e) { int[] T = Konwertuj(tb1.Text); Drzewo tree1 = new Drzewo(T[0]); for (int i = 1; i < T.Length; i++) { tree1.PushBST(T[i], tree1.korzen); } Show1(tree1); tree1.ShowPRE(tree1.korzen); tree1.ShowIN(tree1.korzen); tree1.ShowPOST(tree1.korzen); l1.Text = String.Join(" ", tree1.Pre); l2.Text = String.Join(" ", tree1.In); l3.Text = String.Join(" ", tree1.Post); }
void Show1(Drzewo tree) { ShowNode(tree.korzen, treeView1.Nodes.Add("Korzen: ")); }