private void PrepareTrophies()
        {
            var trophy = new Trophy();
            trophy.Name = "Balance ton premier son";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue un son";
            trophy.IsTrophyUnlocked = g => CheckNumberOfGamePlayed(g, 1);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Tu commences à aimer ?";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue 10 sons";
            trophy.IsTrophyUnlocked = g => CheckNumberOfGamePlayed(g, 10);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Tu kiff !";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue 100 sons";
            trophy.IsTrophyUnlocked = g => CheckNumberOfGamePlayed(g, 100);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "On ne t'arrête plus";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue 1000 sons";
            trophy.IsTrophyUnlocked = g => CheckNumberOfGamePlayed(g, 1000);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Est-ce que c'est vraiment sérieux ?";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue 2500 sons";
            trophy.IsTrophyUnlocked = g => CheckNumberOfGamePlayed(g, 2500);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Chuuuuut on t'a dit !!!";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue un son alors que le son est coupé";
            trophy.IsTrophyUnlocked = CheckIfUserHasPlayedWhileMuted;
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "T'es pas couché ??";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue un son tardivement";
            trophy.IsTrophyUnlocked =
                g => CheckPlayedSoundAfterAndBefore(g, new TimeSpan(1, 0, 0), new TimeSpan(4, 0, 0));
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "T'es déjà levé ??";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Joue un son dès potron-minet (ou presque)";
            trophy.IsTrophyUnlocked = g => CheckPlayedSoundAfterAndBefore(g, new TimeSpan(5, 0, 0), new TimeSpan(7, 0, 0));
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Tu l'as calmé :D";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Mute un son en cours de lecture";
            trophy.IsTrophyUnlocked = g => CheckMutedSound(g, 1);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);

            trophy = new Trophy();
            trophy.Name = "Lucky Luke du mute";
            trophy.Type = Model.Types.TrophyType.Bronze;
            trophy.Description = "Mute 50 sons en cours de lecture";
            trophy.IsTrophyUnlocked = g => CheckMutedSound(g, 50);
            trophy.Id = _trophyCurrentId;
            trophy.Image = new BitmapImage(new Uri("/Images/Trophy/Bronze_32.png", UriKind.RelativeOrAbsolute));
            AddTrophyToDictionary(trophy);
        }
 public static void ToastNewTrophy(string userName, Trophy trophy)
 {
     //Try to Toast
     _soundsHubContext.Clients.All.broadcastTrophy(userName, trophy.Name);
 }
 private void AddTrophyToDictionary(Trophy trophy)
 {
     _trophyCurrentId++;
     AllTrophies.Add(trophy.Id, trophy);
 }