예제 #1
0
파일: Form1.cs 프로젝트: 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");
     }
 }
예제 #2
0
 public virtual Animal getFerociousAnimal()
 {
     return(currentFactory.getFerociousAnimal());
 }