Пример #1
0
        static void Main(string[] args)
        {
            FireAlarm        myFireAlarm   = new FireAlarm();
            FireHandlerClass myFireHandler = new FireHandlerClass(myFireAlarm);

            myFireAlarm.ActivateFireAlarm("Kitchen", 3);
            myFireAlarm.ActivateFireAlarm("Study", 1);
            myFireAlarm.ActivateFireAlarm("Porch", 5);
        }
Пример #2
0
 public FireHandlerClass(FireAlarm fireAlarm)
 {
     fireAlarm.FireEvent += new FireAlarm.FireEventHandler(ExtinguishFire);
 }