예제 #1
0
 public void printOwnHierarchy(ConsoleWriter cw)
 {
     printSiblings(cw);
     cw.indent();
     printUpperHierarchy(cw);
 }
예제 #2
0
        public void printUpperHierarchy(ConsoleWriter cw)
        {
            int indentation = cw.Indentation;

                if (parentOne != null)
                {
                    cw.writeLine(parentOne.Info);
                    cw.indent();
                    parentOne.printUpperHierarchy(cw);
                }

                if (parentTwo != null)
                {
                    cw.Indentation = indentation;

                    cw.writeLine(parentTwo.Info);
                    cw.indent();
                    parentTwo.printUpperHierarchy(cw);
                }
        }