private void ShowDefencesOfShip(Ship ship, List <DefenceSystem> selectedWeapons, double shipSize)
        {
            List <DefenceSystem> defences = AdminApp.GameData.Defences.Where(def => def.Faction.Id == ship.Faction.Id).ToList();

            AdminFormUtils.AddDefenceSystemListForShip(defenceTable, defences, shipSize, checkBoxToIdMap);
            foreach (var pair in checkBoxToIdMap)
            {
                if (selectedWeapons.Any(wep => wep.Id == pair.Value))
                {
                    pair.Key.Checked = true;                                                                    //check present weapons
                }
            }
        }
Esempio n. 2
0
        private void ShowWeaponsOfShip(Ship ship, List <Weapon> selectedWeapons)
        {
            List <Weapon> weapons = AdminApp.GameData.Weapons.Where(wep => wep.Faction.Id == ship.Faction.Id).ToList();

            AdminFormUtils.AddWeaponListForShip(weaponTable, weapons, checkBoxToIdMap);
            foreach (var pair in checkBoxToIdMap)
            {
                if (selectedWeapons.Any(wep => wep.Id == pair.Value))
                {
                    pair.Key.Checked = true;                                                                    //check present weapons
                }
            }
        }