示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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();
        }