Example #1
0
        private void saveBox_Click(object sender, EventArgs e)
        {
            // check if we're adding a new weapon
            if (weaponBox.Enabled != false)
            {
                WeaponsForm weaponsForm    = (WeaponsForm)this.Owner;
                Weapon      selectedWeapon = WeaponDatabase.weapons[weaponBox.SelectedIndex];

                // make sure this new weapon isn't already in the list
                foreach (Weapon existingWeapon in weaponsForm.weapons)
                {
                    if (selectedWeapon.id == existingWeapon.id)
                    {
                        // refuse to save
                        MessageBox.Show(Properties.Strings.WEAPON_EXISTS_TEXT);
                        return;
                    }
                }

                weapon = selectedWeapon;
            }

            weapon.turfInked = Convert.ToUInt32(turfInkedBox.Value);
            weapon.isNew     = newFlagBox.Checked;

            this.Close();
        }
Example #2
0
        private void weaponsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WeaponsForm weaponsForm = new WeaponsForm(Gecko, diff);

            weaponsForm.ShowDialog(this);
        }
Example #3
0
 private void bukiButton_Click(object sender, EventArgs e)
 {
     WeaponsForm.PokeWeapons(WeaponDatabase.weapons, Gecko, diff);
 }