private void ReloadListBox()
        {
            weaponsList.Items.Clear();

            foreach (Weapon weapon in weapons)
            {
                String name;

                int index = WeaponDatabase.getIndex(weapon.id);
                if (index == 0)
                {
                    name = weaponEditFormResources.GetString("weaponBox.Items");
                }
                else
                {
                    name = weaponEditFormResources.GetString("weaponBox.Items" + index);
                }

                if (weapon.id == equippedWeapon)
                {
                    name += " " + Properties.Strings.EQUIPPED;
                }

                weaponsList.Items.Add(name);
            }
        }
Exemple #2
0
        public WeaponEditForm(Weapon wep)
        {
            InitializeComponent();

            weapon = wep;
            weaponBox.SelectedIndex = WeaponDatabase.getIndex(weapon.id);
            weaponBox.Enabled       = false;
            turfInkedBox.Value      = Convert.ToInt32(weapon.turfInked);
            newFlagBox.Checked      = weapon.isNew;
        }