示例#1
0
 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;
 }
示例#2
0
 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;
 }