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); }
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); }
public void KuhHinzufuegen(Kuh k) { meineKeuhe.Add(k); }
public void zuHerdeHinzufuegen(Kuh k) { Herde.Add(k); }