Ejemplo n.º 1
0
 /// <summary>
 /// Sets the current target animal to a new random one.
 /// </summary>
 private void SetRandomAnimal()
 {
     Animal newAnimal;
     do
     {
         newAnimal = form1ViewModel.RandomAnimal;
     } while (currentAnimal.Equals(newAnimal));
     currentAnimal = newAnimal;
     soundLabel.Text = currentAnimal.Says;
     if (currentScene != null)
     {
         soundLabel.Location = GetControlOffsetPoint(currentScene.AnimalSoundLabelLocation, soundLabel);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds all the animals(panels) to the list of view controls.
 /// </summary>
 private void AddAnimals()
 {
     foreach (Animal animal in form1ViewModel.Animals)
     {
         Controls.Add(animal);
     }
     currentAnimal = form1ViewModel.Animals[1];
 }