private void Button_Melken(object sender, RoutedEventArgs e)
        {
            Kuh kuh = kuehe[currentKuh];

            kuh.melken();
            setEigenschaftenKuh(currentKuh);
        }
        private void Button_Füttern(object sender, RoutedEventArgs e)
        {
            string heuMengeText = txtHeuMenge.Text;
            double heuMenge     = Convert.ToDouble(heuMengeText);
            Kuh    kuh          = kuehe[currentKuh];

            kuh.fressen(heuMenge);
            setEigenschaftenKuh(currentKuh);
        }
Exemple #3
0
 public void ausHerdeEntfernen(Kuh k)
 {
     if (Herde.Contains(k))
     {
         Herde.Remove(k);
     }
     else
     {
         MessageBox.Show("Kuh nicht in der Herde", "Error", MessageBoxButton.OK);
     }
 }
        private void Button_Location(object sender, RoutedEventArgs e)
        {
            Kuh kuh = kuehe[currentKuh];

            if (Stall1.getMeineKuehe().Contains(kuh))
            {
                Stall1.KuhRausLassen(Weide1, kuh.getName());
            }
            else
            {
                Stall1.KuhVonWeideHolen(Weide1, kuh.getName());
            }
            setEigenschaftenKuh(currentKuh);
        }
Exemple #5
0
 public void KuhHinzufuegen(Kuh k)
 {
     meineKeuhe.Add(k);
 }
Exemple #6
0
 public void zuHerdeHinzufuegen(Kuh k)
 {
     Herde.Add(k);
 }