示例#1
0
        // Her mangler de andre trigger handlere
        void HandleDoorStateChangedEvent(object source, EventArgs e)
        {
            DoorStateChangedEventArgs args = (DoorStateChangedEventArgs)e;

            if (args.State == DoorState.Open)
            {
                _display.DisplayMessage("Tilslut telefon");
                _state = LadeskabState.DoorOpen;
            }

            if (args.State == DoorState.Closed)
            {
                _display.DisplayMessage("Indlæs RFID");
                _state = LadeskabState.Available;
            }
        }
示例#2
0
 protected virtual void OnDoorStateChanged(DoorStateChangedEventArgs e)
 {
     DoorStateChangedEvent?.Invoke(this, e);
 }