Example #1
0
        static void Main(string[] args)
        {
            var ingredient    = new Ingredients();
            var coffee        = new Coffee();
            var notification  = new Notification();
            var time          = new Time();
            var coffeemachine = new CoffeeMachine(ingredient, coffee, notification, time);

            coffee.coffeeevent             += coffee_coffeeevent;
            ingredient.AddingIngredients   += ingredient_ingredientevent;
            notification.notificationevent += notification_notificationevent;
            time.resttime += time_timeevent;

            Console.WriteLine("Приготовление кофе в кофемашине");
            coffeemachine.Making();
            Console.ReadKey();
        }
Example #2
0
        static void  ingredient_ingredientevent(object sender, EventArgs e)
        {
            Ingredients d = (Ingredients)sender;

            Console.WriteLine(d.ToString());
        }