示例#1
0
文件: Form1.cs 项目: 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");
     }
 }
示例#2
0
 public virtual Animal getDocileAnimal()
 {
     return(currentFactory.getDocileAnimal());
 }