Exemplo n.º 1
0
        private void MatchTrack_Load(object sender, EventArgs e)
        {
            _schedule = new Schedule();
            if (!_schedule.Load($"{WorkingDirectory}{ScheduleFileName}", _teamList))
            {
                Close();
                return;
            }

            _robotData = new RobotData();
            _robotData.LoadData($"{WorkingDirectory}{MatchDataFileName}");

            MatchModeCombo.SelectedIndex = 0;
            EditGroup.Enabled            = false;

            _pollingTimer          = new Timer();
            _pollingTimer.Enabled  = true;
            _pollingTimer.Interval = Convert.ToInt16(250);
            _pollingTimer.Tick    += new EventHandler(PollingEvent);

            _analytics = new Analytics();
            _analytics.Load(_robotData);

            InitializeRankingsTab();
            InitializeTeamTab();

            setTeam(0);
        }
Exemplo n.º 2
0
 public void Load(RobotData robotData)
 {
     foreach (var matchData in robotData.MatchDataList)
     {
         var row = _matchTable.NewMatchScoresRow();
         row.Team     = matchData.TeamNumber;
         row.Match    = matchData.MatchNumber;
         row.Count0   = matchData.ScoreArray[0];
         row.Count1   = matchData.ScoreArray[1];
         row.Count2   = matchData.ScoreArray[2];
         row.Count3   = matchData.ScoreArray[3];
         row.Count4   = matchData.ScoreArray[4];
         row.Count5   = matchData.ScoreArray[5];
         row.Count6   = matchData.ScoreArray[6];
         row.Count7   = matchData.ScoreArray[7];
         row.Weighted = GetWeightedScore(matchData);
         row.Score    = matchData.Score;
         row.RPs      = matchData.RankingPoints;
         _matchTable.Rows.Add(row);
     }
     LoadTeamRankings();
 }