Beispiel #1
0
        public AlarmController(AlarmApi api)
        {
            this.api = api;
            state    = new AlarmState();

            preAlarmLightingState = false;

            bgwAlarmController         = new BackgroundWorker();
            bgwAlarmController.DoWork += BgwAlarmController_DoWork;
            bgwAlarmController.WorkerSupportsCancellation = true;
            bgwAlarmController.RunWorkerAsync();

            Update();
        }
Beispiel #2
0
 internal void RaiseStateChanged(AlarmState state)
 {
     StateChanged?.Invoke(this, new StateEventArgs(state));
 }
Beispiel #3
0
 public StateEventArgs(AlarmState state)
 {
     State = state;
 }