Ejemplo n.º 1
0
        public void AddEdge()
        {
            string routerOne = mainConsole.ChooseRouter();
            string routerTwo = mainConsole.ChooseRouter();
            Router routOne = null, routTwo = null;

            foreach (var a in MainNetwork.routers)
            {
                if (a.Id == routerOne)
                {
                    routOne = a;
                }
                if (a.Id == routerTwo)
                {
                    routTwo = a;
                }
            }

            if (routOne != null && routTwo != null)
            {
                routOne.AddEdge(routTwo);
            }
        }