Esempio n. 1
0
File: Form1.cs Progetto: Isayur/DPR
 private void getFerocious_Click(object sender, EventArgs e)
 {
     if (animalFactoryMain.CurrentFactory != null)
     {
         animal = animalFactoryMain.getFerociousAnimal();
         listBox1.Items.Add("New ferocious animal fetched");
     }
     else
     {
         MessageBox.Show("Select an animal factory first");
     }
 }
Esempio n. 2
0
 public virtual Animal getFerociousAnimal()
 {
     return(currentFactory.getFerociousAnimal());
 }