예제 #1
0
        public MapLearner(SaveGame saveGame)
        {
            xmlServiceClient = XmlServiceClient.Instance;

            index  = saveGame.getIndexOfCurrentState();
            Region = MapLearnerRegionHelper.convertStringToRegion(saveGame.Region);
            States = saveGame.States;
        }
예제 #2
0
        private Dictionary <MapLearnerRegion, string> getFileLocationsDictionary()
        {
            Dictionary <MapLearnerRegion, string> flieLocationsDictionary = new Dictionary <MapLearnerRegion, string>();

            XPathDocument     fileLocaitonsDocument = getXPathDocument(fileLocationsPath);
            XPathNavigator    navigator             = fileLocaitonsDocument.CreateNavigator();
            XPathNodeIterator iterator = navigator.Select("/fileLocations/fileLocation");

            foreach (XPathNavigator value in iterator)
            {
                string           strCurrentType = value.SelectSingleNode(navigator.Compile("type")).Value;
                MapLearnerRegion type           = MapLearnerRegionHelper.convertStringToRegion(strCurrentType);

                string fileLocation = value.SelectSingleNode(navigator.Compile("filePath")).Value;

                flieLocationsDictionary.Add(type, fileLocation);
            }

            return(flieLocationsDictionary);
        }