Beispiel #1
0
        private async void getData(Match m)
        {
            PlayerListVM plvm = PlayerListVM.getInstance();
            var          tlvm = TournamentListVM.getInstance();


            tournament = tlvm.Tournaments.Where(t =>
            {
                return(t.ID == m.TournamentId);
            }).Single();

            team1Player1 = plvm.Players.Where(t =>
            {
                return(t.ID == m.Team1Player1);
            }).Single();

            team1Player2 = plvm.Players.Where(t =>
            {
                return(t.ID == m.Team1Player2);
            }).Single();

            team2Player1 = plvm.Players.Where(t =>
            {
                return(t.ID == m.Team2Player1);
            }).Single();

            team2Player2 = plvm.Players.Where(t =>
            {
                return(t.ID == m.Team2Player2);
            }).Single();
        }
Beispiel #2
0
 public Player Convert(PlayerVM p)
 {
     return(new Player(p.ID, p.isAdmin, p.FirstName, p.LastName,
                       p.Nickname, p.Skills, p.PhotoPath, p.Password, p.isMonday,
                       p.isTuesday, p.isWednesday, p.isThursday, p.isFriday, p.isSaturday));
 }