private void EditPowerButton_Click(object sender, EventArgs e) { if (SelectedType == selectiontype.Energy_Blast) { EnergyBlast En = (EnergyBlast)SelectedPower; EnergyBlastEditForm EditForm = new EnergyBlastEditForm(SelectedCharacter, En); if (EditForm.ShowDialog() == DialogResult.OK) { En.Name = EditForm.name; En.Dice = EditForm.dice; En.EnergySource = EditForm.energysource; En.calculatecost(); CharCalcpoints(); } EditForm.Dispose(); } PowersListBox.DataSource = null; PowersListBox.DataSource = (CharactersListBox.SelectedItem as Character).Powers; }
private void EditPowerButton_Click(object sender, EventArgs e) { if (SelectedType == selectiontype.Energy_Blast) { EnergyBlast En = (EnergyBlast)SelectedPower; EnergyBlastEditForm EditForm = new EnergyBlastEditForm(SelectedCharacter,En); if (EditForm.ShowDialog() == DialogResult.OK) { En.Name = EditForm.name; En.Dice = EditForm.dice; En.EnergySource = EditForm.energysource; En.calculatecost(); CharCalcpoints(); } EditForm.Dispose(); } PowersListBox.DataSource = null; PowersListBox.DataSource = (CharactersListBox.SelectedItem as Character).Powers; }