Ejemplo n.º 1
0
        private void visualizeLookup(FibTree.Lookup lookup, TreeNodeCollection treeviewNodeCollection)
        {
            foreach (TreeNode node in treeviewNodeCollection)
            {
                if (lookup == null)
                {
                    node.BackColor = Color.White;
                }
                else if (!lookup.Nodes.Contains(node.Tag))
                {
                    node.BackColor = Color.White;
                }
                else if (lookup.SolutionNode == node.Tag)
                {
                    node.BackColor = Color.LightGreen;
                }
                else if (((FibTreeNode)node.Tag).Label != null)
                {
                    node.BackColor = Color.LightPink;
                }
                else
                {
                    node.BackColor = Color.LightGray;
                }

                visualizeLookup(lookup, node.Nodes);
            }
        }
Ejemplo n.º 2
0
 public void DoLookup()
 {
     LookupOriginal   = mFibTreeOriginal.DoLookup(IP);
     LookupNormalized = mFibTreeNormalized.DoLookup(IP);
     LookupCompressed = mFibTreeCompressed.DoLookup(IP);
     EdgesOriginal    = LookupOriginal.EdgeCount;
     EdgesNormalized  = LookupNormalized.EdgeCount;
     EdgesCompressed  = LookupCompressed.EdgeCount;
     NextHop          = LookupOriginal.NextHop?.NextHop;
     PropertyChanged?.Invoke(nameof(EdgesOriginal));
     PropertyChanged?.Invoke(nameof(EdgesNormalized));
     PropertyChanged?.Invoke(nameof(EdgesCompressed));
     PropertyChanged?.Invoke(nameof(NextHop));
 }