ConvertOldFileFormats( string path ) { Level oldLevel=Level.FromFile( path ) ; XElement d = XElement.Load( path ) ; var level = new LevelEditor { Name = oldLevel.Name, } ; populateEditorRelatedStuff( level, d ) ; convertCustomProperties( oldLevel.CustomProperties, level.CustomProperties ) ; level.Layers.AddRange( oldLevel.Layers.Select( copyLayer ) ) ; _path = Path.GetTempFileName( ) ; level.SaveAsXmlToDisk( _path ); }
ConvertOldFileFormats(string path) { Level oldLevel = Level.FromFile(path); XElement d = XElement.Load(path); var level = new LevelEditor { Name = oldLevel.Name, }; populateEditorRelatedStuff(level, d); convertCustomProperties(oldLevel.CustomProperties, level.CustomProperties); level.Layers.AddRange( oldLevel.Layers.Select(copyLayer)); _path = Path.GetTempFileName( ); level.SaveAsXmlToDisk(_path); }