Exemplo n.º 1
0
        private static void UpdateLevel()
        {
            var digimonList = new DigimonList();

            digimonList.LoadDigimon();

            var armourLoader = new DigimonArmourLoader();
            var armourChart  = armourLoader.LoadArmourData();

            foreach (var chart in armourChart)
            {
                foreach (var digimon in chart.DigimentalDigivolution.Select(x => x.Value))
                {
                    var digimonInList = digimonList.DigimonCollection.FirstOrDefault(x =>
                                                                                     string.Equals(x.Name, digimon, StringComparison.OrdinalIgnoreCase) ||
                                                                                     string.Equals(x.DubName, digimon, StringComparison.OrdinalIgnoreCase));
                    if (digimonInList != null)
                    {
                        digimonInList.Level = "Armour";
                    }
                }
            }

            digimonList.DigimonLoader.SaveDigimon(digimonList.DigimonCollection);
        }
Exemplo n.º 2
0
        public DigimonAnalyser()
        {
            _digimonList = new DigimonList();
            _digimonList.LoadDigimon();

            var armourLoader = new DigimonArmourLoader();

            _armourChart = armourLoader.LoadArmourData();

            InitializeComponent();
        }