Пример #1
0
        private void AddNewIngredient(object sender, EventArgs e)
        {
            Form_ChooseIngredient form_ChooseIngredient = new Form_ChooseIngredient();

            form_ChooseIngredient.ShowDialog();
            _ingredients.Add(form_ChooseIngredient.IngredientChosenToAdd);
            RefreshIngredientsListBox();
        }
Пример #2
0
        private void SwapIngredients(object sender, EventArgs e)
        {
            _ingredients.Remove(ListBox_for_Ingredients.SelectedItem as Ingredient);
            Form_ChooseIngredient form_ChooseIngredient = new Form_ChooseIngredient();

            form_ChooseIngredient.ShowDialog();
            _ingredients.Add(form_ChooseIngredient.IngredientChosenToAdd);
            RefreshIngredientsListBox();
        }