public void postorder(Node s) { if (s != null) { postorder(s.Left); postorder(s.Right); // return node info #region return node info // cout << s.text // MessageBox.Show(s.Text); #endregion } }
// Leveller public void preorder(Node s) { if (s != null) { // return node info #region return node info // cout << s.text s.Order = order; order++; #endregion preorder(s.Left); preorder(s.Right); } }
// none Leveller public void preorder(Node s, string Arrow, int rootLevel) { if (s != null) { // return node info #region return node info // cout << s.text NodeInfo preorderNodeInfo = new NodeInfo(); preorderNodeInfo.StartLevel = rootLevel; preorderNodeInfo.EndLevel = s.Order; preorderNodeInfo.Text = s.Text; preorderNodeInfo.Arrow = Arrow; arrNodeInfo.Add(preorderNodeInfo); #endregion preorder(s.Left, "Left", s.Order); preorder(s.Right, "Right", s.Order); } }