示例#1
0
        private void PowerBtn_Click(object sender, EventArgs e)
        {
            OptionPowerForm optionPowerForm = new OptionPowerForm(this.fTheme.GrantedPower);

            if (optionPowerForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fTheme.GrantedPower = optionPowerForm.Power;
            }
        }
示例#2
0
        private void PowerBtn_Click(object sender, EventArgs e)
        {
            OptionPowerForm dlg = new OptionPowerForm(fTheme.GrantedPower);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fTheme.GrantedPower = dlg.Power;
            }
        }
示例#3
0
 private void PowerEditBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedPower != null)
     {
         int             power           = this.fRace.Powers.IndexOf(this.SelectedPower);
         OptionPowerForm optionPowerForm = new OptionPowerForm(this.SelectedPower);
         if (optionPowerForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.fRace.Powers[power] = optionPowerForm.Power;
             this.update_powers();
         }
     }
 }
示例#4
0
        private void PowerAddBtn_Click(object sender, EventArgs e)
        {
            OptionPowerForm optionPowerForm = new OptionPowerForm(new PlayerPower()
            {
                Name = "New Power"
            });

            if (optionPowerForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fRace.Powers.Add(optionPowerForm.Power);
                this.update_powers();
            }
        }
示例#5
0
        private void PowerEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedPower != null)
            {
                int index = fLevel.Powers.IndexOf(SelectedPower);

                OptionPowerForm dlg = new OptionPowerForm(SelectedPower);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fLevel.Powers[index] = dlg.Power;
                    update_powers();
                }
            }
        }
示例#6
0
        private void PowerAddBtn_Click(object sender, EventArgs e)
        {
            PlayerPower power = new PlayerPower();

            power.Name = "New Power";

            OptionPowerForm dlg = new OptionPowerForm(power);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fLevel.Powers.Add(dlg.Power);
                update_powers();
            }
        }