예제 #1
0
파일: Assets.cs 프로젝트: Redageddon/Inflex
        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);
        }
예제 #2
0
 private void SaveNewBeatMap() =>
 RronConvert.SerializeObjectToFile(this.beatMapMeta, this.beatMapMeta.Path, new[] { nameof(BeatMapMeta.Id), nameof(BeatMapMeta.Path) });
예제 #3
0
 protected override void LeftClick() => RronConvert.SerializeObjectToFile(Assets.Instance.Settings, GenericPaths.SettingsPath);