Exemplo n.º 1
0
 private void GetNewItems()
 {
     if (importedItems != null && existingItems != null)
     {
         newItems.Clear();
         foreach (ModelClasses.Item entry in importedItems)
         {
             if (!existingItems.Where(x => x.ToString() == entry.ToString()).Any())
             {
                 newItems.Add(entry);
             }
         }
     }
 }
Exemplo n.º 2
0
        public void GetFactionsWargear()
        {
            if (selectedMini != null)
            {
                wargearForFaction.Clear();

                foreach (ModelClasses.Item gear in allWargear)
                {
                    if (gear.AllowedFaction.Name == selectedMini.Faction.Name)
                    {
                        wargearForFaction.Add(gear);
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void GetFactionWargear()
        {
            if (selectedUnit != null)
            {
                factionsWargear.Clear();

                foreach (ModelClasses.Item gear in allWargear)
                {
                    if (selectedUnit.Faction.Name == gear.AllowedFaction.Name)
                    {
                        factionsWargear.Add(gear);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public void RefreshStandardWeapons()
        {
            if (selectedUnit != null && selectedUnitModel != null)
            {
                cmbReplaceableWargear.Items.Clear();
                replaceableWargear.Clear();
                foreach (ModelClasses.UnitModel entry in selectedUnit.ListEntries)
                {
                    if (!entry.IsReplacement && !entry.IsUpgradeOnly && !entry.IsWargear && entry.Miniature != null)
                    {
                        replaceableWargear.AddRange(entry.Miniature.StandardEquip);
                    }
                }

                foreach (ModelClasses.Item item in replaceableWargear)
                {
                    cmbReplaceableWargear.Items.Add(item);
                }
            }
        }