Пример #1
0
        public static void Load()
        {
            if (!Directory.Exists(@"C:\REX_Saves\YongGiPracticeDojang") || !Directory.Exists(@"C:\REX_Saves")) // all files don't exist
            {
                //welcome message
                SET();
            }
            else
            {
                // direcrory does exist
                //load from files

                /*if (settings.Exists())
                 * {
                 *  settings.Load();
                 * } else
                 * {
                 *  settings.Create();
                 *  settings.value = new Settings();
                 * }*/
                if (preferences.Exists())
                {
                    preferences.Load();
                }
                else
                {
                    preferences.Create();
                    preferences.value = new Preferences();
                }
                if (presets.Exists())
                {
                    presets.Load();
                }
                else
                {
                    presets.Create();
                    presets.value = new List <TrainingPreset>();
                }
                if (records.Exists())
                {
                    records.Load();
                }
                else
                {
                    records.Create();
                    records.value = new List <Record>();
                }
            }
        }