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