Пример #1
0
        public PlayerRankings(GameFlow gf)
        {
            InitializeComponent();

            db = gf.Db;
            Player[] users = db.getUserRanking();
            this.gf = gf;
            int rank = 1;

            foreach (Player player in users)
            {
                PlayerPanel pp = new PlayerPanel();

                pp.lblPalyerName.Content = player.Name;
                pp.lblPlayerLoss.Content = player.Loss;
                pp.lblPlayerRank.Content = rank++;
                pp.lblPlayerScore.Content = player.Score;
                pp.lblPlayerWins.Content = player.Win;
                pp.imgAvatar.Source = new BitmapImage(new Uri(player.Avatar));
                //imgPlayer.Source = new BitmapImage(new Uri(currentPlayer.Avatar));
                //ltvRankings.Items.Add(pp);

                Debug.WriteLine(player.Avatar);

                lstRanking.Items.Add(pp);
            }
        }
Пример #2
0
        public TestRanking(GameFlow gf)
        {
            InitializeComponent();
            db = gf.Db;

            Player[] users = db.getUserRanking();
            this.gf = gf;

            foreach (Player player in users)
            {
                PlayerPanel pp = new PlayerPanel();
                pp.lblPalyerName.Content = player.Name;
                ltvRankings.Items.Add(pp);
            }
        }