コード例 #1
0
        private void SetKohSpell()
        {
            bool isSpellSelected = kohSpellComboBox.SelectedIndex != -1;

            if (isSpellSelected)
            {
                kohSpell = (BallSpell)kohSpellComboBox.SelectedItem;
            }
            else
            {
                kohSpell = BallSpell.NO_BALL_SPELL;
            }
            SetKohSpellLevel();
            removeKohSpellButton.Enabled   = isSpellSelected;
            removeChargeButton.Enabled     = isSpellSelected;
            addChargeButton.Enabled        = isSpellSelected;
            identifyKohSpellButton.Enabled = isSpellSelected && !kohSpell.IsIdentified();
        }
コード例 #2
0
 private void okButton_Click(object sender, EventArgs e)
 {
     Spell        = new BallSpell(SelectedSpellTraits(), (uint)minChargesNumericUpDown.Value, (uint)maxChargesNumericUpDown.Value);
     DialogResult = DialogResult.OK;
     this.Close();
 }