示例#1
0
        public void LinkEvents(RecipeEventTypes.PercentChangedHandler adjustPercentageHandler, RecipeEventTypes.WeightChangedHandler adjustWeightHandler,
            UpdateHydrationHandler calculateHydrationHandler, RecipeEventTypes.IngredientDeleteMe deleteIngredientHander)
        {
            PercentChanged += adjustPercentageHandler;
            WeightChanged += adjustWeightHandler;
            UpdateHydration += calculateHydrationHandler;
            DeleteMe += deleteIngredientHander;

            foreach (var ingredient in ingredients)
            {
                ingredient.LinkEvents(AdjustIngredientPercentages, adjustWeightHandler, calculateHydrationHandler, DeleteChild);
            }
        }
示例#2
0
        public void LinkEvents(RecipeEventTypes.PercentChangedHandler adjustPercentageHandler, RecipeEventTypes.WeightChangedHandler adjustWeightHandler,
            UpdateHydrationHandler calculateHydrationHandler, EntryModeChangedHandler entryModeHandler)
        {
            PercentChanged += adjustPercentageHandler;
            WeightChanged += adjustWeightHandler;
            UpdateHydration += calculateHydrationHandler;
            EntryModeChange += entryModeHandler;

            foreach (var ingredient in ingredients)
            {
                ingredient.LinkEvents(AdjustIngredientPercentages, adjustWeightHandler, calculateHydrationHandler, ChildEnteredEntryMode);
            }
        }