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; } }
private void PowerBtn_Click(object sender, EventArgs e) { OptionPowerForm dlg = new OptionPowerForm(fTheme.GrantedPower); if (dlg.ShowDialog() == DialogResult.OK) { fTheme.GrantedPower = dlg.Power; } }
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(); } } }
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(); } }
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(); } } }
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(); } }