Ejemplo n.º 1
0
        public static BeatMapMeta LoadBeatMap(string path)
        {
            string filePath = string.Equals(Path.GetExtension(path), ".rron")
                ? path
                : Directory.GetFiles(path, @"*.rron").First();
            BeatMapMeta prePath = RronConvert.DeserializeObjectFromFile <BeatMapMeta>(filePath);

            prePath.Path = path;
            return(prePath);
        }
Ejemplo n.º 2
0
        private static SavedSettings LoadSettings()
        {
            if (File.Exists(GenericPaths.SettingsPath) && !string.IsNullOrEmpty(File.ReadAllText(GenericPaths.SettingsPath)))
            {
                return(RronConvert.DeserializeObjectFromFile <SavedSettings>(GenericPaths.SettingsPath));
            }

            SavedSettings settings = new SavedSettings("Default");

            RronConvert.SerializeObjectToFile(settings, GenericPaths.SettingsPath);
            return(settings);
        }