예제 #1
0
        public void LoadInfo()
        {
            Planets = new Dictionary <string, Planet>();
            Routes  = new Dictionary <string, Route>();

            using (StreamReader sr = new StreamReader(Path))
            {
                Dictionary <string, Dictionary <string, string> > _Planets, _Routes;

                _Routes  = XML.obtenerDadesXML(sr, "hyperspaceRoutes", "Route", "nameRoute");
                _Planets = XML.obtenerDadesXML(sr, "planets", "planet", "name");
                _Planets = Dades.dadesTotalsPlanetes(_Planets);

                SetCoords(_Planets);
                SetPlanets(_Planets);
                SetRoutes(_Routes);
            }

            SetClosestPlanets(3);
            SetDisponibleRoutes();
        }