private void EditRecipeButton_Click(object sender, EventArgs e) { NC_CreateRecipe form = new NC_CreateRecipe(AvailableRecipes[int.Parse(recipeListBox.SelectedValue.ToString())], AvailableFood); if (form.ShowDialog(this) != DialogResult.OK && form.updateData) { UpdateData(); } form.Dispose(); }
private void AddRecipeButton(object sender, EventArgs e) { NC_CreateRecipe form = new NC_CreateRecipe(new RecipeModel(), AvailableFood); if (form.ShowDialog(this) != DialogResult.OK && form.updateData) { UpdateData(); } form.Dispose(); }