public GarfieldKartSave LoadSave(string path)
        {
            GarfieldKartSave save = new GarfieldKartSave();

            foreach (string filename in Directory.GetFiles(path))
            {
                if (filename.EndsWith("b3B0aW9ucw=="))
                {
                    // Options file
                    save.OptionsFilename = filename;
                    save.Options         = ParseOptionFile(filename);
                    File.Copy(filename, filename + ".bak", true);
                    continue;
                }
                if (filename.EndsWith("cHJvZ2Vzc2lvbg=="))
                {
                    // Progression
                    save.ProgressionFilename = filename;
                    save.Progression         = ParseProgressionFile(filename);
                    File.Copy(filename, filename + ".bak", true);
                    continue;
                }
            }

            return(save);
        }
        public string[] SerializeProgression(GarfieldKartSave save)
        {
            List <string> ret = new List <string>();

            foreach (var opair in save.Progression)
            {
                ret.Add(Convert.ToBase64String(Encoding.UTF8.GetBytes(opair.Key))
                        + ";"
                        + Convert.ToBase64String(Encoding.UTF8.GetBytes(opair.Value)));
            }
            return(ret.ToArray());
        }
 public void Save(GarfieldKartSave save)
 {
     File.WriteAllLines(save.OptionsFilename, SerializeOptions(save));
     File.WriteAllLines(save.ProgressionFilename, SerializeProgression(save));
 }