public void UpdateTeamsTab() { Team selected = TeamSelectionList.SelectedItem as Team; TeamAnalysis selectedAnalysis = FrcAnalysis.LoadTeam(selected.Number); if (selected == null) { Util.DebugLog(LogLevel.Error, "ANALYSIS", "Selected team was null or not a team at all."); } UpdateTeamSummary(selected); UpdateTeamAnalysis(selected, selectedAnalysis); }
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 void UpdateMatchesTab() { Match selected = MatchSelectionList.SelectedItem as Match; MatchAnalysis selectedAnalysis = FrcAnalysis.LoadMatch(selected.Number); if (selected == null) { Util.DebugLog(LogLevel.Error, "ANALYSIS", "Selected match was null or not a match at all."); } UpdateMatchSummary(selected); UpdateMatchPregame(selected, selectedAnalysis); UpdateMatchPostgame(selected, selectedAnalysis); }
public void Calculate() { FrcEvent before = Event; try { Event = ScoutingJson.ParseFrcEvent(EventPath + "\\" + Event.EventName + ScoutingJson.EventExtension); FrcAnalysis.Event = Event; } catch (Exception e) { Util.DebugLog(LogLevel.Error, "ANALYSIS", "Could not load Event:\n\t" + e.Message); Event = before; } FrcAnalysis.Calculate(); SaveAnalysis(); }