Beispiel #1
0
 public ShoppingListController(
     ShoppingListInventory shoppingListInventory,
     MyPantry pantry, RecipeInventory recipeInventory)
 {
     _shoppingInventory = shoppingListInventory;
     _pantry            = pantry;
     _recipeInventory   = recipeInventory;
 }
Beispiel #2
0
 public uiAddShoppingList(Action <string, ICollection <Recipe> > getShoppingList,
                          RecipeInventory recipeInventory,
                          ShoppingListInventory shoppingListInventory)
 {
     _shoppingListInventory = shoppingListInventory;
     _recipeInventory       = recipeInventory;
     InitializeComponent();
     _getShoppingListDelegate = getShoppingList;
 }
Beispiel #3
0
 public uiShoppingList(
     Action launchAddShoppingListDelegate,
     Action <ShoppingList> launchShowShoppingListDelegate,
     Action <ShoppingList> addShoppingListToPantry,
     ShoppingListInventory shoppingListInventory)
 {
     _addShoppingListToPantry        = addShoppingListToPantry;
     _shoppingListInventory          = shoppingListInventory;
     _launchShowShoppingListDelegate = launchShowShoppingListDelegate;
     _launchAddShoppingListDelegate  = launchAddShoppingListDelegate;
     InitializeComponent();
     shoppingListBindingSource.DataSource = _shoppingListInventory.ShoppingLists;
 }