Exemplo n.º 1
0
        private void SaveDelete_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            SavedPetTalentSpec currentSpec = SavedCombo.SelectedItem as SavedPetTalentSpec;

            if (HasCustomSpec)
            {
                PETFAMILYTREE ftree   = ArmoryPet.FamilyToTree[CalcOpts.PetFamily];
                int           treepts = (ftree == PETFAMILYTREE.Cunning ? Tree1.Points() :
                                         (ftree == PETFAMILYTREE.Ferocity ? Tree2.Points() :
                                          (ftree == PETFAMILYTREE.Tenacity ? Tree3.Points() :
                                           Tree1.Points() + Tree2.Points() + Tree3.Points())));
                FormSavePetTalentSpec dialog = new FormSavePetTalentSpec(CalcOpts.PetTalents, ftree, treepts);
                dialog.Closed += new EventHandler(dialog_Closed);
                dialog.Show();
            }
            else
            {
                SavedPetTalentSpec.AllSpecs.Remove(currentSpec);
                UpdateSavedSpecs();
            }
        }
Exemplo n.º 2
0
 private void SaveDelete_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     SavedPetTalentSpec currentSpec = SavedCombo.SelectedItem as SavedPetTalentSpec;
     if (HasCustomSpec) {
         PETFAMILYTREE ftree = ArmoryPet.FamilyToTree[CalcOpts.PetFamily];
         int treepts = (ftree == PETFAMILYTREE.Cunning ? Tree1.Points() :
                       (ftree == PETFAMILYTREE.Ferocity ? Tree2.Points() :
                       (ftree == PETFAMILYTREE.Tenacity ? Tree3.Points() :
                        Tree1.Points() + Tree2.Points() + Tree3.Points())));
         FormSavePetTalentSpec dialog = new FormSavePetTalentSpec(CalcOpts.PetTalents, ftree, treepts);
         dialog.Closed += new EventHandler(dialog_Closed);
         dialog.Show();
     } else {
         SavedPetTalentSpec.AllSpecs.Remove(currentSpec);
         UpdateSavedSpecs();
     }
 }