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); }
private void SaveNewBeatMap() => RronConvert.SerializeObjectToFile(this.beatMapMeta, this.beatMapMeta.Path, new[] { nameof(BeatMapMeta.Id), nameof(BeatMapMeta.Path) });
protected override void LeftClick() => RronConvert.SerializeObjectToFile(Assets.Instance.Settings, GenericPaths.SettingsPath);