Exemplo n.º 1
0
Arquivo: Form1.cs Projeto: 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");
     }
 }
Exemplo n.º 2
0
 public virtual Animal getFerociousAnimal()
 {
     return(currentFactory.getFerociousAnimal());
 }