Пример #1
0
 private void RulesEngineNewAchievement(object sender, NewAchievementEventArgs args)
 {
     foreach (var achievement in args.Achievements)
     {
         _log.Debug(args.Person + " achieved " + achievement.Name);
     }
     Invoke(() =>
     {
         viewUser1.NewAchievements(args.Person);
         if (_settings.AchievementAlertPreference == AchievementAlertPreferenceEnum.Never)
         {
             return;
         }
         if (_settings.AchievementAlertPreference == AchievementAlertPreferenceEnum.OnlyForMe && !_settings.IsMeOrDefault(args.Person, true))
         {
             return;
         }
         foreach (var achievement in args.Achievements)
         {
             NewAchievement.ShowForm(_settings, achievement, args.Person, this, modal: false);
         }
         ShowViewUserPage(args.Person);
     });
 }