예제 #1
0
        static void Main()
        {
            FireAlarm myFireAlarm = new FireAlarm();

            FireAlarmHandler handler = new FireAlarmHandler(myFireAlarm);

            EventArgs e = new EventArgs();

            //lansare evenimente
            myFireAlarm.SunaAlarma(e);

            Console.Read();
        }
예제 #2
0
        static void Main()
        {
            FireAlarm myFireAlarm = new FireAlarm();

            FireAlarmHandler handler = new FireAlarmHandler(myFireAlarm);

            FireAlarmEventArgs e1 = new FireAlarmEventArgs("Camera 1", 3);
            FireAlarmEventArgs e2 = new FireAlarmEventArgs("Camera 2", 7);

            //lansare evenimente
            myFireAlarm.SunaAlarma(e1);
            myFireAlarm.SunaAlarma(e2);

            Console.Read();
        }