자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
private void AddNewIngredientButtonAddRecipe_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(AddNewIngredientTextBoxAddRecipe.Text)) { MessageBox.Show("An ingredient must have a name!"); } else { var newIngredientToAdd = new Ingredient { Name = AddNewIngredientTextBoxAddRecipe.Text }; _ingredientsToAdd.Add(newIngredientToAdd); _recipeRepository.AddIngredient(newIngredientToAdd); AddNewIngredientTextBoxAddRecipe.Clear(); ExistingIngredientsListBox.DataSource = _recipeRepository.GetAllIngredients(); } }