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