private void toggleDoorState() { if (_door.isOpen) { _door.close(); } else { _door.open(); } }
public void pressButton() { Console.WriteLine("Pressing the remote control button ..."); if (_door.isOpen) { _door.close(); } else { _door.open(); } }
public void recognize(string bark) { Console.WriteLine(" BarkRecognizer: Heard a '" + bark + "'"); _door.open(); }