Beispiel #1
0
        //Weighted Ingredient
        private void btnAddWIng_Click(object sender, EventArgs e)
        {
            var newForm = new AddWIngredientForm(new AddWIngredientForm.Del(AddWIngredient));

            newForm.Owner = this;
            newForm.ShowDialog();
        }
Beispiel #2
0
        private void btnEditWIng_Click(object sender, EventArgs e)
        {
            if (wIngsGrid.Rows.Count == 0)
            {
                return;
            }

            var newForm = new AddWIngredientForm(new AddWIngredientForm.Del(EditWIngredient),
                                                 (WeightedIngredient)wIngsGrid.CurrentRow.Cells[0].Value);

            newForm.Owner = this;
            newForm.ShowDialog();
        }