public void LoadCreateAnalysis() { string analysisPath = EventPath + "\\" + Event.EventName + ScoutingJson.AnalysisExtension; if (File.Exists(analysisPath)) { FrcAnalysis = ScoutingJson.ParseAnalysis(analysisPath); } else { FrcAnalysis = new EventAnalysis(Event); } FrcAnalysis.PostJsonLoading(Event); }
public static void SaveAnalysis(EventAnalysis stats, string path) { Initialize(false); string contents = JsonConvert.SerializeObject(stats, Formatting.Indented); File.WriteAllText(path, contents); }