public CompareHighscoresForm(string username, string opponentName)
        {
            InitializeComponent();

            yourHighscores  = new Highscores();
            theirHighscores = new Highscores();
            if (!yourHighscores.GetHighscoresForPlayer(username) || !theirHighscores.GetHighscoresForPlayer(opponentName))
            {
                throw new Exception("Couldn't load player highscore information.");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new highscores form and loads the stats of the given username.
        /// </summary>
        /// <param name="username"></param>
        public HighscoresForm(string username, string gamemode)
        {
            InitializeComponent();
            this.username = username;
            this.gamemode = gamemode;
            Text         += $" - {username}";

            highscores = new Highscores();
            highscores.GetHighscoresForPlayer(username, gamemode);
            setupImages();
            setupLabels();
        }