Exemplo n.º 1
0
 private void Add()
 {
     BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager();
     EntitiesLayer.Match m = new EntitiesLayer.Match(0, jtm.getJedis()[0], jtm.getJedis()[0],
                                                     EntitiesLayer.EPhaseTournoi.HuitiemeFinale1,
                                                     jtm.getStades()[0]);
     this.SelectedMatch = new MatchViewModel(m);
     m_matchs.Add(this.SelectedMatch);
 }
Exemplo n.º 2
0
 private void Add()
 {
     BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager();
     EntitiesLayer.Match m = new EntitiesLayer.Match(0, jtm.getJedis()[0], jtm.getJedis()[0],
                                                     EntitiesLayer.EPhaseTournoi.HuitiemeFinale1,
                                                     jtm.getStades()[0]);
     this.SelectedMatch = new MatchViewModel(m);
     m_matchs.Add(this.SelectedMatch);
 }
        private void Add()
        {
            BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager();
            EntitiesLayer.Match placeholder         = (from x in jtm.getMatches()
                                                       where x.PhaseTournoi == EntitiesLayer.EPhaseTournoi.HuitiemeFinale1
                                                       select x).First();
            EntitiesLayer.Match[]      placeholders = { placeholder, placeholder, placeholder, placeholder,
                                                        placeholder,      placeholder, placeholder, placeholder };
            List <EntitiesLayer.Match> matchs = new List <EntitiesLayer.Match>(placeholders);

            matchs.AddRange(jtm.getMatchsEmpty());

            EntitiesLayer.Tournoi t = new EntitiesLayer.Tournoi(0, "<New>", matchs);
            this.SelectedTournoi = new TournamentViewModel(t);
            m_tournaments.Add(this.SelectedTournoi);
        }
Exemplo n.º 4
0
        private string getMatchText(int index)
        {
            EntitiesLayer.Match match = m_tournament.Matchs[index];
            string jedi1 = "Inconnu";
            string jedi2 = "Inconnu";

            //string stade = "Inconnu";

            if (match.Jedi1 != null)
            {
                jedi1 = match.Jedi1.Nom;
            }
            if (match.Jedi2 != null)
            {
                jedi2 = match.Jedi2.Nom;
            }
            //if (match.Stade != null)
            string stade = match.Stade.Planete;

            return(jedi1 + " VS " + jedi2 + " (" + stade + ")");
        }
Exemplo n.º 5
0
 public MatchViewModel(EntitiesLayer.Match match)
 {
     m_match = match;
 }
Exemplo n.º 6
0
 public MatchViewModel(EntitiesLayer.Match match)
 {
     m_match = match;
 }