// 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; } }
protected virtual void OnDoorStateChanged(DoorStateChangedEventArgs e) { DoorStateChangedEvent?.Invoke(this, e); }