private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            var newraid = new RaidListItem {
                English   = En.Text,
                Japanese  = Ja.Text,
                Image     = Link.Text ?? "",
                Following = false
            };

            _raidList.Add(newraid);
        }
Example #2
0
 private void Add(RaidListItem raidBoss)
 {
     try {
         if (_controllerFactory.GetRaidsController.Follows.Select(f => f.English).ToList()
             .Contains(raidBoss.English))
         {
             _controllerFactory.GetRaidsController.Follows.Remove(
                 f => f.Japanese == raidBoss.Japanese || f.English == raidBoss.English);
             _controllerFactory.GetRaidlistController.RaidBossListItems.First(
                 f => f.Japanese == raidBoss.Japanese || f.English == raidBoss.English).Following = false;
             _controllerFactory.GetRaidsController.Save();
             return;
         }
         _controllerFactory.GetRaidsController.Follows.Add(new FollowModel(raidBoss.Japanese, raidBoss.English,
                                                                           raidBoss.Image, _controllerFactory.GetBlacklistController));
         _controllerFactory.GetRaidsController.Save();
         raidBoss.Following = true;
     }
     catch (Exception e) {
         Console.WriteLine(e);
     }
 }