예제 #1
0
 public SaveConfig(string _savePath, Scene _scene)
 {
     sceneSave           = new SceneSave();
     scene               = _scene;
     savePath            = _savePath;
     sceneSave.osmPath   = _scene.OSMPath;
     sceneSave.continent = _scene.continent;
     sceneSave.provider  = _scene.provider;
 }
예제 #2
0
        public LoadConfig(string saveFilePath)
        {
            var serializer = new XmlSerializer(typeof(SceneSave));

            if (File.Exists(saveFilePath))
            {
                var encoding = Encoding.GetEncoding("UTF-8");
                using (var stream = new StreamReader(saveFilePath, encoding))
                {
                    sceneSave = serializer.Deserialize(stream) as SceneSave;
                }
            }
        }
        public LoadConfig(string saveFilePath)
        {
            var serializer = new XmlSerializer(typeof(SceneSave));

            if (File.Exists(saveFilePath))
            {
                var encoding = Encoding.GetEncoding("UTF-8");
                using (var stream = new StreamReader(saveFilePath, encoding))
                {
                   sceneSave = serializer.Deserialize(stream) as SceneSave;
                }
            }
        }
 public SaveConfig(string _savePath,Scene _scene)
 {
     sceneSave = new SceneSave();
     scene = _scene;
     savePath = _savePath;
     sceneSave.osmPath = _scene.OSMPath;
     sceneSave.continent = _scene.continent;
     sceneSave.provider = _scene.provider;
 }