Пример #1
0
        internal void SortByTeamNumber()
        {
            List <TeamResult> ordered = TeamResults.OrderBy(o => o.TeamNumber).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #2
0
        public void SortByAverageScore()
        {
            List <TeamResult> ordered = TeamResults.OrderByDescending(o => o.AverageScore).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #3
0
        //FIXME - still sorts by avg. pow. cells
        internal void SortByBroken()
        {
            List <TeamResult> ordered = TeamResults.OrderBy(o => o.TotalBroken).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #4
0
        internal void SortByAveragePowercells()
        {
            List <TeamResult> ordered = TeamResults.OrderByDescending(o => o.AveragePowercells).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #5
0
        public void SortByPowercellCount()
        {
            List <TeamResult> ordered = TeamResults.OrderByDescending(o => o.TotalPowercells).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #6
0
        public void SortByRankingPoints()
        {
            List <TeamResult> ordered = TeamResults.OrderByDescending(o => o.TotalRP).ToList();

            TeamResults.Clear();
            foreach (TeamResult item in ordered)
            {
                TeamResults.Add(item);
            }
        }
Пример #7
0
        public void ExecuteLoadEventTeamsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                TeamResults.Clear();
                var teams = DataStoreTeam.GetItemsAsync(true).Result;
                foreach (var team in teams)
                {
                    TeamDetailViewModel matchViewModel = new TeamDetailViewModel(App.currFRCEventKey, team);
                    TeamResult          teamResult     = new TeamResult();
                    teamResult.TeamNumber        = team.TeamNumber;
                    teamResult.Name              = team.Name;
                    teamResult.TotalRP           = matchViewModel.TotalRP;
                    teamResult.TotalScore        = matchViewModel.TotalScore;
                    teamResult.AverageScore      = matchViewModel.AverageScore;
                    teamResult.TotalPowercells   = matchViewModel.TotalPowercells;
                    teamResult.AveragePowercells = matchViewModel.AveragePowercells;
                    teamResult.TotalBroken       = matchViewModel.TotalBroken;


                    TeamResults.Add(teamResult);
                }
            }
            catch (Exception ex)
            {
                Title = ex.Message;
            }
            finally
            {
                IsBusy = false;
            }
        }