示例#1
0
        private void HandleDoorStatusChangedEvent(object sender, DoorChangedEventArgs e)
        {
            CurrentDoorStatus = e.DoorStatus;
            if (CurrentDoorStatus == false && _state != LadeskabState.Locked)//lukket dør
            {
                _display.writeDisplay("Indlæs RFID");
                _state = LadeskabState.Available;
            }

            if (CurrentDoorStatus == true && _state != LadeskabState.Locked)//åbnet dør
            {
                _display.writeDisplay("Tilslut telefon");
                _state = LadeskabState.DoorOpen;
            }
        }
示例#2
0
 protected virtual void OnDoorStatusChanged(DoorChangedEventArgs e)
 {
     DoorChangedEvents?.Invoke(this, e);//invoker alle dem som har
 }