Ejemplo n.º 1
0
        /// <summary>
        /// Adjusts team info from recorded match
        /// </summary>
        /// <param name="frc"></param>
        /// <param name="data"></param>
        public static void AdjustTeamInfo(FrcEvent frc, RecordedMatch data)
        {
            Team t = frc.LoadTeam(data.TrackedTeamID);

            t.Description  = data.TeamDescription;
            t.Expectations = data.TeamExpectations;
        }
        /// <summary>
        /// Additional loading after deserialization
        /// </summary>
        /// <param name="e">Event to load data from</param>
        public void PostJsonLoading(FrcEvent e)
        {
            TrackedTeam = e.LoadTeam(TrackedTeamID);

            if (TeamDescription == null || TeamDescription == "")
            {
                TeamDescription = TrackedTeam.Description;
            }
            if (TeamExpectations == null || TeamExpectations == "")
            {
                TeamExpectations = TrackedTeam.Expectations;
            }
        }
Ejemplo n.º 3
0
        public Match MakeMatch()
        {
            Alliance red = new Alliance(frc.LoadTeam(RedA),
                                        frc.LoadTeam(RedB), frc.LoadTeam(RedC));
            Alliance blue = new Alliance(frc.LoadTeam(BlueA),
                                         frc.LoadTeam(BlueB), frc.LoadTeam(BlueC));

            return(new Match(MatchID, blue, red));
        }
 public void PostJsonLoading(FrcEvent e)
 {
     Team  = e.LoadTeam(TeamID);
     Match = e.LoadMatch(MatchID);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Completes any references left out when loaded by JSON
 /// </summary>
 /// <param name="e"></param>
 public void PostJsonLoading(FrcEvent e)
 {
     Event = e;
     Team  = e.LoadTeam(TeamID);
 }