Beispiel #1
0
 private void toggleDoorState()
 {
     if (_door.isOpen)
     {
         _door.close();
     }
     else
     {
         _door.open();
     }
 }
Beispiel #2
0
 public void pressButton()
 {
     Console.WriteLine("Pressing the remote control button ...");
     if (_door.isOpen)
     {
         _door.close();
     }
     else
     {
         _door.open();
     }
 }