예제 #1
0
        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();
        }
예제 #2
0
        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();
        }