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); }
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); }