Example #1
0
        static void Main(string[] args)
        {
            //Switcher sw = new Switcher(new GasLamp());

            //sw.SwitchOn();
            //sw.SwitchOff();
            SwitcherUsingEv switcher = new SwitcherUsingEv();
            Ligher          l        = new Ligher(switcher);

            switcher.Off();
        }
Example #2
0
 public Ligher(SwitcherUsingEv switcher)
 {
     this.switcher = switcher;
     this.switcher.SwitcherChanged += Switcher_SwitcherChanged;
 }