Exemplo n.º 1
0
        private void AddFood_Click(object sender, RoutedEventArgs e)
        {
            var newCurrentFood = new ChefViewFood();

            newCurrentFood.Show();
            windows.Add(newCurrentFood);
        }
Exemplo n.º 2
0
        private void EventForFood(object sender, RoutedEventArgs e)
        {
            var button = (Button)sender;
            var id     = Convert.ToInt32(button.Name.Replace("Name", ""));

            var window = new ChefViewFood(foods.First(f => f.Id == id));

            window.Show();

            windows.Add(window);
        }