Example #1
0
        private static void SaveProfile()
        {
            var profile = new ChampionProfile(1.0, GetOptions());
            var json    = JsonConvert.SerializeObject(profile);

            if (File.Exists(VolatileFile))
            {
                File.Delete(VolatileFile);
                Chat.Print("Saved Settings for " + Player.ChampionName);
            }
            else
            {
                Chat.Print("Settings File created for " + Player.ChampionName);
            }
            using (var sw = new StreamWriter(VolatileFile))
            {
                sw.Write(json);
            }
        }
Example #2
0
 private static void SaveProfile()
 {
     var profile = new ChampionProfile(1.0, Options);
     var json = JsonConvert.SerializeObject(profile);
     if (File.Exists(FileLocation))
     {
         File.Delete(FileLocation);
         Chat.Print("Saved Settings for " + Player.Instance.ChampionName);
     }
     else
     {
         Chat.Print("Settings File created for " + Player.Instance.ChampionName);
     }
     using (var sw = new StreamWriter(FileLocation))
     {
         sw.Write(json);
     }
 }