Esempio n. 1
0
        public void CalculateOrgTreeSize()
        {
            OrgTreeNode root = PreareOrgTree();

            root.CalculateMaxWidth();
            root.CalculateMaxLevel();

            OutputOrgTreehSizeRecursively(root);
        }
Esempio n. 2
0
 private static void OutputOrgTreeNodeSize(OrgTreeNode node)
 {
     if (node is ITreeNodeSize)
     {
         Console.WriteLine("Name = {0}, MaxWidth = {1}, MaxLevel = {2} ", node.Name, node.MaxWidth, node.MaxLevel);
     }
     else
     {
         Console.WriteLine("Name = {0}, MaxWidth = {1}, MaxLevel = {2} ", node.Name, node.CalculateMaxWidth(), node.CalculateMaxLevel());
     }
 }