Ejemplo n.º 1
0
        private void OnAddClick(object sender, RoutedEventArgs e)
        {
            var recipeItem = new RecipeItem
            {
                Count = 1
            };
            var window = new RecipeItemWindow(recipeItem, _project)
            {
                Owner = this
            };

            if (window.ShowDialog() == true)
            {
                _recipe.Add(recipeItem);
                _recipeItems.Add(recipeItem);
            }
        }
Ejemplo n.º 2
0
        private void OnEditClick(object sender, RoutedEventArgs e)
        {
            var recipeItem = SelectedItems.FirstOrDefault();

            if (recipeItem == null)
            {
                return;
            }

            var window = new RecipeItemWindow(recipeItem, _project)
            {
                Owner = this
            };

            if (window.ShowDialog() == true)
            {
                Tune();
            }
        }