private void Button_AddBeers_Click(object sender, RoutedEventArgs e) { Button_reset_Click(sender, e); AddBeerWindow W = new AddBeerWindow(MyCollection.BeerCollection, MyCollection.BreweryCollection); W.ShowDialog(); }
private void Button_Modify_Click(object sender, RoutedEventArgs e) { if (DG_Beers.IsVisible) { if (MyCollection.BeerCollection.Count > DG_Beers.SelectedIndex && DG_Beers.SelectedIndex != -1) { Beer CurentBeer = new Beer(); CurentBeer = (Beer)DG_Beers.SelectedItem; AddBeerWindow W = new AddBeerWindow(MyCollection.BeerCollection, MyCollection.BreweryCollection, CurentBeer); W.ShowDialog(); } } }